Hi, I’m working for some time on one bigger game in phaser 3, and I have some doubts when it comes to scenes, so I would appreciate your opinion on this.
I’m planning to have for the beginning a couple of different maps for example like town, house, forest, etc, etc. totally new map. Usually, so far I created each map using the scenes, each map is a different scene, and when you go and walk and load another map, the game will switch to another scene. All maps are quite dynamics, you start with basic and you can build and change them however you want.
So I was thinking is that a good approach to use different scene for each map, or to save map data into JSON, use just one scene, where objects are removed and generated again to form different maps?
Hi,
It depends…
If you have a few maps, a scene per map works.
If you use 100 maps interconnected like in a metroidvania, i prefer to just use one scene.
you can create a giant map with several small maps inside and teleport the player
but if you are going to draw a map and have a file for each scene, i really think it will be necessary to have a primary scene to load and destroy scenes, mainly to not lose parameters like fullscreen
my game can be a good example, try to check it out