What's New in Rust's "Devblog 32" Update
October 2014's Devblog 32 brought back the code lock from Legacy, rewrote the key lock system so keys are coded and doors just open, networked trees globally so forests reach the horizon, and published a blunt ranking of what was really hurting framerate.
Devblog 32 came out at the end of October 2014 and is a genuinely useful one for understanding early Rust Experimental. The code lock returned from Legacy, key locks were rewritten from the ground up, trees became globally networked so forests stretch to the horizon, and Facepunch published a blunt ranked list of what was actually costing players framerate.
Performance: what's actually slow
After a week spent profiling, the biggest performance costs were ranked, from worst down:
- Water reflections
- SpeedTree rendering
- PVT rendering
- Terrain rendering
- Animations
- Everything else
- Grass rendering
Grass came dead last, and Facepunch were emphatic that it is not why your framerate is low. Water reflections and PVT were disabled by default as a result, with reflections needing closer investigation and a possible Unity bug report, and PVT waiting on Diogo's return from holiday.
Tree rendering had a bug report filed with Unity, who believed the problem lay in billboard rendering, so big improvements were hoped for. For scale, Rust Experimental had around 10,000 trees at this point against Legacy's 136,000. Everything below those items was described as effectively meaningless to optimise until the top of the list is sorted.
Locks rewritten
A large portion of the lock and door code was rewritten, and the key system came out considerably better for it. Keys are now coded, so as in real life there's a finite number of unique keys in the world - meaning a key you create might also open some other lock somewhere, randomly, with no way to choose codes yet.
More practically, if you have the right key in your inventory and try to open a locked door, it simply opens. No unlock, open, close, lock cycle. The lock stays locked throughout, so nobody without the key can interact with the door at any point in the process. The rewrite also fixed the problem where doors and locks stopped working with their keys after loading a save.
The code lock also returned from Legacy. It's electric, so you need to find a battery to craft one. It behaves much like the Legacy version: attach it to a door, set the code, lock it, and once you've entered the code once you can open the door without unlocking or re-entering it. Crucially, while unlocked anyone can change the code, so leaving one open is dangerous. The graphics and sounds were explicitly placeholder.
Terrain changes
Substantial terrain generation changes went in as part of a broader effort to improve the environment. Beaches are now guaranteed to be flat, overall elevation values are less extreme, forests have a border area that can carry different vegetation from the forest core, and giant rocks are no longer spammed everywhere. Nothing was final and many assets were placeholder, but the team acknowledged players liked hiding among the massive rocks in Legacy and planned to offer various hiding options on the new maps too.
Global trees
Trees are now networked globally rather than being created in a small area around the player - they spawn everywhere by default, so SpeedTrees are visible all the way to the horizon. Testing didn't show a massive framerate drop, though players struggling were pointed at the F2 options. Forest sizes and densities were still being tuned for the balance between performance and visuals: forests got considerably bigger and slightly less dense compared to the previous week, though with that many trees across the map the density change is hard to notice.
Networking improvements
Joining a server used to send you all the entity information, and then send it all again when you clicked respawn. Now joining sends you the global entities - trees, system info and so on - and if you're dead you're offered the respawn option, at which point you receive only the entities within your new position's radius. Since that no longer includes trees, it's far fewer entities than you'd expect and much faster than before.
Compression was added for packets above a certain size, which helps enormously with snapshots - larger snapshots are routinely half the size they used to be. Unused variables were also removed from the base entity, cutting roughly 20 bytes per entity of network cost.
Position interpolation was improved too, so other players should no longer appear about 8 feet behind where they actually are - a heavily reported problem. The client.lerptime convar was removed for being used as a cheat.
Wall glitching
Players had worked out that building walls could push you through other walls and into someone's base, which was fairly inevitable. The fix is that objects don't turn solid while you're inside them - they wait until you exit before becoming solid, so there's far less chance of being catapulted through a wall. It isn't a silver bullet for wall glitching, but it kills the majority of these exploits along with a range of other weirdness.
Audio and UI
Audio works again. Compressed sounds weren't playing when running from Steam, and the cause turned out to be the build server missing the VC2010 runtime. Sound volumes were also tuned from community feedback - you can no longer hear animal footsteps from two miles away - with more ongoing tweaking expected and specific feedback invited.
Coherent sent updated binaries for the UI system, which should run up to 30% faster, crash less on macOS, and provide better logging for diagnosing future problems.
Art
Dan's lighthouse monument made it into the game. Goosey produced a couple of generic eating animations. On the concept side, Meg drew abandoned machinery, Howie did a monorail and some pipes, and Paul concepted a tier 1 SMG.
Garry closed the week positively, noting the lock rewrite was more significant than it looked because a lot of underlying code had been cleaned up, making it much simpler for other programmers to add similar entities. Next up: gameplay and performance fixes, some big building changes, and giving weapons the same treatment the locks just received.