Tilengine 2.14: new SNES-style layer window
Release 2.14 of Tilengine adds a new layer window feature, based on the actual SNES hardware.
This feature extends original layer clipping that was already implemented in Tilengine. However, layer windowing is much more powerful:
- can be set to normal o inverse: instead of clipping the outside, it clips the inside
- color math with clipped region: the cut-out region can be set to one of three modes:
- transparent: by default, the underlying layer can be seen where the upper layer is cut (same as classic layer clip)
- solid color: the masked region can be filled with a constant color
- color math: the masked region is set to one of available color blending modes, combining a solid color and the underlying layer
New example LayerWindow (https://github.com/megamarc/Tilengine/blob/master/samples/LayerWindow.c) allows to play with combinations of features:
- Outside clipping, shows the underlying layer. Equivalent to classic "layer clipping"
- Inverse clipping (clips the inside) with blue color applied with blending function to the inner hole
Using raster effects to modify the window edges on each scaline allows free-form clipping, the same trick used in Super Mario World where a circle and keyhole shapes scaled up and down to create a transition between layers.
These screenshots from new sample LayerCircle (https://github.com/megamarc/Tilengine/blob/master/samples/LayerCircle.c) allow moving a circle and change its radius to mask the main layer, filling the outside part with blue:
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.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.