Rust Marque Logo

Devblog 144

We've added a new revolver, fiddled with farming, re-animated the game, optimised, and more.

19 January 2017
Devblog
Here's Shadowfrax with his regular look at the week's patch.
Our player animation rig was dumb, and every time we added to it we made it worse. We've been putting it off for a long time, but this week I aimed to simplify it. The major issue is that for every hold type in the engine (rock, hatchet, rifle etc), we had a set of accompanying walk/crouchwalk/jump animations to go along with the player. This probably makes sense from an artist's point of view, because you want the player to look like they're carrying something heavy when they're carrying a rocket launcher, and that should affect the whole body. This is bullshit though, because even though that capability was there it wasn't being used. Plus, it's more important for players to be aiming right at where the player is aiming, so you know if you're going to get shot. That isn't something that was happening in this rig when players were jumping, or walking at an angle. Gameplay has to take precedence here. Even though most of this work has been done on the internals, there are some changes you'll see as an end user.
  • Player model upper body always aims where player is looking
  • Can see when players are ironsighted/hipfiring
This change should allow us to add player animations more easily in the future, so it's all done when we want to be doing gestures, or make the player actual strum the guitar, or make their hands actually hold the weapon instead of half clipping through it. This was a big change, so we have some known issues that will get fixed next week:
  • Some one-handed hold animations look dumb when running
  • Some hold animations are facing the slightly the wrong way (spear etc)
  • No ladder climb animation yet
Along with Diogo, I've been spending some time with the prerelease branch. Prerelease now uses Unity 5.6.0 beta, which includes the new Navmesh stuff, and the new AI stuff. I've been setting this up and testing the limits, and so far so good. The new AI system is more flexible than the old one. We're going to be looking at having more PVE in the future. Our goal is something for players to fight against together. That and bears not walking through walls anymore. I'm looking forward to reading about how it was better when bears could walk through walls later this year. But don't bother jumping on the prerelease branch hoping to be fighting 100 foot animated stone statues yet though, because it's broken at the moment.
I’ve further developed farming and we’re nearing the completion of this system. Now you’ll notice that plants will grow gradually over time rather than directly snapping to their next stage, so you can visibly monitor their progress. An important part of cloning!
When you place a seed, the created plant has random genetics. Right now these genetics determine its growth speed. If you notice one plant is growing much faster than the rest, it is probably due to it having good genes. I’ve added a system that allows you to take a clipping of a plant by holding down E instead of just harvesting it. The G-number associated with the plant indicates its genetics, a value from 0-10000. The higher the number, the better the genes. You can replant the clone just like you would a seed and selectively breed only the best plants. This is just a baseline. Later on I will expand on the plant genetics so that they dictate growth speed, water requirements, yield bonus, disease resistance etc. This might seem silly right now as no-one is really planting, but next week I’ll make sure that planted food is way better than found food, and eventually we will add medicines and stuff like that. Have fun!
The Crossbow now costs 100 Wood, 50 Metal Frags, 1 Rope, and 1 Gear. To everyone bitching on reddit: the gear cost has to remain for now until I rebalance the component loot tables. Sorry!
Lots of people have said the P250 was perfect; lots of other people have said it needed a nerf. The conclusion I came to is that the P250 is too good for how “easy” it is to obtain, and it's also is being used in place of other more higher powered weapons at long distances. I’ve changed things up so it behaves more like what it actually is: a pistol. The main change you will notice is that the P250 has a severely reduced effective range by way of damage reduction at a distance. Wait! Before you freak out, understand that the gun will still function exactly the same as it did before at close range (20-30m), but damage will fall off quickly beyond that range. I think this is a fair trade off, at least to start. You shouldn’t have a weapon that you can use at any range like a Quake 3 railgun. Come on! Also I slightly increased the vertical recoil lolz.
The Python Revolver has been added to the game. It sounds like shit because we had to remove a commit that contained its real audio files. We will patch this client-side later on. Basically, this is a slow firing, high-damage pistol. It isn’t great at range, but is better than the other revolver and the P250. It only has 6 shots and high recoil. I'll monitor the response and balance as required. I saw some comments on reddit regarding how we shouldn’t be working on new weapons and instead should be working on feature X. Please understand that artists can’t help with code and when they produce a model it does not take very long to implement it in the game. If our weapons guy is doing weapons models I’m not going to not add them! So please enjoy.
I finished the animations and sounds for the new python revolver and also made the worldmodel. This is what it looks like in your hands.
I started the long task of creating art assets for natural overgrowth in the game. Despite being in all our concepts, it's long been missing in our environments, and for a multitude of reasons it got postponed until now. Now I feel like we have the knowledge of the game and the tools to put this in place. Keep in mind this is primarily for our static environments at this time. We have talked about overgrowth in the past when speaking of the decaying player bases, and while it’s not what I am focusing on right now this isn’t out of the picture. So for the most part I've creating high poly meshes for all the bits and bobs of vegetation required. Before that I had a think as to what types of plants I would need to create a diverse enough environment. The goal was to store all that data into one texture atlas that would help us batch this extra amount of detail on the GPU for a best performance compromise. With that part being done, I started to turn these into 3D models that will end up dressing the dungeons. I'll be replacing our current grass over the terrain, in a bid to make it look more realistic as well. Here are some shots of the work in progress models: Not shown here are more creeping plants types which will be used to dress our derelict buildings. Stay tuned.
I further reduced the amount of rigidbodies on the client by stripping them from all player entities that don’t need to interact with colliders and triggers. The only things that are still using rigidbodies on the client are the local player and ragdolls. This really helped push down the physics overhead per frame on my machine. An individual physics frame now takes 0.3ms for me while only a few weeks ago it was at 2.0ms or higher. It will be interesting to see how this plays out on high population servers.
With the addition of junkpiles we really got to the limits of our dynamic resource spawning system. Since junkpiles are really large they could spawn partially inside buildings or sometimes even on top of players. They also didn’t check the surrounding terrain to make sure that they’re properly grounded. I fixed this by adding the more advanced checks from the world generation to our dynamic resource spawning system and adding additional checks for players and constructions.
We've been getting reports about shadow jaggies becoming distracting, especially in motion, since we started forcing shadows. To help mitigate this problem we had "graphics.shadowmode 2" available to help smooth out the shadows at a reasonably low performance cost. Problem is it wasn't available in graphics quality modes below 5. We've now enabled it in quality modes above 2 and we'll be keeping an eye on your feedback. Feel free to try it and let us know.
I've been working mostly on the Prerelease branch these past few weeks, specifically on optimizations made possible by new features available in Unity 5.5+. A lot of the work has been going to getting dynamic occlusion culling up and running for entities. Players and ragdolls now already being culled by occluding surfaces like terrain. By the time Prerelease gets merged into main, most entities will use some form of dynamic occlusion to avoid unwanted runtime overhead when they're out-of-sight or occluded by obstacles
The reworked bear is starting to take shape. It's still a little rough in areas, but it's getting there. I'll be refining it next week and adding in a bunch of alpha cards to break up some of the nasty silhouette artifacts. And here's a wee video.
This week I’ve been focusing on replacing some of the remaining greybox assets. I made a set of electrical boxes and replaced the placeholder ones that were still being used in the levels. I have also replaced some of the old placeholder vans with the new truck variants I made recently. Also, I started working on texturing the bunker rooms found within military tunnels, but more progress on that will be shown next week.
More optimisation this week and organising of prefabs. The main culprit meshes are now within our desired budget range. I’m just working through the rest of the list.
I finished up a polish pass over the wolf sounds, and it’s sounding a lot better. Everything sounds a lot cleaner, and there’s a couple extra attack sound variations now. I finished the sounds for the new revolver, which were really fun to work on. There’s a specific and hard to reproduce performance issue that we’re trying to track down that’s either coming from code that’s running in a Unity coroutine, or is somehow related to a coroutine, so I adjusted some of the sound system code to remove all of the coroutines from it so we can rule that part of the codebase out. I spent a bit of time testing everything before making those changes and wasn’t able to reproduce the issue we were seeing, but this was a pretty easy way to know for sure whether it’s sound related or not, so I went for it. I’ve made a few mix tweaks this week too.
add_circle

Features

  • Added Python
arrow_circle_up

Improvements

  • Player model aim better representative of where player is aiming
  • Optimized player animation
  • Can see when other players are using ironsights
  • Improved wolf sounds
  • New sounds for python revolver
  • Sound mix tweaks
  • Optimized client side player entity rigidbodies
  • Resource spawns check for players and constructions in a radius
  • Junkpiles check surrounding terrain when spawning
  • Improved spawn handler respawn rate using multiple retries (easier balancing)
  • Allowed “graphics.shadowmode 2” on quality level 2 and above
  • P250 damage falloff increased
  • Plants visibly grow over time instead of snapping to their next stage
  • Can take clones of plants
  • Plants have genetics shared by clones
  • Plants always have a small seedling visible when planted
handyman

Fixed

  • Fixed server errors when shooting junkpiles

Newsletter

Recieve monthly updates straight to your inbox