Unreal Engine 5 Preview, new Network Authority System, Store API and more
Network Authority System
As everyone knows, nanos world relies on a "server-less" solution for physics and other world operations. All the sync relies of sharing data between the players and replicating in each client. This approach brings several advantages and of course some drawbacks, in the advantages we can include a very lightweight server, where we have all the control over it, without needing to rely on Unreal's server executable or the way it handles the network.
In the other hand we got some challenges on how to distribute physics information and other stuff. Then in the beginning we created our first Network Authority system in which each player is responsible for sharing a specific set of entities from the server to others, similar to Roblox Solution.
However, just like in Roblox, some problems become more noticeable when we have many players connected with many different pings. As some players will receive the "network authority" over entities faster than others, they will start sharing their location/rotation to other players while the 'old' network authority is still the authority over that because he didn't receive the "lost network authority" message yet.
We created this diagram to exemplify the problem:
As you could notice, there is a "gap" and a "overlap" when switching network authority if we have discrepancies between players ping, causing several weird behaviors on physics objects.
Considering this and after much study, we improved our Network Authority system to make it more robust, this new way aims to fill up the gaps and ignore overlaps:
While still in a "beta" version, with this new system we intend to improve all the "warnings" and flickering problems that were occurring since then, all feedback is appreciated!
New Debug Modes
With the addition of the new Network Authority system, we are adding a new Debug section in the Settings.
A cool setting is the Draw Network Debug which draws on World all network information:
You can find more information in the Network Authority page.
Also you can fake "packet loss" which will simulate some Sync Data being discarded.
Last month we released our Store, a place to share and download community Assets & Packages, integrated with the game.
Now we are releasing the Store API: You can download, upload and edit your resources through HTTP requests, check it the Swagger documentation at https://api.nanos.world/store/docs. More tutorials coming soon™.
We've added a new tutorial for creating your own C Module. You can check it out at the Modules page.
Unreal Engine 5: Preview
A week ago, Epic Games gave us the wonderful news that they were releasing Unreal Engine 5: Preview. A Preview release means most of the features are already present and almost ready for a final shipping version.
And we, as good enthusiasts, and in addition to our other blog news (November: Unreal Engine 5?) decided to give another try on converting nanos world into Unreal Engine 5. And let's move to our impressions:
Migrating nanos world
This time migrating nanos world to Unreal Engine 5: Preview was more trickier, we've got even more deprecated methods and some functionalities changed and/or removed, which required more hard work converting and debugging what has changed.
We've had to update a lot more code and files than the Early Access version to be able just to launch the Project. Also Vehicles had to be disabled due the new Chaos engine, which completely changes how Vehicles need to be implemented and we didn't want to bother on converting them right now.
Unreal Engine 5 introduces Lumen, a new dynamic Global Illumination method, and playing with it is very cool and impressive. Here's some screenshots taken from our Testing Map:
Next you can see how the object colors can reflect dynamically in the environment lights.
Here we can see the contribution of Emissive Materials to the environment.
A cool feature is that we can enable Hardware-Accelerated for calculating Lumen (which replaces Hardware Ray Tracing), and tested with a RTX 3070 makes it even more beauty at a really low GPU cost.
In the technical aspect, the biggest changes Unreal 5 brings are:
- Lumen (Dynamic Global Illumination)
- Nanite (Mesh Virtualization)
- Chaos (new Physics Engine)
- and also not less important, the new features regarding World/Level creation (One File Per Actor and World Partition)
While Lumen, Nanite and World features can be toggled on or off (we can choose to use it or not), the same truth is not valid for Chaos. Unreal is completely removing PhysX and replacing by it's new Physics Engine: Chaos. Although we are open to new things, unfortunately Chaos doesn't seem to be in a totally good state, neither at least at the same level/stability as PhysX.
We could experience several Collision glitches, such as objects flickering, wrong "collision boxes", objects flying through walls, bugs with Rope (Cable), objects sleeping randomly, bad Hit events callbacks and so on.
Most of the problems we could find an workaround (like applying force to some objects so they don't sleep, or finding a workaround on the Cables settings), but the main problem we've found using Chaos is the Hit feedback event, which are totally inconsistent, sometimes they are triggered with force 0, which annoys the hit sounds and also the nanos world Hit events from being triggered, and this can break gameplay/scripting functionalities.
Not to mention the objects flickering/disappearing/losing collisions which gives a really bad impression on the game quality.
And we didn't even started implementing the new Chaos Vehicles, can't wait what we gonna find there 😅.
Actually, this version of Unreal surprised us positively, it had less crashes than in early access, but still had some, but in this case it was when we were stressing the game really hard using several balloons, cables and props flying around. Although I was a little disappointed as most of the bugs I found in the Early Access were still prevent in this Preview and weren't yet fixed.
Also some rare bugs could be noticed, like suddenly being teleported to the 0, 0, 0 location, which we couldn't yet find the reason.
UE5 worth it now?
Summing up, we've created a list of positive and negative points according to our view regarding if we should or not migrate to Unreal 5 "right now":
Also, another point to consider: we are going to migrate to Unreal Engine 5 soon or later, the decision is "when". 😉
Negative Points 👎
- Gameplay Bugs related to Physics, objects jumping, flickering, bad collisions happening, objects passing through floor/walls due Chaos.
- Visual Artifacts, not only related to Lumen, but to the standard Rendering methods as well.
- Random Unreal internal Crashes, which we cannot fix by ourselves.
- More frequent Unreal updates, much probably we are going to have other Preview version, and after the UE5 release we are going to get several hotfixes, and each one will much likely require us from rebuilding all assets and publishing a new version of them, otherwise they won't work in the new versions. This means the Asset Packs won't work in newer Unreal versions.
- Using Lumen has it's drawbacks, such as the performance, which can hit from 25% to 50% of the FPS (but can be toggled on/off).
Positive Points 👍
- We are going to be the first ones to explore Unreal Engine 5 (which can be bad because some problems no one figured out yet, but personally I love exploring new features and using new tools).
- nanos world will have a great self-marketing potential, and also can bring lots of new enthusiasts on UE5 to know, play and create with the game.
- Lumen is fun and beautiful.
- New World/Level tools which allows creating big maps and also improves a lot the co-creations pipelines using the One File Per Actor system and World Partition!
- New Unreal Editor which has a fresh and pleasing look.
- Lots of new tools and technology to use, including Nanite, Chaos Destruction, Animation tools (which can help us from dynamically linking your custom Animation Blueprint) and the new MetaSounds.
- It's really hard to convert nanos world from scratch every update to test it's stability, I can't reuse the previous conversion because many changes are in blueprints (UI) that I can't merge and lots had changed since then. So converting once and right now we can already start digging, fixing stuff and the next unreal updates will be easier and faster to test and maintain.
Unlike Early Access, this version seemed to have more positives than negatives points, and it seems like a better opportunity than before to officially migrate nanos world. Come to our Discord to discuss this idea with us! We are going to make a poll to bring all feedback from the community!
Here we'd like to share all amazing stuff our community is doing the last weeks!
Timmy is doing an amazing job, and is sharing it's new Inventory System:
Also Timmy created a nice smooth Weather system transition:
Voltaism shared a very cool implementation of Bots playing his game-mode VZombies by themselves with no Players: