Rust Marque Logo

Devblog 175

Tank fixes, craftable Hazmat suits, optimizations, and more.

31 August 2017
Well that was a fun week! Thanks to all the feedback and random Youtube videos I nailed a few major problems with the Bradley, and worked in a few upgrades. The biggest issue was in the pathing system. If it was in a tight area and changed its mind on where to go, and the new position was behind it, it would attempt to turn around to move there. Unfortunately in areas that were too tight it would get stuck Austin Powers Style. Forever. What I did was mark certain path nodes as straightaways so that if it needed to path to somewhere behind it, it first finds a path to the closest non-straightaway node ahead of it, and then paths from there. This means it will continue out of a corridor before making a drastic turn. In some cases this might look like it is being stupid but IRL the only thing you'd be able to do is reverse. I haven't gotten around to that yet. Secondly, there were some road cones and boxes a little too close to the Bradley path that were apparently made out of lead and causing the tank to stick. I've pushed these to the side or deleted them to clear the way. Support for switching the emissive materials on/off during day/night has been re-added. This also means that when the tank is destroyed the gibs no longer have the headlights on. The Bradley now has 1000 health instead of 500, meaning it'll take six rockets or two C4 to destroy it. It will also automatically heal itself over 60 seconds if it has not been attacked for 5 minutes. This means you can no longer cherry pick Bradleys from failed battles. I've also added some damage effects similar to the helicopter, so you can tell how damaged it is from afar. The coaxial machinegun has been adjusted to properly aim at the target. It used to aim slightly to the right, so the only reason people were being hit was due to aim cone! It is now much more deadly. To slightly compenstate, I reduced the damage per bullet to 7 (was 10). Gooseman also updated the main cannon and coaxial muzzle flashes and man are they good. They spit out casings and everything. Oh, and you'll no longer get kicked for flyhack if you manage to jump on it. However, its coaxial can now hit you when you're standing on top of it, so good luck with that. Lastly, the loot tables have been adjusted. It will no longer drop C4 or regular rockets. This was a problem where you could destroy a bradley with one C4, earn three, and keep doing it, effectively using it as an explosives farm. The most you can hope for now is a few HV rockets or a handful of grenades in terms of explosives. Other notable elements in the loot table are autoturrets, weapons and ammo, and armored doors (if you're lucky). Unfortunately, I was unable to get the secondary and tertiary weapons online this week, which means I'll need a few more days next week to finish up. When I'm done with those, I can move on to more important elements such as sorting out the progression and raid balance issues in the game, as well as other important things in the roadmap.
I've updated the roadmap with something very important. I've moved the Long Term Persistence element into the 'Now' section. We've kind of let it go on too long saying 'yeah yeah we'll get to that', but it's obvious that it's actually very important to address before we leave early access. I'm going to be experimenting with a few different options for persistence, and I'm toying with something akin to blueprints. Whatever we end up doing we're going to make sure it's tested and approved before launching it.
I've come up with a learnable pattern I'd like to use for SMGs and I've deployed it to the Custom SMG and the Thompson (they share the same recoil pattern for now). Let me know what you guys think. After that, it's just Semi Autos and we are done with recoil, hopefully forever.
Some minor changes here, but I fixed the muzzle flash rotation of the helicopter so that it no longer always faces 'up', but instead faces towards the target it is shooting at. The debris effect has been improved. Lastly, I upgraded the helicopter spotlight to have a smaller bias so that there is less 'light clipping' at night (this means less light will bleed through roofs, etc.). Check it out:
Gooseman/Minh Le did some awesome effects for the CH47 Helicopter (coming... sometime), and I couldn't help but steal these and upgrade our existing explosion effects. You'll notice both the helicopter and the tank have a much better debris effect when they're killed. You'll also notice a much nicer effect when you actually deal damage to the helicopter weak spots. It'll no longer be overly large brown sticks with odd physics. I've also changed the particle effect on the oil fireballs: you'll notice this around debris sites of the Bradley and the helicopter. It now uses a texture similar to the explosion effects we added a few months ago.
The Supermarket and Gas Station monuments are pretty much ready, but you'll have to wait another week, for the wipe, before you can go poking about in them. In the meantime here's some screenshots:
This one has been around for a while. There was some weird stuff going on with the roof side walls that made them sometimes have no collision or be missing visually. Since people figured out a way to exploit this I sat down and spent some time tracking down the problem. So yeah, this should now finally be fixed.
While optimizing some texture utility methods I spotted a memory leak caused by paintable sign textures not being freed under certain conditions. This was triggered when a paintable sign was destroyed and, most importantly, whenever respawning in a different area of the map, so naturally it was a pretty significant leak.
The decor spawn parameters were a bit of a mess, so I went over them and cleaned them up a little. While doing so I changed the bush spawn rules to favor fewer but bigger clusters of bushes over spawning individual bushes everywhere on the map.
As promised in last week's devblog I rewrote the file storage backend that's used by paintable signs in order to eliminate some fairly major GC allocations on both the client and the server. The biggest gains were made by rewriting the caching mechanism, which massively improves performance whenever a new or updated sign has to be loaded from the server. I also optimized our internal texture processing library that's being used whenever a sign entity is streaming in on the client and eliminated various smaller causes of GC allocations throughout the code base, like storage container hashing and coroutine yield instructions.
I've gone over our assets and removed about 300MB worth of assets that are no longer used by anything. Some of those were even being loaded into RAM, so it's good to have them cleaned up.
Unity recommends disabling their dynamic batching mechanism on essentially all of their supported platforms. Since we're using our own batching system for semi-static objects, like buildings combined with some instancing for more dynamic objects, it wasn't really being used anyhow, so we decided to pull the plug this week after confirming that performance is unaffected by the change.
I'm still slogging away on the character rework, but I had a little down time this week waiting for bakes and library rebuilds, so I've been able to make a start on a craftable version of the hazmat suit. This should give a bit more of a visual difference between players and scientist NPCs, while still providing players with some protection against radiation. It's not quite as MacGyver'd as the old radsuit (RIP frog booties), but still looks like it's been cobbled together from various scavenged pieces. This is a rough blockout of one option, but over time I'd like to model all the variations in the concept so they can be swapped out. You can check out Paul's awesome concept art below:
This week I took the opportunity to explore a bit more of the gameplay code, in hopes of fixing a long standing exploit related to flashlight abuse that took advantage of a bug causing the light to be always on on client-side. Another exploit I fixed, hopefully for good, was a see through wall exploit showing something akin to a pixel distortion leaked by players moving behind it. It was only visible when moving further away from the walls, providing an advantage to long range shooting.
Optimizations In other news, I continued making small strides towards optimization. I downscaled some textures that were larger than absolutely necessary, packed more materials and reduced system RAM footprint on some textures. This is an incremental process that will continue over the next couple of months since there's a lot of content to go through. Improvements Also changed the shaders used in the new explosion particles, introduced a few weeks ago, to have them be affected by fog and atmospheric scattering.
I haven't had much time for work this week, but I did more or less finish up the Navmesh Grid linking. We didn't get time to test it, so it will not make it on to the main branch until next week. Last patch made nav_disable stop working as intended. It has now been fixed, and as a side effect, if an animal fails to find a Navmesh to stand on the animal will die and produce a corpse rather than stand still or disappear. Scientists will still disappear in empty air if they fail to find a valid Navmesh, since their loot is more valuable (I will find a better solution to this problem; they shouldn't show at all until a valid Navmesh has been found, so this is just a first step).
I finished the last round of polish and tweaks to the granular engine sound system this week, which means that bit is done (other than a little code cleanup). I spent time tuning the cycle start/stop point detection after a new approach to that popped into my head and now it's pretty much as accurate as me choosing those points by hand. I got slight pitch shifting to create additional cycles for RPMs that only had one or two cycles available working pretty well too. I'm really stoked I was able to get this all working, particularly because we've got a few other prototypes in the works that will be able to leverage this system in the future. Now that the engine bit is locked I've started working on some of the other sounds for the tank. I did a design pass over the engine sound and I finished up gunshots for the main cannon, the machine gun beside the main cannon, and the side machine guns. I made sounds for the main turret rotation, some tank tread sounds and started implementing those. I'm going to take a granular approach to the treads, too, but it'll be much less complex than the engine sounds since we just need to play the individual clacks back to back based on the speed of the tank. I still need to do some lurchy chassis sounds for quick stops or bumps, explosions for the main shells and the tank itself, some crazy fly by sounds for the main cannon rounds, and sounds for the missile. That stuff's all pretty straight forward so I'm hoping to have this all ready to rock for next week.


  • Learnable recoil patterns for Thompson/SMG
  • Damage effects for Bradley


  • Disabled engine-side dynamic batching
  • Stripped some unused assets
  • Optimized coroutine yield instructions
  • Adjusted some memory pool buffer sizes
  • Optimized file storage system
  • Optimized texture processing library
  • Optimized storage container hashing
  • Optimized paintable signs
  • Tweaked decor spawns
  • Improved Oil Fireball effect
  • Improved Explosion effect for Heli/Bradley
  • Improved Debris effect for helicopter damage
  • Improved helicopter searchlight visuals
  • Bradley health doubled
  • Bradley heals after 5 minutes of no damage
  • Bradley loot table updated - far fewer explosives


  • Fixed occasional occludee related errors
  • Fixed new explosions not affected by fog
  • Fixed lighting going dark sometimes; e.g. mining ores
  • Fixed cave entrances sometimes closed in low graphics quality
  • Fixed texture memory leak from paintable signs
  • Fixed various bugs with the roof side walls
  • Fixed bradley getting stuck by turning around in tight areas
  • Moved props from launch site that were getting the APC stuck
  • Fixed Bradley lights on gibs
  • Fixed Bradley lights on during day
  • Fixed NRE's when using 'spawn bradleyapc' command
  • Fixed Helicopter muzzle flash always aiming up instead of at target
  • Bradley coax actually aims directly at targets now