How can I efficiently place multiple tiles on a tilemap at runtime in MakeCode Arcade?

Hi everyone,

I’m building a cryptic platformer in MakeCode Arcade. I want to place multiple tiles at runtime instead of manually in the editor.

Manually creating a tilemap for each of several levels (a hundred levels) is inefficient. I want to store each level as text and have a decoder place an 8x8 section in an empty tilemap for each letter in the code. Placing each tile one by one (for each section) at runtime is tedious. Ideally, this should be easy to read and modify.

Can anyone recommend a specific extension or built-in feature that efficiently places multiple tiles on a tilemap at runtime, especially for decoding level data stored as text?

We’ve done similar things on stream before, but i don’t believe we’ve wrapped it in an extension (or that i’ve seen others do so) – arcade-tile-util has some features that’d make it easier but doesn’t cover composing them into one.

@richard could be a reasonable 1 stream extension or tile utils addition maybe (and also tagging in case you remember something specific i’m forgetting that could handle this already)

4 Likes

Thanks! This was helpful in what I was trying to achieve. I was able to do this code that copies each tile to the current tilemap (_origin is where it’s placed).

2 Likes

Are you talking about “stamping” one tile map one another? Sort of how images
draw my image on my image 2? If you are doing tlemaps, it would be awesome to add some blocks that make it easier to check around a location. I always hate doing nested if else blocks just to check the 8 squares around the player.

1 Like