Devblog 32

Locks, Trees and Networking

31 October 2014

We’ve spent a lot of time looking at performance this week. So here’s what has the biggest impact on performance right now.

  1. Water Reflections
  2. SpeedTree Rendering
  3. PVT Rendering
  4. Terrain Rendering
  5. Animations
  6. Everything else
  7. Grass Rendering

Trust us when we say grass isn't the reason your framerate is low. So what are we going to do about the other stuff?

Water reflections and PVT are now disabled by default. We need to look into water reflections more closely and possibly submit a bug report to Unity. PVT is Diogo’s realm - and he’s just back off holiday so I’m sure he’ll be looking into it soon.

Tree rendering. We’re submitting a bug with Unity. They think it’s a bug to do with billboard rendering - so hopefully we’ll get some big improvements here. We currently have about 10,000 trees. Legacy had 136,000 trees. There’s more work to be done here and we’re all over it.

The performance of everything else is pretty much meaningless until we get the others sorted.

I re-wrote a huge portion of the lock and door code this week. This has resulted in a couple of nice changes for the key system.

Keys are now coded. Like in real life there’s now a finite amount of unique keys that can exist in the world. A key your create might end up also being able to open a lock somewhere else. This is random and there’s no way to choose these codes.. yet.

If you have the key in your inventory and try to open a locked door, it will open. No need to unlock, open, close, lock. The lock remains locked - so no-one without the key can interact with the door at any point during this process.

This has all fixed that problem people were having with doors/locks not working with their keys after loading a save too.

[yt vid=miTEoLg1noc]

Some fairly major terrain generation changes were added this week. It’s all part of a bigger plan to unsuck the environment. Beaches are now guaranteed to be flat, overall elevation values are less extreme, forests have a border area that can have separate vegetation from the forest core and we’re no longer spamming giant rocks all over the place.

Keep in mind that nothing you see is final and a lot of the current assets are placeholders. We’re also aware that people like to hide between the massive rocks in legacy and plan to offer various ways to hide on the new maps as well.

Dan has been making progress with the lighthouse. It's in game now!

[yt vid=HiadFt0UKGs]

A few people have been taking advantage of being able to build walls which will push you through other walls into people’s bases. That was pretty inevitable.

So we’ve added a mechanism so stuff doesn’t turn solid when you’re inside it. It’ll wait until you exit it - then it will become solid. So there’s less chance of it catapulting you through a wall.

Obviously this isn’t a silver bullet to wall glitching, but it’s a nice way to fix the majority of these exploits and a bunch of other weirdness. We’ll address these exploits more as we go along.

We know you all missed the code lock from legacy, so it’s back. This lock is electric so you need to find a battery to create it.

The lock works pretty much like the one in legacy. Add it to a door, set the code, lock it. As long as you’ve entered the code once you’ll be able to open the door without unlocking or re-entering the code. When unlocked anyone can change the code - so be careful!

The minecraft graphics are placeholder. You hate the graphics and the sounds, register your disgust below.

[yt vid=qpItz5vt3Hw]

The guys at Coherent sent some updated binaries. It should now run up to 30% faster, it might not crash on OSX as much, and it has better logging so we can diagnose more problems in the future.

Previously you would join a server, it’d send you all the entity information (snapshots), then you’d click “respawn”, and it’d send you it all again. This got annoying quick.

Now when you join a server it will send you all the global entities (trees, system info etc), then if you’re dead it’ll give you the option to respawn - at which point you’ll receive all the entities that are in your new position’s radius. Since this doesn’t include trees anymore it’s a lot fewer entities than you’d imagine - so this is a lot faster than before.

The networking system now includes compression too, on packets that are bigger than a certain size. This helps a lot with snapshots. In fact larger snapshots are routinely half the size that they were.

Some unused variables were moved from the base entity. This means that each entity costs about 20 bytes less to network.

The trees are now networked globally. This means that they’re not created in a relatively small area around you, they’re spawned everywhere by default. So you’re going to see Petur’s lovely speedtrees all the way to the horizon.

This might be detrimental to your framerate, but in our tests we didn’t see a massive framerate drop. If you are suffering try playing with the F2 options to see if you can get some improvements.

We’re still in the process of determining suitable forest sizes and densities to find a nice balance between performance and visuals. Overall forests got a lot bigger and a bit less dense compared to last week. However, there are that many trees all over the map that I don’t think you’ll even notice.

[yt vid=B8I_1vGo6y0]

Audio is working again. We had a bug where compressed sounds wouldn’t play when we played on Steam. Turned out this was a bug on the build server - it was missing the VC2010 runtime. Now we’re all good.

I’ve done some tweaking of sound volumes based on feedback from the community. You should no longer be able to hear animal footsteps from 2 miles away. This is going to be something else we constantly tweak over time so please do give us feedback on specific sounds.

Meg concepted some abandoned machinery

Howie concepted a monorail

Howie concepted some pipes

Paul concepted a tier 1 SMG

I’ve improved our position system. Other players should no longer appear about 8 feet behind where they actually are. This has been a much reported problem - and hopefully this should now be fixed.

I also removed client.lerptime - which was being used as a cheat.

I really feel positive about the changes I’ve made in the codebase this week. The lock changes were a lot more significant than they appear. A lot of code underneath has been un-fucked. It’s a lot simpler for other programmers to add entities like this now.

Next week - hopefully gameplay fixes, performance fixes, some big building changes and hopefully unfuck the weapons in the same way that the locks have been unfucked. We also need to start looking for more 3D Artists and Programmers.. So if you think you can add to Rust - even if you've applied before - please do so over here - and please put [RUST] in your application.

Goosey made a couple of generic eating animations.

Mailing List

If you want to follow this project you can sign up to the mailing list.

We'll only update you about this project, we won't spam you about other stuff or sell your email address.

* By subscribing you agree to the Terms Of Service and Privacy Policy