Here’s Flaxxy!
Today, we’d like to announce the new Flax 1.3! It contains many useful features such as Ragdolls, Animation Events, macOS Support, tools, and hundreds of improvements.
For this update together with our contributors, we’ve made over 820 commits and merged 46 Pull Requests into Flax repositories. Thanks for your support! ❤️🙌
As usual, we will do a short review of the new features and changes. To see detailed information visit the official release notes.
Support for Ukraine 🇺🇦
We’re deeply concerned by the current situation in Ukraine caused by Russian military invasion. Flax Team stands with the people of Ukraine facing unimaginable circumstances of war.
We will stop any communication/tech-support/cooperation with game development companies from Russia effective immediately. #StandWithUkraine 🇺🇦
Highlights
macOS Support
This release includes initial support on macOS for both Editor and games publishing! Now, you can run Flax on macOS 10.14 or higher. All engine features are implemented including running Vulkan graphics on top of the Metal with the power of MoltenVK.
We’re prepared documentation and tutorial on how to use Flax on Mac.
We’re just started to support macOS so it might include some bugs. Feel free to report them on our Github.
Warning
Known issues:
- Incomplete multi-monitor support
- Mouse cursor positioning issues
- Drag&drop within a window
Ragdolls
Ragdolls are a common feature in games used to generate procedural death animation of the characters or to simulate parts of the skeleton that should behave more procedural (eg. tail). This update contains runtime support for simulating large amounts of ragdolls and in-built tools for Editor to quickly generate ragdolls for characters. The editor now has ragdoll generator and editing tools. Ragdolls can be used in prefabs for characters creation.
You can read more about it in the blog post.
Animation Features
We constantly improve workflow, tools, and features for the animation systems. In this release, we’ve added Animation Slots, Animation Event tracks, and instanced scene animations.
Animation Slots
Animation Slots can be used to play animations in Anim Graph from code. The slot can be placed anywhere in the graph or even in the graph function and then triggered from the game script via PlaySlotAnimation(...)
. Learn more in docs.
Animation Events
Animation Events can be added to the animation assets on a separate track to be triggered during animation playback to play VFX, SFX or implement custom gameplay logic related to animations (eg. playing footsteps sounds or spawning foot decals when walking over snow). Learn more in docs.
Instanced Scene Animation in Prefab
The editor supports animating objects from the Prefab window. Scene Animation created that way can be played on prefab objects on a level which makes it easily reusable. Learn more here.
C++ Scripting Features
C++ API Doc
C++ API docs are now live! Full engine and editor scripting API reference, nicely browsable and searchable just like C# API. It contains some great features like: utility button to quickly navigate to the actual engine source on Github, file header path to include for copy/paste, and classes inheritance hierarchy with inherited members list. Also, Flax Docs have C++/C#/VS code examples shown in tabs to easily focus on your chosen scripting language.
Checkout it here.
Interfaces
API_INTERFACE
is now fully supported in C# and Visual Script. This allows you to declare an interface in C++ and use it in-game scripting for greater extensibility in your code. What’s so great about it is that an interface can be implemented in C++ or C# and used cross-language (eg. C++ can call C# interface methods – works the opposite way too, including overriding C++ interface implementation in C#). Learn more here.
#pragma once
#include "Engine/Scripting/ScriptingType.h"
API_INTERFACE() class GAME_API IMyInterface
{
DECLARE_SCRIPTING_TYPE_MINIMAL(IMyInterface);
// Interface virtual method
API_FUNCTION() virtual float GetSpeed(const Vector3& v) = 0;
};
Enums
ScriptingEnum
is a new small utility for C++ scripting to easily convert enums to string and back:
API_ENUM()
enum class PlayerStates { Idle, Running, Swimming, };
#include "Engine/Core/Log.h"
#include "Engine/Scripting/Enums.h"
String stateName = ScriptingEnum::ToString(PlayerStates::Running);
PlayerStates state = ScriptingEnum::FromString<PlayerStates>(stateName);
LOG(Info, "Player state: {0} = {1}", stateName, state);
Lamdas
C++ lambda expressions can be now used with Flax delegates and functions. You can use them to simplify your game code by capturing local or member variables into the lambda scope:
int32 myVariable = 10;
Engine::Update.Bind([&myVariable]
{
LOG(Info, "Counter: {}", myVariable++);
});
Visual Scripting Improvements
Aside from C# and C++, we’ve added lots of goodies to Visual Scripting too! Now, you can use arrays in VS, change parameter type and the graph execution performance has been greatly improved.
Docs about arrays in Visual Script.
UI Navigation
Flax UI system gets UI Navigation to perform focus navigation around the user interface with input actions such as keyboard arrows or gamepad keys. This feature is essential for console games or others with gamepad support which aims to give full UI usability without mouse input nor touch input from the user. This has been implemented as well in Editor to provide Tab
key navigation. Learn more here.
Online Platforms
One of the main new features in the latest 1.3 update is Online Platforms support. This makes a notable step towards making your games more connected with the online services. Inside the engine, we’ve added a new IOnlinePlatform interface designed for online platform providers for communicating with various multiplayer services such as player info, achievements, game lobby, or in-game store. Each Online Platform implements this interface and is provided via a plugin that can be used by your game project:
Learn more here.
Multiple Physics Scenes
Physics system got a significant refactor under the hood and a new PhysicsScene
feature that allows to create multiple physics scenes and simulate them separately as submitted in this Pull Request. Now, PhysX implementation is hidden behind PhysicsBackend
interface so it will be easy to plug-in another physics engine (eg. Havok or JoltPhysics).
Editor Tools
Literally, every update brings tons of improvements to the Flax Editor. This time it happened again.
Asset References
Asset References Viewer window (via context menu in Content Window) shows the graph with assets that reference this asset and its own dependencies structure. Can be used to analyze content usage in a project (eg. check what textures the given model uses, or what models are used on a scene).
Debug View
New Quad Overdraw debug view mode (as shown above) colors pixels based on the overdraw of the triangles rendered with 2×2 quads on a GPU. Another new mode Material Complexity colors the screen pixels based on the approximated rendering cost (shader size, textures usage, tess or depth usage, etc.). Both view modes can be used to profile and optimize scenes.
Visual Studio 2022
After Microsoft launched Visual Studio 2022 we’ve added support for using it in Flax Editor and in our build system. Go ahead and use it for your game’s development. Keep in mind that due to heavy breaking changes compared to previous versions we were unable to provide Flax.VS plugin for C# debugging in VS2022 yet (the latest version works with VS17 and VS19).
Timeline and Curve Editors Improvements
We’ve added a significant amount of improvements to increase the usability and stability of timeline and curve editors. Now, creating cut-scenes and animations is even easier and faster. You can select keyframes from multiple tracks at once and work with nested curves with ease.
Platform Updates
Flax 1.3 adds initial PlayStation 5 support (unofficial, private port). We’ve added many improvements to other platforms as well. Such as:
- gamepads support on Linux,
- user profiles API on Switch,
- login API with GDK (Xbox One and Series X/S),
- Xbox Scarlett and Xbox One updated to ver GDK 2021.04 QFE5,
- Vulkan in Githib daily builds,
- automated unit tests running with Github Actions (or push or PR).
5 Comments
Temple · March 3, 2022 at 5:16 PM
Awesome! Such a massive update!
Daniel · March 4, 2022 at 3:22 AM
And even stop communicating and helping with individual developers who are not members of Russian game studios, but also from Russia? :c
Gustaf Krister · March 14, 2022 at 3:13 PM
If godot replaces Unity in the open source space, this makes me think that Flax replaces Unreal…
jucaduarte · July 15, 2022 at 4:04 PM
I think flax replaces both…
Vishwajit Patil · June 28, 2022 at 12:58 PM
Loved the update. But I don’t know how to use OAuth in Flax