jorgesereno Posted January 9, 2015 Share Posted January 9, 2015 Hi,taking for example an array like this:initPlatformMap = [ [0,0,0,0,0,0,0,0], [0,1,1,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,1,1,0], [0,0,0,0,0,0,0,0] ];how can i create a tilemap on screen replacing the 1's with an image and then move the tilemap up and randomly generate the next lines? Link to comment Share on other sites More sharing options...
spencerTL Posted January 9, 2015 Share Posted January 9, 2015 It has been a while since I did it but I started down this route once and if I remember correctly I created a blank tilemap and then used putTile to place tile types. Not only was it a while ago but also it caused a major performance hit while this looped through placing the tiles so I left it and did something else. It did have the desired result though just with a multiple second lag while it ran.This was before Phaser 2 so it may be more efficient now or there may be a better method that I didn't discover but I'd recommend looking a putTile() as a starting point. Link to comment Share on other sites More sharing options...
Recommended Posts