# More than one tilemap loaded with Split-Screen extension?

**URL:** <https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459>\
**Category:** Arcade\
**Created:** [March 15, 2023, 6:25pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459 "2023-03-15T18:25:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salex/32/15835_2.png) [@Salex](https://forum.makecode.com/u/Salex)\
**Post date:** [March 15, 2023, 6:25pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/1 "2023-03-15T18:25:57Z")

</div>

For a game mechanic, I’d like to know if the possibility of more than one tilemap being used at the same time is possible with this:

> [@\[Extension\] arcade-split-screen](https://forum.makecode.com/t/extension-arcade-split-screen/14970):
>
> Hey folks! Here’s a little extension that @Lucas_M-DangerKitty asked @jwunderl and I to whip up on stream today: riknoll/arcade-split-screen This adds one block that lets you enable split screen for your multiplayer game. [splitscreen]

(I have a strange feeling that I’ve asked this somewhere before, but idk)

---

<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:** [March 15, 2023, 9:41pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/2 "2023-03-15T21:41:41Z")

</div>

No. Tilemaps are global. The split screen is essentially just another camera, independent of the main camera normally used.

---

<div class="post-metadata">

**Author:** ![Salex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salex/32/15835_2.png) [@Salex](https://forum.makecode.com/u/Salex)\
**Post date:** [March 16, 2023, 5:12pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/3 "2023-03-16T17:12:17Z")

</div>

So, if I wanted the effect of different tile maps, I’d have to compile them all into one tile map?

---

<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:** [March 16, 2023, 8:53pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/4 "2023-03-16T20:53:57Z")

</div>

Yes. You can use walls to separate the players.

---

<div class="post-metadata">

**Author:** ![Salex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salex/32/15835_2.png) [@Salex](https://forum.makecode.com/u/Salex)\
**Post date:** [March 20, 2023, 5:41pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/5 "2023-03-20T17:41:15Z")

</div>

Ok, thanks. I needed the impression of multiple tilemaps as a game mechanic, so this limitation is fine with the idea of multiple tilemaps. It probably means I’m gonna have to scrap my procedural tilemap generator which I planned to incorporate, though?

---

<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:** [March 20, 2023, 6:06pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/6 "2023-03-20T18:06:09Z")

</div>

No, just have the procedural generator work within certain bounds.

---

<div class="post-metadata">

**Author:** ![Salex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salex/32/15835_2.png) [@Salex](https://forum.makecode.com/u/Salex)\
**Post date:** [March 22, 2023, 5:25pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/7 "2023-03-22T17:25:57Z")

</div>

Ok, thanks!

For sake of “I want this game done soon” I’ll probably only use procedural generation for single player mode.

In advance, how many individual tile maps could I put into one before the editor gets mad at me?

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [March 22, 2023, 5:45pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/8 "2023-03-22T17:45:13Z")

</div>

@richard do we have one somewhere? I know we have a limit of 256 on number of tiles in one tilemap, but closest I can think of right away would be image dimensions for the img of walls which in theory should be 65536x65536 but will be limited by browser buffer length restrictions far before that re: [https://github.com/microsoft/pxt-common-packages/pull/930](https://github.com/microsoft/pxt-common-packages/pull/930) . (e.g. size 10000x10000 images work, by some definition of working at least [https://arcade.makecode.com/S47595-96505-03530-06434](https://arcade.makecode.com/S47595-96505-03530-06434))

In practice… don’t use one that big please [: it also just won’t run on hardware at all past a point because the allocations would be too big to hold in memory (e.g. the screen itself takes up a little under 10kb of memory and many of the devices are only around 100kb in the first place)

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [March 22, 2023, 5:55pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/9 "2023-03-22T17:55:56Z")

</div>

yeah, there is no limit on tilemap size but as joey mentioned, try to stay within the bounds of reason!

---

<div class="post-metadata">

**Author:** ![Salex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salex/32/15835_2.png) [@Salex](https://forum.makecode.com/u/Salex)\
**Post date:** [March 23, 2023, 5:07pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/10 "2023-03-23T17:07:06Z")

</div>

How much lag?

and

If I hack my raspberry pi to have, like, 10 times the component power, still possible?

and finally

Using images, do you mean making an image tile map and using smth like Tile utils to cover each colour with a specific tile?

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [March 23, 2023, 5:24pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/11 "2023-03-23T17:24:03Z")

</div>

The image I was referring to is internal to the tilemap – the way we store where the walls are internally is an image with pixels set to a certain color if the location is a wall.

The easiest way to check is to try 🙂 e.g. the link I put in the previous message has a 10000x10000 image, it’s just incredibly slow. You can most likely get away with a 1000x1000 in the browser without too much impact, but it will definitely not work on hardware (I’d have to double check on raspberry pi how much memory we allow you to allocate, but similarly just trying and scaling back if it doesn’t work is the easiest solution).

---

<div class="post-metadata">

**Author:** ![Salex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salex/32/15835_2.png) [@Salex](https://forum.makecode.com/u/Salex)\
**Post date:** [March 23, 2023, 5:26pm UTC](https://forum.makecode.com/t/more-than-one-tilemap-loaded-with-split-screen-extension/18459/12 "2023-03-23T17:26:43Z")

</div>

Ok, thanks!
