Infinite Runner

Is it possible to have an infinite tilemap that I can manipulate as the player moves forward forever as I procedurally generate the level?

When a player hits a certain position in the tilemap, you can teleport them backwards and “move” (get and set the tiles) the tiles with them and continue to generate them.

Right, but my question is can I expand the tilemap further than it’s current bounds?

Let’s imagine another scenario where we have a procedurally generated world that we can walk in any direction and come back. We would need ability to continue to proceed further outside the bounds of the tilemap.

You can keep generating the timemap, or loop the timemap.

Unfortunately, no - the bound is 256x265 i’m afraid. If you want to save the tilemap you can do as @UnsignedArduino said and stitch a new tilemap when the player reaches a border. You can just keep track of all the tilemaps and have a seemless transition. I don’t have any code samples but you can try to make a proof of concept, as this is just an idea.

No, you cannot dynamically make one tilemap bigger/smaller. (at least within blocks)

cant you just make if you reach a certain point of the map you have to make a new tile map and you will be teleported in the next thing

Switching the tilemap would beak the continuity of flow.

We can’t have multiple tilemaps rendering at the same time can we? That way we could have at least 2 active and swapping around as camera approaches the boundaries?

Also it seems that tilemap images aren’t available as normal images to be used for anything else as well like for making the world pass by as a bunch of projectiles or perhaps if I could place them my self at different locations in the space without the restrictions of a tilemap.

Would be nice to not have all these restrictions?

You could try using a sprite grid, far less efficient but it would be the most promising solution to your problem. It’s listed under the featured extensions in the Extensions tab

I did an infinite runner myself that uses a tilemap, you can look at that possibly:

1 Like