Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: KyriakosCH on Mon 17/06/2019 21:35:45

Title: Borders for main map & minimap coloured border. How to?
Post by: KyriakosCH on Mon 17/06/2019 21:35:45
Hi, I am thinking of trying to create a small turn-based strategy game, set in the medieval era. I would like to have borders, changing (when you conquer/lose land) and also borders shown on a minimap.
Thinking of ways to do this. Maybe something similar to the flashlight effect I have seen in some games? (light is different within a ratius of the 'lamp'/similar object).

Any suggestions? And specific coding?
Also, does the latest version of AGS help with this? :)
Title: Re: Borders for main map & minimap coloured border. How to?
Post by: Crimson Wizard on Mon 17/06/2019 23:19:57
I assume it's a tile-based game?

If I understood the problem right, you perhaps need to have several data layers for your map, e.g. one layer for terrain, one layer for units, one layer for visibility etc.
Then each tile (map cell) is drawn individually, layer after layer (or draw black cell if it's not visible). If visibility in particular cell is partial (aka fog of war) you first draw terrain and then apply shade effect with a translucent sprite.

Minimap is basically a minimized map, so you divide it in cells similarily, where 1 pixel of minimap corresponds to NxN real map cells, and then draw these pixels same way you draw map ,only using simplier gfx or just colors instead of tiles and sprites.

My advice is: try to think of every feature as of an additional cell state. For example, in case of changing borders: remember which cells the border is at, then you can draw some markers on these cells to indicate the border.
Title: Re: Borders for main map & minimap coloured border. How to?
Post by: KyriakosCH on Tue 18/06/2019 20:13:18
Thank you, CW :D