AlexLi Posted October 24, 2014 Share Posted October 24, 2014 Hey everyone, I've been using phaser for a few days now and I really love it! Now my question:How do I put severals Tilemaps together so that they act like a single map? I'd like to have the option of an infinite, self generating map.My first idea was to have like 20x20Tiles large Tilemaps (chunks) which, when the player reaches the edge of each chunk, call the next chunk so that the player can move seamlessly through the map. And if this chunk doesn't exist yet, an algorithm creates it on the fly. This does also allow me to load the chunks dynamically, so that the players in a multiplayer mode don't have to load the entire map at once. So far, so good. But I didn't find any method in the phaser documentation which allows me to realise this idea. The few forum topics which also concern this idea didn't help either. (Neither this one nor this one). Instead of going on and writing my own tile-engine I hope that you might have an idea on how to realise this without reinventing the whole wheel Hope you can help me! Thank you in advance! (Sorry for my bad english. If something is unclear please tell me.) best regards,AlexLi Link to comment Share on other sites More sharing options...
totor Posted October 25, 2014 Share Posted October 25, 2014 A tilemap is ... a map of tiles. you have the tiles (sprites, textures, etc) and the map (a csv file) if you change the csv or create one and load it when you need you have what you want. Link to comment Share on other sites More sharing options...
marrobin Posted January 9, 2016 Share Posted January 9, 2016 I've created a procedurally generated, chunked 2D tilemap using Phaser. It stitches serveral tilemaps together like you were trying to do, so it should help you out: https://github.com/marcus-robinson/chunk-map Link to comment Share on other sites More sharing options...
Recommended Posts