Tilemap Copy/Pasted tiles not rendering

Recommended Posts

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.




Share this post

Link to post
Share on other sites

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?

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

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 by johann_dev

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.