Async scene loading in editor
Hey guys, I’m here with another update of what has been going on in the last month!
First part of the month was spent doing the v1.1 release. Making sure everything was well tested, as well as all the logistics took a lot of my time. I’m actually surprised how much got done despite that, and I’m pretty happy with some cool little features that were added in the second half of the month. In case you missed v1.1, you can find the release notes here.
As I said before my main focus now is the editor, and it will be for at least a couple of months. It needs to get into usable state so it’s ready for future framework updates.
Keep reading to find out exactly what has been added, and what’s coming next.
New in framework
Resource load progress reporting
Resource system can now report loading progress for asynchronously loaded resources, ensuring that loading progress bars can now be more easily implemented. Simply call
Resources::getLoadProgress for the resource in question. You can choose whether the reported progress is just for that resource, or for all dependencies as well (for compound resources, like scenes).
HPrefab scene = gResources().loadAsync<Prefab>("myScene.asset"); while(!scene.isLoaded()) LOGDBG(toString(gResources().getLoadProgress(scene)));
GUI texture animation
Animated GUI texture
SpriteTextures assigned to GUI elements now support animation! Simply create sprite sheet animation as normal, and assign it to the GUI element. GUI elements already accept sprite textures so no API changes were needed.
HTexture spriteSheetTex = gResources().load<Texture>("Spinner.asset"); HSpriteTexture spriteTexture = SpriteTexture::create(spriteSheetTex); spriteTexture->setTexture(spriteSheetTex); SpriteSheetGridAnimation gridAnim(3, 10, 29, 29); spriteTexture->setAnimation(gridAnim); spriteTexture->setAnimationPlayback(SpriteAnimationPlayback::Loop); GUITexture* animatedImage = mainPanel->addNewElement<GUITexture>(spriteTexture);
C# scripting libraries
Entire C# scripting backend has been refactored and moved from the Banshee 3D project directly into the framework. The build system was updated so you can now select C# bindings during CMake configuration. Scripting isn’t yet functional in the framework, but making sure a unified backend works for both the framework and Banshee 3D was an important first step.
For now you can generate the C# project and compile it, but cannot yet run it.
New in editor
Async. scene loading
Async scene loading in editor
Scenes loaded in the editor will now load asynchronously. This speeds up editor start-up times even more, and stops the editor from freezing when opening larger scenes (as is the case with some other commercial engines ).
It also serves as a good ad-hoc test of the async resource loading system. If there are any issues remaining there it will be easier to pick up with editor doing this by default.
Distribution GUI elements finalized
Distribution GUI elements
GUI elements used for displaying distributions have now been mostly finalized and are functional. These elements are currently mostly used in the particle system and allow you to provide values to the particle system as a constant, random range or a time-varying curve (or a color gradient). They’re used for the majority of particle system properties and are the primary way of setting up the particle system through the GUI.
Particle gizmo for a cone emitter with non-zero base and thickness
Scene gizmos for the particle system have been added. The gizmos display the shape of the particle system emitter, custom particle system bounds and collision planes (if any). As the emitter shapes come with a variety of tweakable options (such as arc, thickness, etc.) I’ve tried to make the gizmos respect all those parameters to provide the best visualization.
Three new attributes were added that allow script code to control how it is displayed in the inspector:
- Category - Allows a field or a property to be placed in a separate category in the inspector. Categories have a header and can be expanded/collapsed.
- Order - Allows a field to control in what order is it displayed in the inspector relative to other fields.
- Inline - Forces class/struct members to appear as if they were part of the parent class.
These attributes all work toward the goal of allowing the user to create complex customizable inspectors simply by specifying attributes, rather than setting up the GUI manually.
My focus in February will still be towards the editor, as the goal is to get the next stable release ready. There aren’t any big complex features remaining but there’s a lot of little things I want to test and polish.
I’ll be also focusing on getting the C# scripting ready and usable. I believe this can be done fairly soon, although releasing the final version will involve a lot more work around the documentation. I’ll likely be switching to a different documentation generation that will support C++ & C# (and any future languages) - and then it’s the matter of going through the documentation and updating the examples and the API to match, while re-using as much of it as possible.
I haven’t started on v1.2 features yet (networking, pathfinding, renderer enhancements) as I don’t want to start on too many things at once. But work on editor is progressing faster than expected, and I wasn’t planning on doing any C# work this month yet I managed to complete a very important part, so hopefully I’ll start with it soon.
Thanks for all the supporters on Patreon and otherwise! Until next time.