GGO17 - Day 4

Between my work project go live and running around to get spoiled rotten by my wife for my imminent birthday I didn't get much time to devote to this project today, but the 2-3 hours that I did manage were still super productive!

I present to you working parachutes!
Working parachutes!

This was super fun to work on! First I added the ground and wrote a script called GravityIsABitch.cs which is responsible for killing a paratrooper that collides with it at too high a velocity! I then spent some time reading about survivable falling heights on StackOverflow of all places and fine tuning the script so that a trooper falling from < 12 meters has a small chance of surviving.

Then it was time for the parachute. It's basically just a physics object with a very large amount of linear drag. Once I got the parachute by itself falling nice and slowly, I simply had to attach it to the trooper with a fixed joint and he was surviving falls from great heights.

The last bit was that I noticed in the original game that the troops are kind-of using the HALO (High Altitude, Low Opening) technique, where you free fall for as long as possible before opening your chute to avoid being a slow moving target for too long. This necessitated two scripts: Parachute.cs changed the parachute into being packed by default, with a functions to open the chute and another to re-stash it on landing. The second script was Skydiver.cs which took care of logic for when to open and stash the parachute.

We just need to implement guns doing damage and planes or helicopters dropping the paratroopers now - then most of the base game mechanics are in place and we can start experimenting with adding new ones.