This Week in Fyrox #18
Fyrox is an open-source (opens new window) Rust game engine with lots of out-of-box game-ready features and a full-featured editor. Last two weeks were mostly dedicated to audio improvements and adding blend shapes support.
# Blend Shapes
Blend shapes allows you to dynamically change 3D meshes; they are widely used in games to create facial animation, to dynamically add details to character body parts, etc. It is quite simple, yet very powerful mechanism, that opens a wide range of possible uses: you can create cut-scenes directly on the engine where your characters will speak using pre-defined set of shapes associated with visemes (opens new window). You can also use this to create characters creator for your game - all you need to do is to specify a set of offsets for desired parts of face and then allow a player to mix these parts with any proportions they like. In other words, actual use of this functionality is limited by your imagination.
# Audio Improvements
Fyrox now uses TinyAudio (opens new window) crate as a sound output backend. This is a new,
tiny crate that serves a single purpose - make audio output as simple as possible. Also, compared to cpal
,
this crate it does not have weird sound artifacts on WebAssembly and builds fine on Android platform.
# UI Improvements
fyrox-ui
now have generic version of SVector<T, N>
editor. Also, this new editor supports limits (min, max),
and step that can be supplied to it using reflection (min
, max
, step
attributes respectively). This can
be useful in your scripts: now your vector parameters can use these attributes.
# Performance Fixes
There was a nasty performance degradation bug, that caused the editor to work more slowly over time, especially
when switching between multiple entities too frequently. The cause of bug was context menu system of the UI
framework. Context menus are "standalone" entities, they're not attached directly to a widget, instead widgets
just use their handles. Also, the same context menu can be shared across unlimited amount of other widgets.
Usually, when you deleting UI node, fyrox-ui
deletes all children nodes, but since context menu is not a child
node, they weren't deleted, thus leading to tons of context menus left "alive". Now this bug is fixed, by using
a special "shared handle", which is essentially just a Rc<Handle<UiNode>>
. It has a custom destructor that
sends a WidgetMessage::Remove
message to the context menu when there's no more strong references to it.
# Full List of Changes in Random Order
- Added blend shapes support.
- Ability to collect UI nodes statistics and compare snapshots.
- Fixed performance degradation in the editor.
- Migrated to tinyaudio (opens new window) as a sound output backend.
- Ability to create/destroy audio output device on demand.
- Generic
SVector<T,N>
property editor. - Ability to set limits (min, max) and step for vector property editors.
- Fixed import errors of ASCII FBX files with empty texture paths.