bcvery1 / tilepix

Library for combining tiled maps with pixel
MIT License
46 stars 14 forks source link

Handle tileset margins and spacing #59

Closed bcvery1 closed 5 years ago

bcvery1 commented 5 years ago

TileSets can have margins and tile spacing. This is currently unhandled, so tile sprites will be incorrect if either of these values are set.

The calculation is done in utilities.go, but the calling code is in tile.go in the function Draw which already takes a *Tileset parameter, shouldn't be difficult to calculate the offsets

perber commented 5 years ago

Hello, I`m actually using your library and I would like to create a PR which adresses this issue. My map is currently using a 1pixel spacing.

bcvery1 commented 5 years ago

Hi @perber - sorry about getting back to this so late! That's great to hear that TilePix is being used.

Hopefully we can get your PR merged soon so you can make use of the spacing on your tileset