Node231 Posted May 20, 2016 Share Posted May 20, 2016 Hey all! I've created a level using Toast Editor and want to import it into phaser. Toast editor even has a special option for phaser as you can see here! My question is, once I have my level designed and I export the file, say I have something plain like: (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0); how do I go about adding this to phaser? Do I need to add the tile and give the name '0' in the preloader? How would I make phaser create the level? Sorry for the noob question, it will be the last thing I ask here. Thank you for any help! Link to comment Share on other sites More sharing options...
WombatTurkey Posted May 20, 2016 Share Posted May 20, 2016 Don't want to be that guy, but why use the Toast Editor? Phaser can read json files generated from the map tiled editor, and it supports much more features. Link to comment Share on other sites More sharing options...
Node231 Posted May 20, 2016 Author Share Posted May 20, 2016 43 minutes ago, WombatTurkey said: Don't want to be that guy, but why use the Toast Editor? Phaser can read json files generated from the map tiled editor, and it supports much more features. This sounds great! I'm new to JS and phaser so I apologize if this a supremely stupid question, but Is the map tiled editor you are talking about this? http://www.mapeditor.org/ Just wondering what features it can support? Something that's been bugging me in development so far is that I have been using invisible sprites to act as a "ground", can I bypass this? What you suggested sounds nice and I'll check it out tomorrow, do you know any good examples or tutorials? Thanks a bunch! Link to comment Share on other sites More sharing options...
hexus Posted May 20, 2016 Share Posted May 20, 2016 You might find these examples quite useful http://phaser.io/examples/v2/category/tilemaps Link to comment Share on other sites More sharing options...
Umz Posted May 21, 2016 Share Posted May 21, 2016 Haven't done any tiled map stuff, so can't really help on the issue: But I found this video on importing from Tiled, maybe it will give you a hint into using it in Phaser coupled with the examples for Tiled Maps. Link to comment Share on other sites More sharing options...
Recommended Posts