Movatterモバイル変換


[0]ホーム

URL:


Tilengine

Tilengine

Tilengine 2.12 released: Tile & sprite 90º rotation

Tilengine »Devlog

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

Buy Now$5.00 USD or more

Tilengine

2D retro grapics engine with true raster effects for creating 8/16 bit style games

Add Tool To Collection

More posts

See all posts

Leave a comment

Log in with itch.io to leave a comment.

itch.io·View all by megamarc·Report
TilengineBlog

[8]ページ先頭

©2009-2025 Movatter.jp