Open raycrasher opened 5 years ago
Interesting idea! Solid implementation outline too.
Some quick thoughts on the impact:
Tile
is currently 4 + 4 + 2+ 1 = 11 bytes big and should be optimized for size. The two rotation enums could fit into a single byte, which is pretty good. Still, it's not free.I guess I'm just trying to say, we should make sure the feature would be put to good use when implemented, especially since everyone will pay for it regardless of whether it is used. Would be interested in everyone's thoughts on this:
Thank you for the insight!
What are the main use cases / examples, e.g. when would you need or want to rotate or flip a tile?
Right now, it is most useful only on completely top-down maps where the camera is looking straight down the z-axis.
How many tiles in a tileset will typically be rotated or flipped?
An example from http://www.cr31.co.uk/stagecast/wang/3corn.html state that an 3-edge Wang tile set would be reduced from 81 tiles to 24, if rotations are supported.
Would it be viable for the user to just add rotated or flipped variants of tiles they need to the tileset manually?
After doing some thinking and testing, this is actually the best approach. Texture space is cheap, performance hits is not.
How big would the overlap with the existing AutoTiling feature be? Could this be useful to achieve the same effect at "zero impact"?
I did not consider this. I guess a lot of AutoTiling code would be changed also.
From the above, I guess it's better to create an editor plugin that generates the full tileset from an initial set of tiles. This way, impact is virtually nil.
Summary
The ability to rotate and flip tiles in Tilemaps would greatly simplify tilesheet creation and reduce texture sizes, especially for top-down maps.
Modification points: