Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

0.9.0

Choose a tag to compare

@davesmith00000 davesmith00000 released this 06 Jul 17:15

Development status: Alpha - expect further breaking changes.

Details of the major changes:

New! Scene Camera (Early preview, feedback welcome)
A simple optional Camera has been added to the SceneUpdateFragement type. The camera allows you to pan across the scene by changing its position and also has a zoom factor you can change.

Current things to note:

  • Zooming the camera affects layers set to different magnifications differently.
  • There is no support for rotating the camera.

Dynamic shader loading
Until now, you could only load shaders at the beginning of the game, but now you can add them dynamically as you can with Fonts and Animations. There is danger here because the Shader will be compiled at the point of loading, and if it fails, your game will crash.

Improved texture support in shaders
Recent efforts to build a shader for roguelike games revealed how difficult it was to work with textures, so we have added new shader variables to make this easier:

  • TEXTURE_COORDS - is still available to avoid breaking things, but redundant, equal to UV.
  • ATLAS_SIZE - is the size of the atlas on which your texture resides in pixels
  • TEXTURE_SIZE - is the size of the texture in pixels
  • FRAME_SIZE - (vertex only) is the size of the images's crop in pixels
  • CHANNEL_0_POSITION - the position of the texture on the atlas in UV space
  • CHANNEL_0_SIZE - the size of the texture on the atlas in UV space

Built-in primitives have Material type param
Breaking change, when you declare something like a Graphic you must now include a Material type parameter, like Graphic[Material.Bitmap].

This makes the modifyMaterial method much more effective as you can avoid a pattern match, at the cost of some minor API noise.

Caching of custom packed UBO data
UBO data must be packed into arrays before being transported to the graphics card. In some cases these arrays are massive and never change, so we now do some simple caching to avoid recreating the arrays if it isn’t necessary to do so, which can result in a performance improvement.

Summary of other changes

Enhancements

  • FPS Counter uses TextBox, making it much easier to use as no special assets or set up is required!

Minor API Improvements

  • Rectangle: Added contains(point) method (isPointWithin is now a delegate to contains)
  • Layers: Added repeating nodes methods so you don't need to declare a list.
  • Point: Added toSize method
  • Top-level aliases for StorageEvent & AssetEvent companion objects
  • Removed all instances of the old hash field.