Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: klerxor on Fri 07/06/2019 18:00:58

Title: How to build an overview map (room) to move player to different areas
Post by: klerxor on Fri 07/06/2019 18:00:58
Hi,

A few days ago I started building my first adventure game. I have built a number of rooms and added some basic interaction through item pickups and dialogues. Now I have a first 'area' ready and I want to create another, separate area in the game with new rooms. I want display this with a overview map from above, like a lot of well-known adventure games use. The goal is that the player can travel from 'A' to 'B' to end up in a different area (or backwards to the previous area).

My question: can I build this via a standard room configuration and script (in the 300 range), and use 'Regions' or 'Walking areas' to point out the specific locations?

I have watched some tutorials, but I am not sure yet. Many thanks for thinking along.
Title: Re: How to build an overview map (room) to move player to different areas
Post by: eri0o on Fri 07/06/2019 18:51:42
I can think many ways to do that, can you draw a mockup of specifically what you want to do or show an specific screen from a game you want to mimic?

Example approach to solve, use walk on walk off events on regions to show/hide a GUI that allows the player to change room (https://adventuregamestudio.github.io/ags-manual/Character.html#changeroom) to whatever region you have (maybe using an array to map region to room to jump)
Title: Re: How to build an overview map (room) to move player to different areas
Post by: klerxor on Sat 08/06/2019 10:18:41
Sure, below a first draft of the map overview.  I want to draw the selected character at the current position on the map. In this example, if the player moves from A to B, the character should bend over the map (walkable area?). At point B a new room would be opened (or another subfolder of the area also like the overview map).

(https://niels-ecommerce1.s3.eu-central-1.amazonaws.com/media/main+overview_1920.jpg)
Title: Re: How to build an overview map (room) to move player to different areas
Post by: Crimson Wizard on Sat 08/06/2019 12:44:11
The simpliest solution is to have a separate room for a map, and set it up and treat same way you do with any other room: objects, regions, walkable areas, walk-behinds etc.
If your map is large, use scrolling room and either let it scroll after character or control the way it scrolls in script.
If it's too large, or has to change zoom view for example, add more rooms and switch between them.

It's not necessary to use same character. Since you probably would like to have it look differently on the map, you could switch its walking view (ChangeView in script), but also you may create another character with preset view and change between regular and "map" characters using charactername.SetAsPlayer().

If you do not like the way character walks along the walkable areas, or cannot work out these areas to make it work as you please, you could also use charactername.AddWaypoint() to set up a walking route. I guess that will work if character can go only from starting point to destination, but not to some random point.

Try various things, see what works for you better.

Also, if you'd like your map, for example, be seen like overlaying current real room (like, seeing parts of real room at the screen corners), the trick is to save a screenshot of the previous room in DynamicSprite object, and then draw it the map room.