Mini Tilemaps extension

I’ve made an extension that allows for mini tilemaps within tiles! Sprites with the spritekind “AffectedByPhysics” will be affected by these tilemaps. Any color of the image is a wall, and clear is not a wall. Too many mini tilemaps can get laggy (but only if there are many). I’ve worked hard to get this math efficient, but this extension includes the exact hitbox of the sprite, not a square hitbox. It’s compatible with any size of sprite (although big ones lag). This extension functions almost exactly like normal tilemaps, so for platformers your character will NOT auto-run up small ledges/inclines (without you coding it manually). Enjoy! (I worked a long time getting this to function correctly). Link:
kiwiphoenix364/pxt-mini-tilemaps
Type (or copy/paste) this into the search bar at the top of the extensions page, and click on the extension that appears.

6 Likes

can you make a demo pls

5 Likes

I made 2 demos, but for some reason the blocks don’t come up in the toolbox (most of the time) when you download the extension! @richard I think that’s a bug, because when I copy/paste the code into a regular (separate) .ts file, it works just fine! (as I did in the demos below)

A cool thing is that, when you change tilemaps, it resets all of the custom collision! Also, I updated the extension to be MUCH more accurate!

4 Likes

btw that is AWESOME and ive been trying to use it in an isometric tilemap thing because for that this is perfect so thanks

but just wondering is there a way of making slopes out of this almost because i tried to see if i could make a hitbox animation that could almost climb the pixels but it didnt seem to work and sadly whenever i added this extension and logged back onto my computer later on ,that project would delete the extension and its blocks and all of the art ive done in the game wich is incredibly frustrating.

2 Likes

Yeah, idk why the bug where the blocks disappear happens, but if I put the extension files into normal .ts files (as I did in the demos), it works just fine. Also, for slopes to be in the extension, I’d probably have to make some big changes (and optimizations) to the code. Stay tuned though, because I’ll be back soon and working on MakeCode projects again.

2 Likes

how do you put them in .ts files?

By copy/pasteing them into typescript files, like I did in the demos (you could just clear all blocks in one of the demos if you want.)

Okay thank you