This week I finally made some time to fix the vehicle physics. The handling on the Goat was horrendous and so fragile to configure that I decided to scrap the whole system we had in place. We were using a 3rd party library which was based on physically accurate simulation model and used Unity’s PhysX wheelcollider. Problem with this is, we spend most our time in real life driving on almost perfectly flat paved roads, and in game we expect that sort of handling all the time. If you took a dune buggy up a bumpy cliff at 100 km/h you would indeed lose traction and flip out.
Another problem is that the Unity 5 wheel collider is horribly unstable, not to mention changes its dynamics quite often, making upgrading to newer versions of Unity a pain as we have to rebalance the vehicles again.
In place of this, I built a much simpler system that uses none of the above (Instead uses manual raycasts and forces). As the wheel forces are completely custom, I now have complete control over how things handle. Instead of configuring friction curves, gear ratios, clutch / differential and engine rpm torque limits; we simply say top speed = X, acceleration force = Y, grip multiplier = Z and everything handles nicely.
You also now have some level of rotation control in the air to make jumps more fun, everything controls pretty similar to GTA 5 now.
Next I implemented all the new Roach panels and skins Mils has been working on (as seen in the header). A big benefit of the vehicle physics simplification, is that attachments can have additive effects on the performance of the vehicle without having to worry about breaking the initial fragile handling settings. For example, the engine sets the base acceleration & fuel consumption rate, the gearbox sets the initial top speed, a roof scoop can add additional traction multiplier (because downforce?) and a bonnet air intake can increase acceleration force. Armor plating can reduce damage to the car but also adds weight which slows it down.
All this runs through our entity stats system which the player uses to simulate metabolism / environmental effects. This means we can do things like decrease traction when the vehicle is wet or make a gun that causes a 90% drop in engine power for 10 seconds with a single line of code.
As usual, can’t wait to open this up in our SDK!
I also built the world spawner loot table for all the vehicles. In the new system, you can’t craft vehicles anymore. What this does is generate a random set of panel attachments, wheels and engine parts and spawns the chassis in the world. There is a very small chance that the vehicle will be drivable on spawn, likely you will need to scavenge for parts before being able to drive it. I decided to make the panels that the vehicle spawns with fixed for now. Meaning if you want a Roach with the complete SharkWeek body kit (feature image), you need to find it. Vehicles chassis’ will be easy come easy go, so will give you a chance to find a large enough number to eventually get that ideal rare spawn with the kit you want. This will likely change once we add some very expensive tools / machines that allow remodeling of vehicle body’s, until then you must find your perfect one out in the world.
Engine parts and wheels can be added / removed still and paint can be added but not removed.
This week I’ve been fixing exploits, bugs, and a few issues we’ve been meaning to get around to for months but never have. A small sample is implementing sounds for the Yeti, making machines not stack, adding more server configuration options, and fixing some memory leaks on the server. I’ve also started implementing the Infamy system – we’ll reveal more on this soon.
I am tying up loose ends and polishing any art assets that have had a bit of a place holder vibe. Also doing some fresh creations that we need for the launch.
This includes; Icons, Vehicle Skins, Promo materials for the launch.
Pretty much just trying to crank out content up till release. This week I finalised the Windmill model and made sure it was able to be separated into multiple pieces to get more bang for our buck. I have also done a snow/arctic and a forest type skin for the shigi, as well as multiple spear textures and feathers to make it easier to locate.
I was away last week with my family working on my tan 🙂
Hard back into it, sorting out all the animation bugs for shotgun and spear after Spencer’s hard work implementing them last week. Lots more to do to tighten the character up, including re-doing a lot of the rifle work based on some less awkward 3rd person posing that works better, and adding in a few more sounds.