Microsoft MakeCode

[bug] can't make tilemaps that would use 8x8 tiles

when you select the tilemap editor, default is 10x8 and if you click the tilemap size button, it goes to 16x16 nad 16x32 etc but not ever to 20x15

if i hand edit the javascript the 8x8 tiles display as if they were 16x16

how can i get 20x15 (which would correspond to 160x120 in 8x8 tiles)

here’s the code in question https://makecode.com/_MjCR6vRmb40t

Currently, the tile map is pretty hard coded for 16x16 tiles for performance reasons - a lot of the calculations are made significantly quicker by bit shifting / etc.

That said, 8x8 would also work for perf as it’s still a power of 2, and most of the values are already generalized pretty okay to support switching the size (though I’m not sure on how we’d have blocks to support that without things getting wonky - maybe just an optional parameter that lists out 8x8, 16x16, 32x32). Will take a look at this to see what we can do :slight_smile:

(partially there https://github.com/microsoft/pxt-common-packages/pull/855)

com-resize%20(11)

2 Likes

saweeet - i found another oddity to test tile colisions. - will make new thread

@ladyada 8x8 tiles are now in beta, just change the size with the optional on set tile map to:

56

The image editor default sizes for those blocks should include the proper sizes for 8x8 - for tiles and a couple tile map sizes (20x15 and 40x15), they’ll just be at the ‘end’ of the list.

1 Like

looks great, ill try it!