johann_dev Posted April 25, 2017 Share Posted April 25, 2017 I'm working on an endless runner than uses multiple tilemaps as segments in order to achieve a procedurally generated effect. I'm copying tile data from a buffered tilemap (not being rendered) and pasting that data to another tilemap (currently being rendered) but not all the tiles show up. I copy and paste the tiles in three separate batches. The first batch works fine. The second and third batch of tiles don't render at all, but the collision tiles still work. All the tiles are copied from the same tilemap. Attached is the relevant file. Runner.js Link to comment Share on other sites More sharing options...
johann_dev Posted April 25, 2017 Author Share Posted April 25, 2017 Bump Link to comment Share on other sites More sharing options...
MikeW Posted April 25, 2017 Share Posted April 25, 2017 Never done code like this but have some general questions. Can you via the console confirm the data is where you think it is. That the level you are on is where you think it is (I had a recent problem when I went to level 2 from level 1 I ended up on three). Can you use the console to manipualte things and manually change the tiles - then click on the brower to see what it updates too? Link to comment Share on other sites More sharing options...
johann_dev Posted April 25, 2017 Author Share Posted April 25, 2017 I've tried manually debugging what's in the tilemap and it's pretty difficult to parse. From what I can see, all layers of my "worldMap" are correctly populated with tiles and seemingly all the tiles I'm expecting to not be blank have indices != -1 and alphas of 1. So it definitely looks like all the information is there. Link to comment Share on other sites More sharing options...
johann_dev Posted April 25, 2017 Author Share Posted April 25, 2017 (edited) I figured out the problem: I wasn't creating layers for the buffered tilemaps (the ones not being rendered) once I did that everything showed up correctly. I'm still very confused why this is, as I didnt need to create the collision layers, and they still worked. Nevermind the problem still persists. I thought I had found a fix but I was wrong. Edited April 25, 2017 by johann_dev Link to comment Share on other sites More sharing options...
Recommended Posts