Kir13y Posted May 21, 2015 Share Posted May 21, 2015 I have a game that I am working on and I want it to have different levels. When the player collides with the door sprite I want it to load up the next level. Could you put the code on how to do that? Thanks P.S. Sorry im a newb... Link to comment Share on other sites More sharing options...
Kir13y Posted May 21, 2015 Author Share Posted May 21, 2015 I found this: http://www.html5gamedevs.com/topic/5446-how-to-create-multiple-levels/ but I don't know how to implement it. Link to comment Share on other sites More sharing options...
drhayes Posted May 22, 2015 Share Posted May 22, 2015 Are you using tilemaps? Whatever you're doing to load the first level you'll have to do to load the second, too. You should probably call "game.world.removeAll();" to get rid of all the stuff loaded for the first level. Link to comment Share on other sites More sharing options...
Kir13y Posted May 23, 2015 Author Share Posted May 23, 2015 Are you using tilemaps? Whatever you're doing to load the first level you'll have to do to load the second, too. You should probably call "game.world.removeAll();" to get rid of all the stuff loaded for the first level.Yes I am goind to be using tilemaps (.json) made from tiled map editor and I will give this a try. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts