Greg_Malone
Thanks for the 0.13.0 update, Bjorn. The new features and fixes look very useful. Eager to give it a spin in the near future.
Best.
Greg Malone
Thanks for the 0.13.0 update, Bjorn. The new features and fixes look very useful. Eager to give it a spin in the near future.
Best.
Greg Malone
Is the tilecount an optional field of tileset or part of a name-value properties list? The format document is lacking in that regard.
1 replyThis is what it looks like in the TMX file:
<tileset firstgid="1" name="Orthogonal01_32x32_32x32" tilewidth="32" tileheight="32" tilecount="360">
It’s an additional attribute that you can choose to ignore. Most TMX readers will not have been updated to read this property at this time, but some may need or want to use it in order to allocate tileset memory ahead of time. In TilemapKit I simply calculate the tileCount from image width/height as well as tileset spacing, margin and grid size. So for my purposes it comes a little too late.
Well, that only works for tilesets based on a single image, not for image collection tilesets. :-)
But indeed, this tilecount
attribute is purely optional. It’s just there if somebody wants to use it, but really it would only save a few not generally noticeable memory allocations. Actually if you’re that much into speed, you probably want to implement a custom map format for your game.
Oh right. I keep forgetting about the image collections.
Hmmm I still have three more hours on the train. I think I’ll use that to finally update tile indexing based on filename rather than GID for proper “image collection turned into texture atlas” support.