# Infinite Runner

**URL:** <https://forum.makecode.com/t/infinite-runner/14967>\
**Category:** Arcade\
**Created:** [August 17, 2022, 5:20pm UTC](https://forum.makecode.com/t/infinite-runner/14967 "2022-08-17T17:20:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![chino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chino/32/3126_2.png) [@chino](https://forum.makecode.com/u/chino)\
**Post date:** [August 17, 2022, 5:20pm UTC](https://forum.makecode.com/t/infinite-runner/14967/1 "2022-08-17T17:20:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [August 17, 2022, 6:13pm UTC](https://forum.makecode.com/t/infinite-runner/14967/2 "2022-08-17T18:13:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chino/32/3126_2.png) [@chino](https://forum.makecode.com/u/chino)\
**Post date:** [August 17, 2022, 9:18pm UTC](https://forum.makecode.com/t/infinite-runner/14967/3 "2022-08-17T21:18:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chino/32/3126_2.png) [@chino](https://forum.makecode.com/u/chino)\
**Post date:** [August 18, 2022, 4:15pm UTC](https://forum.makecode.com/t/infinite-runner/14967/4 "2022-08-18T16:15:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [August 18, 2022, 4:15pm UTC](https://forum.makecode.com/t/infinite-runner/14967/6 "2022-08-18T16:15:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [August 18, 2022, 4:59pm UTC](https://forum.makecode.com/t/infinite-runner/14967/7 "2022-08-18T16:59:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![isoffline](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/isoffline/32/8791_2.png) [@isoffline](https://forum.makecode.com/u/isoffline)\
**Post date:** [August 18, 2022, 5:38pm UTC](https://forum.makecode.com/t/infinite-runner/14967/8 "2022-08-18T17:38:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chino/32/3126_2.png) [@chino](https://forum.makecode.com/u/chino)\
**Post date:** [August 22, 2022, 3:04pm UTC](https://forum.makecode.com/t/infinite-runner/14967/9 "2022-08-22T15:04:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [August 22, 2022, 4:25pm UTC](https://forum.makecode.com/t/infinite-runner/14967/10 "2022-08-22T16:25:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [August 22, 2022, 4:26pm UTC](https://forum.makecode.com/t/infinite-runner/14967/11 "2022-08-22T16:26:22Z")

</div>

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

> [@Help with tile centering](https://forum.makecode.com/t/help-with-tile-centering/3279/5):
>
> Here’s the game if anyone wants to try it out:
