This Week in Fyrox #10

Fyrox is a Rust game engine with lots of out-of-box game-ready features and a full-featured editor. This week was mostly dedicated to adding small new features and fixes.

# Message Passing for Scripts

Message passing is a mechanism that allows you send some data (message) to a node, hierarchy of nodes or the entire graph. Each script can subscribe for a specific message type. It is efficient way for decoupling scripts from each other. For instance, you may want to detect and respond to some event in your game. In this case when the event has happened, you send a message of a type and every "subscriber" will react to it. This way subscribers will not know anything about sender(s); they'll only use message data to do some actions.

It is now possible to do up-search in the Graph. It could be useful to find a parent entity of with a particular component and get some data from it. Every graph search method is now returns a tuple Option<Handle<Node>, &Node> - as you can see they now also returns a reference to found nodes. This is useful to prevent re-borrowing after you found a node.

# Other

In the editor it is now possible to change the size of light pictograms - their default size could be too big in specific cases.

Animation blending state machine event ActiveStateChanged is now allows you to fetch previously active state when a transition to another state was done.

Previously, any user force or torque applied a to rigid body (via respective methods) will remain the same until you change it again, this behavior is now changed - the engine resets it to zero.

Offscreen UI rendering (rendering into texture) is now compatible with HDR pipeline, previously the textures looked pale.

Lifetime field is now visible again in the Inspector, previously it caused crashes and was temporarily hidden. It is now possible to create temp nodes in the editor, that will be automatically deleted when the lifetime reach zero.

# Side Projects

Project Lead (@mrDIMAS (opens new window)) decided to take a break from adding new features to the engine and spend some time (~1 month) for a game development - Station Iapetus (opens new window) (the first letter of the second word is i, not L). This will help to make the engine better by battle-testing its new and existing features. Some of the changes described in this article was done during development of the game. This means that the engine will most likely only get some bug fixes and some small features during this period.

# Full List of Changes in Random Order

  • Improved graph search methods - now they also returns a reference to found node.
  • Ability to search up on the graph
  • Message passing for scripts
  • More data for absm ActiveStateChanged event
  • Configurable size for light pictograms
  • Fixed fyrox-template script generator to generate 0.29-compatible code (kudos to @z80maniac (opens new window))
  • Reset forces and torque applied to rigid bodies at each frame
  • Refactored scene node life time management
  • Fixed off-screen ui rendering compatibility with hdr pipeline