Release 2.7.0 - sprite list order & sprite masking


Release 2.7.0 introduces two new features inspired on the Sega Genesis/MegaDrive and some tweaks & bugfixes

Sprite list order

Until now, sprites were drawn based in their order ID so when overlapping, sprite 0 was always under sprite 1, and sprite 2 was always on top of sprite 1. This release introduces the ability to change sprite ordering based on internal link list. Function TLN_SetFirstSprite() sets the index of the beggining of list, and TLN_SetNextSprite() tells which sprite follows which one. If you want that sprite 1 is drawn after sprite 4 (on top of it), you call TLN_SetNextSprite(4, 1).

Sprite masking

Now it's possible to define a horizontal region to mask out selected sprites with TLN_SetSpritesMaskRegion(top, bottom), setting a top and bottom scanline. Sprites flagged with TLN_EnableSpriteMasking() won't be drawn when crossing this region. The Sega Genesis had a cumbersome way to enable this feature, using specially positioned sprites on the screen and inside the sprite list order, but Tilengine does the same in a straightforward way.

Other tweaks and fixes include:

  • Fixes crashes when closing window and strange input behavior due to compiler-induced bugs with optimizations enabled for 64-bit builds
  • When CRT effect is disabled, sharp nearest-neighbour scaling is always used
  • Parameter "count" has been removed from TLN_CreateSpriteAnimation(), now is obtained automatically from sprite names inside spriteset.
  • Reworked some samples that used old and messy .sqx files for sprite animations, and replaced with newer spriteset-based sequences.

Files

Windows 32-bit 676 kB
Apr 26, 2020
Windows 64-bit 748 kB
Apr 26, 2020
Linux ARMv7l (Raspberry Pi, BeagleBone...) 371 kB
Apr 26, 2020
Linux Desktop 32-bit 388 kB
Apr 26, 2020
Linux Desktop 64-bit 381 kB
Apr 26, 2020

Get Tilengine

Buy Now$5.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.