dummymeuporg/dummyeditor

Use only one byte for tilesets coordinates

Closed this issue · 3 comments

Ge0 commented
Use only one byte for tilesets coordinates

Does that mean you want only 255 possibilities to encode the position of a tile?

Ge0 commented

127, actually. :)

Our tilemaps are small enough to contain at most 127 tiles. As a matter of fact, this file — https://i.imgur.com/lEfxEcW.png — is 856 pixels wide, which is 856 / 16 = 56 possible tiles (from 0 to 55 then).

I would like to use signed chars, so if the char's value is below 0, we don’t pick any tile (that is already the case).

And after a quick talk with @Grindewald23 we thought that using two bytes to get a tile's abscissa / ordered is both too much and lead to an oversized file.

I’m open to any suggestion though. :)

Ge0 commented

It’s done here and as much as in the libdummy.