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
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
- Tilengine 2.12 released: Tile & sprite 90º rotationNov 01, 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.