Posted June 19, 2024 by Clever Cat Games
#metroidvania #map
Adding a map system to the game has been on my to-do list for a long time and I wasn't sure it was going to make the cut. The level structure has quite a few individual rooms that can be entered through doorways. This poses a challenge as many of the rooms are grouped in long horizontal levels so automatically assign a map coordinate wouldn't work as they aren't consecutive in-game. I needed to figure out how to assign map locations to each screen.
You can see that each area has a gray box around it which is an object I can use to assign properties for an area. Each box contains an x/y coordinate for the map location that it belongs to (not shown). This map then gets processed through a python script to generate data for the game to read. The data includes things like metadata, tiles, objects, and now map coordinates.
If a level isn't segmented like the one shown above I can set an x/y value in the global level properties and automatically calculate the map position for every screen. However, with the ability to set x/y positions manually I can overlap areas. When you enter a room it will keep the same x/y coordinate if that's what makes the most sense. Which brings me to the pause screen.
You can see the new map system in action at the bottom of the image. It shows where you start in the demo, inside a room. I played around with a lot of map designs and landed on boxes for several reasons. The first being that it takes a minimal amount of graphic space and some areas are rather wide. The arrows are showing horizontal screen transitions.
Let me know what you think!