Tilengine 2.12 released: Tile & sprite 90º rotation
This release adds a new feature: Tiles on a tiled layer and sprites can be drawn rotated 90º applying a specific flag in its attributes.
This flag existed for Tiled editor compatibility but was not used. Now the renderer processes it accordingly. Combining it with horizontal and vertical flip flags allows to rotate tile brushes and sprites in steps of 90º.
Using rotated tiled brushes in Tiled editor renders correct results.
This screenshot shows a single tiled brush drawn with all combinations of rotation, horizontal and vertical flip flags, and and the same "eagle" sprite using combination of flags to simulate all possible rotations in 90º steps clockwise.
The code for the applying the four rotations is this:
TLN_ConfigSprite(0, spriteset, 0); TLN_ConfigSprite(1, spriteset, FLAG_ROTATE | FLAG_FLIPX); TLN_ConfigSprite(2, spriteset, FLAG_FLIPX | FLAG_FLIPY); TLN_ConfigSprite(3, spriteset, FLAG_ROTATE | FLAG_FLIPY);
Right now this feature has the following restrictions:
- Layers with simple scaling applied won't rotate tiles. The other modes -normal, affine transform and pixel mapping) apply it correctly
Only squared -same width and height- and non-scaled sprites are rotated. - These limitations may be removed in future version, but for the time being I prefer not to delay this release.
Hope you enjoy it!
Files
Get Tilengine
Tilengine
2D retro grapics engine with true raster effects for creating 8/16 bit style games
More posts
- Tilengine 2.15.2 releasedAug 29, 2023
- Tilengine 2.15 releasedApr 22, 2023
- Tilengine 2.14: new SNES-style layer windowFeb 10, 2023
- Tilengine 2.13 with per-tile palette selectorNov 12, 2022
- Feature preview: tile & sprite 90º rotationOct 30, 2022
- Tilengine 2.11.3 bugfix releasedOct 30, 2022
- Tilengine 2.11.0 releasedOct 03, 2022
- Tilengine 2.10.0 releasedSep 30, 2022
- Preview of new CRT effectAug 21, 2022
Leave a comment
Log in with itch.io to leave a comment.