Friday Devblog 23

<a href=' '><img src=''></a> We've ported the game over to Unity 5.

29 August 2014

The new ambient lighting system in Unity 5. Previously there was one option for ambient light.. just one flat colour to apply. In lighting terms it's this:

Now in 5 you get a bunch more options for sky, equator and ground ambient. This works really well with Andre's sky system.

In game this leads to more natural, softer looking lighting.

The physics engine has been updated in Unity 5. Previously we had to add rigid bodies to everything because if we didn't you'd get a performance penalty when spawning or moving them. That's gone now, so all the rigid bodies have gone too.

This has given us insane performance on our server compared to the previous version.

There was a lot of talk about not being able to find animals. That was because they only spawned in forests. Now they all spawn equally across the entire map.

This is obviously something we'll bring back further down the line.. but for the sake of testing and baseline they should be more readily available now.

Unity 4 has a collider limit of 65,000. In legacy we create colliders on the fly by merging all the building components together. This isn't ideal because you get a small hitch on the server when this happens. And obviously in the end the server gets full anyway and you have to wipe.

Unity 5 has no such limit. I can't over-emphasise how much of a big deal this is. We're hoping that we can get all the other systems working that well together that servers won't ever need to be wiped. Losing the collider limit is a huge step towards that.

Unity 5 added reflection probes. From what we can tell, this isn't feature complete in the beta yet. But Andre hooked a system up to create a reflection map based on the current time of day.

I can't even start to tell you how many "out of memory" errors we've had when developing Rust. We got into a position with the procedural map that we could only run it in the editor once, which would set us really close to the 2GB 32bit limit.. running again would push us over so we'd end up restarting every run.

With the 64bit editor that's no longer a problem. We can now use up to 128TB, so I don't think we're going to need an 128bit editor for a while.

Ores now correctly contain metal ore, stones and sulfur ore. This means that a lot of the items are now craftable.

Speedtree isn't in yet. They're making a special editor and it isn't finished yet. But when it is our trees and foilage will be about a million times better.. so we're not putting any more work into the current ones.

Goosey has implemented the huge majority of player animations now.

I put up a test server with a tiny map a few days ago. This was to stress test the game by forcing everything into the same area, meaning that when you spawn the server sends you everything. Amazingly the server didn't blow up.

There were issues when spawning though. These still exist to an extent but now they're manageable. Half of the problem is that when you spawn into the server you're being sent information about every player that has joined the server whose body hasn't been destroyed. Right now if you join you're being sent 11,000 sleeping players, which you then spawn. Unity's prefab spawning stuff is notoriously slow. Things have got a little better in 5.0.. but it's still going to take a few seconds to spawn 11,000 players.

That said, the whole point of this was to identify potential problems. Now we know them and we can look into potential solutions.. like spawning things that are closer to you first, then slowly spawning everything else over a number of frames. For every problem there's 100 clever solutions, this is why we love what we do :)

Dan's finished off the new torch model, and modelled the holders for it.

Meg has been doing meat concepts again. We want to make the meat feel like it's from the animal it's from. We want you to look at a piece of human meat and see it as human meat.. and think twice about eating it.

Howie has been contemplating how we're going to add roofs to our houses, and what they'll look like. We've been trying to think of ways to minimize the amount of different parts the player has to handle during this process. We started a new trello board dedicated to building components.

He's also done a pretty swish concept for the stairs

Unity5 is in beta so there are obviously some issues with it. Some things are broke right now. It'll get better as Unity5 moves closer to release.

  • Voice Chat is disabled
  • Entering caves is broken
  • Shadows are flickery (they always have been in Unity I think?)
  • There's a weird outline around the leaves of trees
  • Rendering trees can have a really negative impact on framerate
  • Motion Blur is disabled by default (there's an issue with our shadow caster shader)
  • Adaptive Tonemapping is disabled (night goes too bright on osx)
  • PVT is disabled (just to rule it out of the equation when testing for problems)

  • The UI can become unresponsive (Unity is better threaded now, it can overwhelm the UI's process)

  • We're using the legacy renderer because the new one has no fog

Another thing to keep in mind is that the render-pipeline has changed. With things like the new lighting and reflection system a lot of the old art might look odd next to art that has been upgraded to use the new system. We're not going to rush to spend a month updating all the old stuff (specially not until Unity5 is out proper), but stuff will get tweaked to look like it all fits together over time.

Paul drew a bunch of crates

So we kind of lost a week porting to Unity 5 but we're in an awesome future proofed position. You have no idea how freeing it feels. No more out of memory errors, no more collider limits. The future is looking bright.

There's not that much left until we hit baseline.

AI, obviously. Wolves, bears need to attack the player. Deer and boars need to try to run away. It would probably be wise to get some chickens in the game too.

Blueprints. We need to look at how the player receives blueprints. Right now you can craft anything you want. Further down the line we want to be looking at a system when you can trade blueprints, you can research them and they spawn in loot. Maybe the ability to trade blueprints on the Steam marketplace could be interesting in the future. We think it would be interesting if your blueprints were persistent from server to server. Maybe if you could only have a finite amount of active blueprints. These are all ideas we want to explore.

Building. It's working, it's pretty much done. There are places to go with it. Wall upgrades and roofs in particular. There's been a lot of noise about having different layers of foundations too.

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