Skip to main content

May: Big House Keeping

· 10 min read
Gabriel • SyedMuhammad
lead developer™

Big House Keeping! Tons of Fixes and Improvements!

Welcome to our roundup of the latest updates from the last month!

New Local Event Behavior

We are introducing a new behavior for some events. Now actions that are triggered by the client (e.g. changing the View Mode) that execute some kind of event (e.g. ViewModeChange) will have it's event being called immediately on the client which triggered it first.

This means if you are possessing a character and press V (to switch the ViewMode), or then press Shift (to run), you will have the corresponding events ViewModeChange or StanceModeChange called on the client immediately, before having it to be called on servers then synced with all players (including you).

All events that already have this new behavior implemented are:

tip

More events will be added in the future.

Related Issue#779.

Cables System Rework

New Cables Constraint in action with Props

Cables in nanos world had been in a rough state for a while: the physics were odd and the infamous "Virus Bug" was becoming a pandemic, they didn't behave like real ropes, and the visual representation didn't match the actual constraints being applied.

But now, after a deep refactor and a ton of under-the-hood improvements, We're proud to say: cables are finally great again! They now behave exactly how you'd expect realistic cables or ropes to behave! 🎉

We've also introduced several other improvements around them. Some highlights:

  • Added support for a new parameter to Cable:SetCableSettings(): enable_stiffness.
  • Improved error logging, now shows entity names and IDs to make debugging easier.
  • Picking up Pickables will now automatically detach any attached cables, and trying to attach a cable to a non-simulating object will throw an error (since Unreal doesn't like that).
  • Resizing Vehicles or Weapons will not break the Cable Physics anymore.

Related Issue#975, Issue#992 and Issue#993.

AI Improvements

MoveTo

The Pawn:MoveTo() system was heavily improved to ensure more consistency and reliability, especially regarding event handling.

Previously, we had issues where multiple MoveComplete (Pawn) events was being fired for a single MoveTo call, along with desyncs and movement data not persisting properly across sessions.

Now, every MoveTo call is associated with a unique ID, which internally helps track whether a movement has already completed, preventing duplicate MoveComplete calls.

We've also fixed cases where MoveTo wouldn't resume if a player reconnected during a movement.

Also we've fixed MoveTo values are now properly synced to the client, allowing you to access movement data via scripting on both server and client sides, and a bunch of Debug and Verbose logs were added to help debugging your AI implementation.

Related Issue#714.

AI Vehicle Avoidance

NPCs reacting and moving away from Vehicle

We've improved how AI Characters interact with vehicles!

Due to how our ragdoll system works, we have to disable collisions between vehicles and characters to prevent vehicles from abruptly stopping when hitting a character, this way when a vehicle overlaps the character, the ragdoll mode is activated and the vehicle only hits the ragdoll mesh during physics simulation.

However, this sometimes caused characters to clip through vehicles.

To mitigate this, we've implemented a new system that automatically pushes characters away when vehicles get too close. And if the vehicle is moving at high speed, ragdoll is triggered as expected, creating a much more natural and realistic reaction!

note

Note that it is still possible to experience characters clipping through vehicles, but this has been greatly mitigated now.

Related Issue#672.

Prop Grabbing

Smoother Soft Prop Grabbing Physics Simulation

We are doing some experimental changes on how Props are Grabbed, before we were using "hard constraints" which was moving the Props at all costs while a character was grabbing it, making the Grabbed Prop physics to go insane and flickery in some cases.

So we decided to change it to use "soft constraints" instead, which would make them physically more accurate while being grabbed, even making you able to loose it if you don't grab it properly or get too far.

We are testing this new way to see if it works good. We also did several improvements in the Grabbing max distance and location to make it more realistic.

Related Issue#711.

Spectating is back!

Our Spectator Mode (Player:Spectate()) had been left on the sidelines for a while, and a few issues started popping in: like the camera attaching incorrectly (it was attaching to the feet while in third person), and in first person the weapon appeared stiff and unresponsive, with no crosshair or blood screen syncing.

We've now fixed all of these problems and also implemented proper syncing for Crosshairs and Blood Screen effects while spectating!

There's still more work to be done, but this is a initial first step toward getting Spectator Mode fully back on track!

Related Issue#978.

Swimming Movement

Swimming Direction being affected by camera

We've added a small but cool improvement to the swimming mechanic: now your camera angle will influence the character's swimming direction, allowing you to swim upward or downward based on where you're looking (in addition to the existing mode)!

Way Better Pontoons

One major change was in the calculation of pontoons: these are the invisible spheres that simulate buoyancy and allow objects to float in water. We've improved how pontoons are generated and attached, resulting in much better floating behavior across various entities sizes and weights.

Related Issue#958.

AI Swimming

NPCs swimming in the surface

Now NPCs will always swim toward the surface instead of diving endlessly to the bottom of the ocean as it was happening before.

Related Issue#891.

Other Water Fixes & Improvements

We also got some bugs fixed:

  • Before grabbing Props under the water was making the Prop physics to go insane, we've fixed that and Prop will be grabbed more properly while under the water.
  • We've fixed Grenades with no buoyancy at all, now will float properly.

File Transfer

Our file transfer system has gone through many improvements and overhauls over time, and we improved it further!

Now, after each file is downloaded, the client will validate its integrity to ensure it wasn't corrupted during transfer, helping to prevent inconsistencies. If any file fails to download, the log now will list which files failed or were still pending, helping debugging.

We've also refactored a part of the server-side logic to try and eliminate a rare bug where file packets could be sent to the wrong player during gameplay, causing Fatal Errors logs.

Related Issue#947 and Issue#946.

Package Load/Reload

We've made significant improvements to the package reload system. Previously, in extreme cases where multiple package load/reload/unload operations were triggered in quick succession, you might have seen console errors like "Package not found to HotUnload" or even inconsistencies in how the packages were being loaded and unloaded.

To fix this, we've implemented a queueing system that ensures all load/reload/unload requests are handled in order (and in a unique way - e.g. calling unload after a load/reload will remove the package from the load list).

It prevents any package from being processed multiple times sequentially, especially while file transfers are still in progress. This has resolved several errors and issues that were occurring during runtime package reloads.

We also fixed a common client-side issue where a "default map" package couldn't be found when executing package reload all.

Related Issue#968.

Ragdoll Sync

Ragdoll location and rotation being networked

Since some recent Unreal updates, ragdoll syncing became too rigid and resulted in strange movement. So we tweaked it to make the synchronization smoother and more natural when networked to other players.

Additionally, we've improved the rotation syncing, significantly reducing those harsh "snap" rotations that could happen when a ragdoll was standing back up (from other players perspective).

note

Ragdoll syncing is always a technical challenge, syncing it to other players will never be as natural as when it happens locally, but we try to achieve the best networking synchronization as possible when dealing with ragdolls.

Other Improvements

Character Falling

Character Falling in Place

The infamous issue where characters would randomly fall in place has haunted us for years, and we finally found the culprit and fixed it!

Related Issue#809.

Props Net. Authority

Explosion affecting non Network Authority Props (marked as white)

We've improved how network authority is handled for Props. Previously, if someone who wasn't the network authority shot or threw a grenade at a Prop, it wouldn't react at all, only the authority could affect it.

Now, the system properly transfers network authority to the player causing the damage (like shooting or throwing a grenade), making Props fly away as expected when they are damaged.

Weapon Cadence

We've improved the weapon's cadence across different frame-rates, fixing inconsistent firing rates.

We did this by compensating the cooldown between shots with the time spent in the last frame, which was not being taken into consideration before.

tip

Note that in extreme low fps cases, the weapon will still be limited by the FPS. We always recommend setting the Weapon cadence value to a minimum of 0.05, this will make sure that even someone at 20 fps will be able to shoot properly.

Related Issue#730.

Logs Overridden

We've fixed an issue where asynchronous logs were overriding other log entries in both the console and log files when logs were being written from separate async threads.

Now, all logs are properly synchronized and appended in sequence, ensuring they are not overlapped.

New Plugins Enabled

We enabled two new Plugins: CommonUI and ModelViewViewModel for UGC usage.

Conclusion

This month was all about fixing long standing issues, improving existing systems and doing some good old housekeeping.

Our GitHub Issues had been abandoned for quite some time, a lot of reports were collecting dust and had gone unresolved for way too long. So this month I decided to cleanup it: I went through most of every single issue, closing outdated ones and working on the ones that were still relevant.

I'm proud to say I managed to get through over 40 issues this month! Most of the relevant ones got a proper fix, and a few were moved over to the Feedback Board, since they were more about missing features than actual bugs. There are still more issues already in my plans to be worked soon, my goal is to reach zero open issues!

And with this cleanup, we've officially passed the 1,000 closed issues milestone (with most of those properly fixed)! 🎉 And we are not even counting the many bugs reported casually on Discord.

GitHub Issues count reached 1000 closed issues

There's still a lot I want to improve. Some technical parts of the game aren't yet at the level of quality I desire, and we're undergoing many internal structural and organizational changes that will keep improving nanos world even further!

Ah, if you find any bugs, please post them on our GitHub Issues, and if you have suggestions for improvements or new scripting features you'd love to see, drop them on our Feedback Board!

Thank you so much for the whole support! There's plenty more being worked on behind the scenes that we haven't announced just yet. So stay tuned, because more exciting stuff is coming!

Ko-fiKo-fi