Skip to main content

Mar: Steam, Database & Blueprints!

Β· 9 min read
Gabriel T. Nardy
nanos world developer (SyedMuhammad)

New Steam Store Page, Performance Optimization, Databases & Blueprint Integration!

Steam Store Page​

Recently we got a hitch in our Store Page which required us from getting a brand new one. And now we finally are re-releasing it! It got new screenshots, videos and a better description!

Please WISHLIST NOW!!!​

A downside of this whole situation is that the old store and the old game entry will be deactivated. Soonish everyone will receive a new Steam Key to activate the new nanos world in your library!

Also we embedded a tool to export (then import) your Achievements and Stats from the old game to the new one. You just need to launch the old game once before launching the new one and everything is imported automatically!

Performance Optimization​

Everyone knows that one of the great aspects of nanos world is the performance and the optimization. And in the last month we had a significant advance in improving some internal critical points of our framework.

Memory​

The first one to mention was a huge improvement in the memory usage of our spawned entities.

Internally, we use a special system to handle sending and syncing data through the network. Our approach is to have a similar system to Unreal's Replication system. But until then this system was responsible for most of part of the memory usage in each spawned Entity.

With that in mind we aimed to solve this problem, not to mention most of these memory usage was duplicated in all entities unnecessarily. And fortunately we succeeded on reducing up to 90% of the memory usage of the entities. Right now it occupies exactly the data which is strictly needed for it's existence!

We did a small test to compare, spawning 10.000 Characters through Scripting, check the memory usage difference:

Before:

After:

Comparison of some Entities Memory Usage Before x After:

EntityMemory Usage BeforeMemory Usage AfterReduction
Cable5.4 KB1.1 KB80%
Character13.1 KB1.8 KB86%
Light4.8 KB1.0 KB79%
Melee7.1 KB1.5 KB79%
Particle4.6 KB1.0 KB78%
Player3.1 KB0.3 KB90%
Prop4.8 KB1.0 KB79%
StaticMesh4.5 KB1.0 KB78%
TextRender5.3 KB1.1 KB79%
Trigger4.0 KB0.8 KB80%
Vehicle7.9 KB2.0 KB75%
Weapon11.1 KB2.0 KB82%
note

This usage was calculated on Server side. On Client side the values would be a little bit bigger, not to mention to the Assets which are loaded together.

This was achieved just by improving one single system, we didn't even start looking for active compression techniques or reducing some variables sizes which are unnecessarily bigger than it needs. πŸ™

Network​

Another great optimization was in our network packets, each data sent through the network has a common "header" to identify some operations. This is a constant "cost" for the network which we managed to reduce up to 75% of it's size, making all data being sent through the network statically lower!

Client Side​

We started advancing into optimizing the game in the client side. Which normally is trickier than on Server side because it concerns to dealing to Unreal Engine subsystems. But we managed to add some optimizations based on the Quality Settings selected. For example on the Blood or Bullet Holes particles, now depending on the distance and on the Effects Quality selected, they will be less or not spawned at all.

We've also tweaked the Vehicle System to do similar optimizations using this system. There is still a lot which we can improve! πŸ˜€

New Class: Blueprint​

A very required class is being introduced: Blueprint! Now it is possible to spawn any Blueprint Actor in nanos world!

We've managed to implement the method: CallBlueprintEvent() which you can create any Event or Function with any number of parameters in your Blueprint and call it from Scripting! This expands many possibilities!

Also, you can spawn it on server and it will follow the same rules as any other Actor Entity, and it will be synchronized with other players using the Network Authority system as well!

New Class: Database​

Something that is extremely fundamental for some game-modes such as roleplay is the Database. Until then we were providing a MySQL Module to be used as a third-party Lua library, but due it's complexity to integrate with your server and also because it wasn't possible to make async queries we dug into a more robust solution.

For that, we present the new class: Database. A all-in-one solution for connecting to a database, it supports MySQL, PostgreSQL and SQLite out of the box! Not to mention the async and thread-safe queries!

Check it's page for complete documentation and examples!

Vehicles Tire Skid Mark​

A small but cool addition we did for vehicles was adding Tire marks when it skids:

Also, an awesome detail was added: the wheels get smeared with blood!

It is 100% dynamic and procedural!

Sandbox Improvements​

We got several improvements regarding the sandbox game-mode! The first one is the sandbox "API": we listed all functions and events it exports so you can integrate your own entities/tools or use it's features.

Also we've modularized the menu, categories and tabs, and you can add your own from your external package!

Check it out the sandbox API in the GitHub page: https://github.com/nanos-world/nanos-world-sandbox.

Finally, we've improved our Physics Gun tool, now you can control it using the mouse and also have a 'snap-to-grid' movement!

Several other adjustments and bug fixes were made on Sandbox as well.

New Particle Methods​

We've expanded the possibilities for Particles! Now it's possible to set Material parameters on it, and also use any Texture, WebUI and Canvas as parameters as well!

For example you can spawn a Canvas, draw on it and use as a Material Particle parameter!

The following video shows using the WebUI https://nanos.world as a Material parameter into the Particle! Rendering in runtime!

Notable Improvements​

Music Concurrency​

We finally managed to fix the Music problem, which was making Sounds of type Music from stopping when too many sounds were spawned.

Client-side Props​

Props can now be spawned on Client side as well! This allows having "unnetworked" dynamic meshes spawned on client, intended for use as visual effects and non-gameplay features.

We've already updated the Sandbox's Destructable entities to use client-side debris!

Level Static Meshes​

Now all StaticMeshActors from a Map are automatically loaded as StaticMesh entity on Client Side! It is possible to paint, destroy, move and everything else on them on client-side!

Async Texture Loading​

We've improved our Client loading system and now textures (e.g. .jpg) are asynchronously loaded and the texture is applied in a deferred way. This system currently is implemented under SetMaterialTextureParameter() for testing, soon we can use it in other methods as well.

Async File Loading​

In addition to the above, we've expanded our Async implementation into File class, which now have the :ReadAsync() method!

New Light Methods​

We've added a bunch of missing Light setters and getters methods, also the ability to toggle it on/off with SetVisibility().

Assets.toml Changes​

The Asset.toml got a new category: unreal, where we must specify a new setting unreal_version (the unreal version this Asset Pack was compiled on), this will be an important feature to prevent old Assets versions from crashing the game.

Also it got the new blueprints category for listing Blueprints πŸ˜‰.

Vehicle Collisions​

We've tweaked and improved our Collision configurations and now Vehicles interact better when colliding with other objects, including Networked Characters, Props and other Vehicles.

Before other Networked Characters were desyncing when colliding with vehicles (they started to fly and weird things happened when objects hit the Vehicles wheels), and also the hit between two vehicles were extremely rigid, which has been fixed too and will be more organic now.

Sun Improvements​

The Default Sun light and shadows has been improved, specially during sunrise/sunset which we had some artifacts and shadows disappearing, now it must be smoother and prettier (and hopefully more efficient).

Conclusion​

Thank you for another month of support! There were incredible advances with Blueprint and Database Classes, and also to finally lining up our Steam Page again!

Our north is to continue advancing performance and memory optimizations, as well as bringing essential new features to nanos world!

We also have some important challenges of bringing distance based culling and dimensions system for entities, which is essential for creating special environments.

There are some essential Classes that we want to implement as well, like custom Characters (e.g. for Animals) and other types of Vehicles (Air, Sea).

Finally, we are very excited with the release of Unreal Engine 5 (yesterday 05 April), as with it comes with several solutions to important questions in nanos world (such as Runtime Retargetting which promises solving several animations compatibility issues) and tons of new features to be used! We gonna have good news soonβ„’ for you!

See you next month! πŸ₯³