0.9.0
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 pixelsTEXTURE_SIZE- is the size of the texture in pixelsFRAME_SIZE- (vertex only) is the size of the images's crop in pixelsCHANNEL_0_POSITION- the position of the texture on the atlas in UV spaceCHANNEL_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: Addedcontains(point)method (isPointWithinis now a delegate to contains)Layers: Added repeating nodes methods so you don't need to declare a list.Point: AddedtoSizemethod- Top-level aliases for
StorageEvent&AssetEventcompanion objects - Removed all instances of the old
hashfield.