Facepunch Studio’s founder Garry Newman and his team have been porting Rust over to Unity 5. How did it go? This blog post tells the yet untold Journey of Rust. Do you dare to journey with us?!
Working in the Unity field I get to meet lots of talented developers who use our engine. I’ve been supporting Facepunch Studios with the port and I thought that their experience was worth sharing. So I asked Garry Newman a few questions.
How big a part has Unity had to play in the success of Rust so far?
The only other engine I used was the Source Engine, which is like very different from Unity. You can change a texture, a material or a model and this instantly updates. Having 3DS Max or Photoshop open on another monitor making edits which is instantly reflected in Unity. This saves us about a minute of work. Over a span of 6 months that’s a massive deal for us. With the other engine, I would have to quit the game and reload it every time. Unity actually makes it fun to tweak things and you’re more likely to experiment just to find different ways of doing stuff.
How long did it take to port Rust to Unity 5?
It was probably about two hours, there wasn’t really much to it. Unity updated all our code automatically, in an instant. There were some issues with add-ons from the Asset Store that didn’t update right. We already hired the developer and he updated his plug-ins for us, so that problem was solved.
There’s a new system in Unity 5 that gives you a bit more control over plugins and dll libraries. At first, that freaked us out a bit, but soon we understood that it just means that we don’t have to put these things in these folders.
Of course, if you want to use the new shader system and stuff, you’ve got to actually go through all your content and update the materials and everything. If you want it to look like Unity 4, you just update and it works.
But to implement the new standard shader and lighting system has been a longer process?
The artists had to realise that there’s a new system there. It’s a new way of working, really. They use the new Substance Painter, because it’s a bit more accurate with the actual inputs. Once they figured it all out, they are getting better results and they don’t have to work so hard to get good-looking scenes.
What was the first thing you wanted to change in Rust with Unity 5?
We wanted to see how good looking materials we could get, so we looked at making dynamic reflections and things like that to basically use all the new features in the new renderer.
It’s still an on-going process, we always go back to our materials and tweak. We will see a screenshot and see that it looks crap and we will update it.
What do you think about the other workflows with Unity 5?
It seems about the same really, though there are still some annoyances like adding events to animations. The audio stuff, that loads better. The material stuff seems a bit more complicated at first, but once you understand what the system is and how it’s working, it’s a lot easier. The new shading system is really good for making a material as you don’t have to choose a specific shader. If you want a normal map, you just add it and it works.
Touching on the Audio side of things, we have made a massive improvement there, how have you liked using it?
To be honest, we have only started using it. For now, we’re only using it to balance the volume for specific sounds like the footsteps. But it’s going to be useful moving forward when we start to add effects and things. I like that you can assign a variable to some of the parameters, it’s going to be really useful for volume controls. For example, if you’re in a cave, the sound will echo.
None of us are really audio guys, half the words on there we don’t really understand, but we will get to it.
Which Unity 5 feature had the biggest impact so far?
It was the PhysX upgrade. In Rust, we kept hitting the 65,000 collider limit on our servers, so we had all types of hacks to merge all these colliders together so it was really slow. Now there’s no limit now really, it’s perfect. The new PhysX system seems overall a lot faster.
We were having a lot problems with physics in Unity 4, for example, you had to add a rigidbody to a collider. If you moved a static collider, this added like half a seconds worth of lag. Now you can move stuff as you want and it’s free. It’s perfect for us because I’m not a fan of having hacky code.
So the PhysX update helps the end users as well as development workflows?
Yeah, they probably don’t realise it, but it really makes a difference. For example, when you moved from one section to the other in the old Rust, you used to get a couple of seconds of lag when we rebuilt all the physics colliders. That doesn’t happen now, there’s a lot more freedom for us.
Are there three top porting tips you’d like to share?
There’s a good video on the new shading system that explains exactly what all the inputs are. You shouldn’t just try to eyeball it, as there are actual scientific values you can use.
Check your dll’s and ensure the settings are right on them.
There’s an upgrade guide on the beta page, which you should read as this pretty much highlights everything you need to do.
Final question, what’s next for Facepunch Studio’s?
Pretty much the same as we are doing now, Rust is a long term project. Garry’s Mod is nearly ten years old and we’re doing a similar thing with Rust. We have a few prototypes in the works though.
Anything else you want to share about Unity 5 or Rust?
Just thanks for making Unity I suppose, it’s just made our jobs easier and more fun compared to the old days.
Rust is a hugely popular game and is available on Steam for PC, Mac and Linux. It was a pleasure chatting to Garry about Rust and I look forward to it’s continued development with Unity 5.