12-20-2018, 12:55 AM
I've been continuing to play around with Tilengine. During the course of my experimentation, I ran across a limitation. I don't think it is a bug, but I would like to know why the limitation exists, and whether or not it can be altered in a future release.
When designing tilesets for use with Tilengine, you have to make sure the dimensions of your tiles are a power-of-two. This limitation seems to be specific to the tile dimensions in the tilesets, and not the dimensions of the image file. The image file can be whatever, but if the tiles are not a power-of-two, the engine chokes. For instance, your individual tiles can be 8x8 pixels, and 16x32 pixels, and even 256x4 pixels. But they can't be 24x24, or 7x12, or even just 48x48. If either the width or the height is not a power-of-two, you're cruising for an engine crash.
I would imagine that this is related somehow to the performance of the tilemap rendering. I can work within these limitations for the time being. But it would free me up somewhat to be able to use non-power-of-two dimensions with tilesets and tilemaps, if it is possible. I'm in the process of cooking up some interesting uses for the tilemap structures to flesh out ways in which Tilengine can be used.
When designing tilesets for use with Tilengine, you have to make sure the dimensions of your tiles are a power-of-two. This limitation seems to be specific to the tile dimensions in the tilesets, and not the dimensions of the image file. The image file can be whatever, but if the tiles are not a power-of-two, the engine chokes. For instance, your individual tiles can be 8x8 pixels, and 16x32 pixels, and even 256x4 pixels. But they can't be 24x24, or 7x12, or even just 48x48. If either the width or the height is not a power-of-two, you're cruising for an engine crash.
I would imagine that this is related somehow to the performance of the tilemap rendering. I can work within these limitations for the time being. But it would free me up somewhat to be able to use non-power-of-two dimensions with tilesets and tilemaps, if it is possible. I'm in the process of cooking up some interesting uses for the tilemap structures to flesh out ways in which Tilengine can be used.