The Map


The main task for me this week was handling the in-game map for the game. There were several problems to overcome. Namely saving data to the player map, indicating which room the player was in, giving certain tiles map IDs, and properly displaying the room connectors when an adjacent room is visible. This was an important feature to implement as our game is a Metroidvania. Without a map it is easy to get lost and then subsequently frustrated.

The easiest of the solutions to the aformentioned issues was indicating to the player which room they are in. When the map is enabled, it would take the current scenes map ID and search the map list for that id. Then any map tiles under that id would have its sprite renderer flash black periodically to say to the player "Hey you are over here".  Additionally, each of the six zones in the game have a 'center' point on the map. That means that the map on enable will take the first 2 characters of the id and change the maps default position based on that. This way, whenever you open the map, it will show the player where they are currently and their surroundings. Following up after that issue, it was simple enough to implement the room connectors. They simply took in two room id's and if either of them were flagged as visited, then the room connector sprite would also be visible. It was important to add this as it gives the player a better idea of where they have not explored before or even hints at secret paths. Now to circle back to map id's. Every single playable scene has an associated id stored within a list. The list is saved to the save manager and will be accessed whenever the map is enabled. This list is searched for rooms flagged as true to display or otherwise not display. 

Other additional elements added were zone unique colors and hand drawn zone names to better indicate to the player where they are.