Download

The best way to transition from a world map to a combat map

As said in the title, I’m looking for a way to transition from a world map to a combat map like in Final Fantasy or Pokemon.

The way I see it, there is 2 options:
1- You save your game with a SaveGame object to save the state of the World Map, then load a new level to go into a Combat Map and when the combat is over, save the result somehow and load the World Map and set the character at the right places and everything.

2- Teleport the camera somewhere away from the World Map where I would have a setup for the Combat Map.

I tend to go with number 1 since I have to save the Combat Map state as part of my saving system so it won’t be extra work for me. Question is: how do you pass variable (like which character are fighting, what terrain is the fight happening on) to a new level so you can load the right asset?

Also, during my research on how to do this, I found the WorldContext object. Can I save the WorldContext and call it a day or do I have to save each character with their position and current status and everything?

If there is a better way, feel free to point me in the right direction.