Ir para o conteúdo principal

Jul: CEF, Settings Menu & Improvs!

· Leitura de 7 minutos
Gabriel T. Nardy
nanos world developer (SyedMuhammad)

CEF, Settings Menu & several Improvements!

After a long time and after innumerous requests (and death threats), I finally announce the big surprise of the integration with the Framework CEF (Chromium embedded framework)!

Chromium Embedded Framework

For those who are not familiar, CEF is a framework for embedding chromium-based browsers in other applications. Roughly our WebUI.

Until then we have been using our dear Ultralight, which at first was very promising, but as it is a proprietary library and unfortunately the dev ended up devoting less time to the project, we started to get harmed by missing features or unsolved bugs.

And since we can't be dependent on that, I made the decision to try to integrate the much consolidated framework CEF. But it was not an easy implementation at all. CEF uses various sub-processes to work, which I figured out I would have to implement on my own. I got several chills while remembering my Operating Systems classes from College. 😜

In the end, I managed to create a totally proper integration, including a build automation to always get the latest CEF safety updates on D+1!

Processes

But since not everything is flowers, there are advantages and disadvantages in using CEF. Due to its multi-process characteristics, on the one hand we have everything running in parallel (+++performance), on the other we have the drawback that rendering will always be 1 or 2 frames late, which may cause an "input lag" effect, but in practice it is not a big problem and is almost imperceptible.

CEF uses sub-processes, which means that each WebUI will run totally independent of the game and other WebUIs, making usage of 100% of computational power with great efficiency!

And that means now all communication is asynchronous. Thus, all the events between Lua <-> WebUI are also asynchronous and this is a paradigm that has changed, which should not be a problem in most cases. But this is an "effect" from having parallelism.

Another thing that changed is that we will have several sub-process starting and closing (like Chrome 😝) while playing nanos world. It depends on the amount of spawned WebUIs and is automatically managed by CEF.

Sounds

Another thing we gained was the Sounds! I have added a new method to the WebUI class: WebUI:SpawnSound() that spawns a Sound object (100% customizable as usual). In other words, you can spawn as many 3D sound entities and even set up a 7:1 cinema with them! 😆

Performance

As said, we gained a lot of performance. Surely I will continue to improve the implementation and boost it even more over time, but we can already see great improvements! Watch this video of me spawning dozens of WebUIs at the same time and rendering them on 3D objects in the world without a single stutter:

How many videos can it handle at the same time? YES.

Debug Tools

It is now possible to inspect your WebUI directly by third party tools, such as Chrome Developer Tools for example! 🥳

Migration

Also, another good news: this migration will have 0% breaking changes! No script will need to be updated to keep working with CEF! 💃

Obviously some things have changed, especially in relation to CSS. In WebKit browsers (as it was before) some styles behaved differently from Chromium ones. Some layouts can appear ill-adjusted (e.g. different scroll bars) now.

Settings Menu

Finally our Settings Menu received the UI Update too! I recreated it from scratch adapting to the new interface style!

Video Settings:

KeyBinding Settings:

We got a new setting tab for House Keeping, where it will be possible to clean up cache files, logs and other files from your installation:

We also had the addition of a new setting: Force no Custom Loading Screen which disables server's custom Loading Screens.

Stats & Achievements

This month I devoted a time to adjust our stats and achievements. And the new Profile Stats tab have been implemented:

I created some new Stats such as swimming or driving, and also I created the concept of "Achievements Ranks", adding levels bronze, silver and gold to them. Let's see how this model stands out. 😉

A great improvement in the notifications of achievements has been made: now they are shown immediately when reached! (Before they were only synchronized once per minute, delaying the notifications).

New Achievements Ideas

I created a new page on Canny to receive suggestions of new Steam Achievements! Please take a look, vote and add new ones! I will always be integrating new ones into the game!

https://feedback.nanos.world/achievements

Vault Changelog

In Vault side, I implemented the Updates Tab for the items, where you can see all changes in their updates!

Caching and Loading

A great improvement I made was the refactoring of the caching system. We already had a cache system that cached the loaded assets in the client side, so then the file validation was instantaneous when re-connecting to a server.

I refactored this system, and now all cache files are in an external folder (inside Packages/ and Assets/ called .cache/), which even facilitates their cleaning.

In addition, when opening a server, every time the assets were loaded and cached in memory, which was really slow. And with this new system, they are still loaded but much faster, the system intelligently identifies changes and only re-caches the files that get dirty since the last load.

This will greatly improve the opening speed of the servers.

Docs Improvements

I took some time to update some pages here in the docs.

  • Quick Start is now even more quick and easy!
  • Server Installation was reworked and split and now is straight to the point.
  • Assets & Modding category got a rewrite so the guides are more linear and have less ambiguity.
  • Static Mesh was completely rewritten and now have lots of new information and tips!

I will continue to improve the docs aiming to reduce redundancy and to make it even more simple for modders and scripters to hop in! I see the docs was starting to get a little big confusing due some duplicities and some tutorials in weird places, that will be improved too!

Notable Changes

Some smaller but notable changes.

WebUI 3D Interaction

This is not totally related to CEF but I took the moment to integrate methods which allow injecting events into WebUI and create a Remote Control for it: 😜

It uses traces to retrieve the UV location from the hit on the TV mesh, then redirects it as WebUI events.

Packages Maps

I added a new setting to Packages: compatible_maps to make pair with the map settings: compatible_game_modes. Both settings are united to display compatible maps in the New Game popup when starting a new server.

Discord FAQ Channel

Our Discord got a new FAQ channel, which contains the most common question about the nanos world. More will be added as the time goes!

Unreal 5.0.3

I've updated the game Unreal Engine version to the last patch 5.0.3 containing lots of engine bug fixes. This update had no breaking change.

Conclusion

This was a month of great advances, several bug fixes and structural improvements in nanos world. We further evolved our IU and solved the WebUI problem that had been haunting us for a long time.

I emphasize the importance of creating and supporting ideas at https://feedback.nanos.world/. It is very important to have them officialized that to know your most request demands! Here's July Feedback summary:

Thank you a lot! You are the best!