Movatterモバイル変換


[0]ホーム

URL:


Tilengine

Tilengine

Tilengine 2.14: new SNES-style layer window

Tilengine »Devlog

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 exampleLayerWindow(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 sampleLayerCircle(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

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