Faktori Posted May 6, 2016 Share Posted May 6, 2016 Hello, I've been working on a game for 2 weeks. In this game, there will be several maps / levels (2 atm). I want the player to be able to go from one map to another, and back to the first map again. I'm using one game state for each map with a create function that creates every game object the map needs. So basically it recreates everything when I go back to a map I already visited, and it feels so WRONG ! Do you have any idea on how to improve this ? Is there a way to 'freeze' a state when I change map, and 'unfreeze' it when I go back to it ? Or should I merge those in one huge map ? here's the game so you can have a better idea of what it is (if some assets aren't loaded when the game starts, reload the page. This is an issue i'll be correcting soon). Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted May 6, 2016 Share Posted May 6, 2016 Read this: http://phaser.io/docs/2.4.7/Phaser.StateManager.html#start Link to comment Share on other sites More sharing options...
Recommended Posts