Oct: Playtest & Big API Refactor!
Halloween Playtest, Big API Refactor and more!
Halloween Playtest
This month we had our annual Halloween 🎃 event! As always, it has always been a moment of great evolution for nanos world! I would like to thank everyone who participated playing and the testers who participated creating content and game-modes for this event!
This year we had 4x more registered Playtesters than last year, and we hit several records in simultaneous players. And best of all, the game server managed to handle them all with ease 🙏! (except by the Vault that we had to increase the download limit during the event 😜).
Due to the event, we halted the updates for two weeks to focus only on bug corrections and improvements. We pushed more than 10 small patches with many bug fixes and improvements we've found before the event to grant it's stability!
Améliorations des Véhicules
I did several improvements on the Vehicle class, allowing bigger customization on them.
New Default Vehicles
We've added a new Vehicle Pack to the default nanos world vehicles pack. 4 of them are from a Feature free Marketplace pack (from the same creator of our previous one), and the Offroad is from Epic Games.
Animation Blueprints
I've added the possibility of loading custom Animation Blueprints on Vehicles, allowing the opportunity to have custom suspension animations like this one of the new Offroad vehicle:
Dynamic Lights Texture
Now it is possible to configure your vehicle with custom Material Parameters to turn it's Lights ON or OFF dynamically. You can find more info on how to configure your vehicles materials here.
New Subtle SFX
Also, I've added new custom sounds effects to vehicles, such as pulling the handbrake, or wheels brake screeching for example which adds to the realism and immersion.
Vault Text HTML Parser
Previously, as Vault item descriptions and changelogs were generated with HTML, we had CEF Browsers (WebUI) rendering them, but it was too much overkill and also quite disconnected from the rest of the UI.
So I decided to implement a custom HTML Parser to convert the HTML into proper Unreal Rich Text, having then a native renderer for the descriptions and changelog, making everything pretty again.
Native JSON Parser
I am migrating our current built-in JSON library to a native more-efficient JSON parser. With this new parser, we've managed to reach 10x speed when parsing JSON strings! All methods will remain the same, just the implementation will change.
Benchmark comparison: (9.5 MB JSON file)
Benchmark 'Lua JSON Parser' (x10) took 9964ms.
Benchmark 'Native JSON Parser' (x10) took 1057ms.
Kill Z
I implemented a built-in system for Kill Z. This is a system to destroying entities automatically when they reach too low heights, preventing some problems such as value overloading.
Currently the Kill Z offset is hardcoded for testing.
Big API Refactoring
This refactoring update will come in a future update and it's not completely done yet, but I would like to advance some things that are planned to change. We know refactoring usually comes with several breaking changes, but this time I'm working harder to make this update with zero breaking changes, keeping backwards compatibilities until you update your packages.
If you have more ideas for dramatical changes (such as renaming methods to maintain standard for example), please let us know so we can include in this big update!
Package Compatibility
I will be introducing a new setting in the Package.toml for the "Compatibility Version", where you can configure the current version of the game that works with that package and if the game updates and any method that your package uses get modified, it will continue to work in a "compatibility mode" (with deprecated alerts).
This differs from the usual "deprecated warnings" because now in cases where the signature of a method changes the package will not stop working (as it happens today), and the old implementation/interface will still exist internally.
Events
Currently events work by just subscribing and calling them local or remotely, but we cannot strict if we just want to receive them on a specific side. A new addition will be the subscription of remote-only events:
Events.SubscribeRemote()
This way only events called with Events.CallRemote()
on the other side will trigger it. And also events subscribed with Events.Subscribe()
will not receive remote events anymore.
Modules
Modules (Lua external binaries) will be reformed to become a type of Package. This way they can be shared easily and used by other packages, including through Vault.
Configuration Files
Now different Packages types will have different configuration files format (toml).
For example, the loading-screen
package configuration currently have a lot of configuration which is not used by it (dependencies, assets, lua settings, etc). I want to have specific configuration files for each kind of Package (Modules, Loading Screen, Game-Modes, Libraries and Scripts), as also they will be loaded in different ways internally.
Server, Package & Assets Image
I'm removing the image
URL setting inside the configuration .toml files, instead the image should be placed besides the .toml with the name Package.jpg
, Assets.jpg
or Server.jpg
. This will avoid some problems of the client accessing dangerous or bad external URLs.
Multiple Constructors
A feature that will be included is the possibility of multiple Constructors, a very good example is the Sound Class that has several parameters that depend if the sound is 2D or 3D:
-- Current Constructor
Sound(location, asset, is_2D_sound, auto_destroy, sound_type, volume, pitch, inner_radius, falloff_distance, attenuation_function, keep_playig_when_silent, loop_mode)
-- New 2D Sound Constructor
Sound(asset, auto_destroy, sound_type, volume, pitch, loop_mode)
-- New 3D Sound Constructor
Sound(location, asset, auto_destroy, sound_type, volume, pitch, inner_radius, falloff_distance, attenuation_function, keep_playig_when_silent, loop_mode)
This way you can spawn a 2D or 3D sound just by choosing the right constructor!
Static Classes Renames
This will be a big organizational change! With each new update, some of our Static Classes are starting to accumulate lots of methods, and many of these are unrelated to each other.
With this in mind, we will split some Static Classes into new Static Classes, aiming at the best organization and especially the easy search and understanding of scripting API functions, some of the following listed methods may be renamed to reduce redundancy (e.g. to Chat.SendMessage).
We will have several new Static Classes, to list a few:
Chat
, Console
, Trace
, Navigation
, Debug
, Viewport
, Steam
, Discord
and others.
The full list with all changes will be listed when the update is released. All of these changes, including it's Events will be warned as deprecated for use.
Class Renames
Some classes will also be renamed for better standardization. For example Character and Vehicle could become CharacterMannequin
and VehicleWheeled
, which allows new classes of other types e.g. VehicleWater
or CharacterGeneric
.
Conclusion
This was a month of several fixes, improvements and rethinking the API as a whole, refactor is always a challenge as I need to maintain everything working and still rearrange the new interfaces of it, I don't want to rush this change.
My main objective now is finishing the organization of the API refactoring (please give me feedback of the changes mentioned on this blog!). Once this get finished, I will get more comfortable on adding new things and classes into it, I have many new features being developed in parallel that have not yet been announced, several of them are from your suggestions from Canny (cof cof vote! cof cof).
The result of the PlayTest was awesome! We had very few crashes and the server managed to handle very well the large amount of players!
I'm sure these upcoming improvements, including some not announced, will raise nanos world to another level of robustness!
Finally, thank you for all the support!! See you next time!