A F*cking Tank
Sometimes when I've been hard at work on the "guts" of the game, I start to crave something that's a little more tangible... something that I can shoot. Even better if it shoots back.
So after working on an entirely new upgrade system, with it's fair share of head-scratching bugs, I decided to treat myself to a brand new unit: a f*cking tank!
Why is the tank shell green? I was tired of gray.
I had this idea in my head of a fully physics based tank, that bounced around from recoil and could be picked up by a strong enough helicopter. How much does a tank weight, anyhow? More on this later.
Let's start with movement. This thing has to be able to roll around and climb over objects, but it's not quite the same as the 4 wheeled vehicles in the game, like the pickup truck. Oh and it has to be simple, because I want to be able to have a ton of these in one level.
I decided to try an approach to model the tank tracks with a series of wheels.

Each one of these wheels uses a raycast (like an invisible laser...) to figure out how far the ground is. Then it applies some forces based on this distance. One force is applied upwards on the tank, simulating a car suspension. The other resists moving sideways, like a tire or tank tread would. You can set the friction how you'd like, so you can make it as sticky or drifty as you want.
You can see the suspension forces in the Unity editor- the red lines represent how much force is being applied upwards from each wheel.

You can see it doesn't have much trouble getting over obstacles :)
Oh and yes, it can shoot! One of the great things about this stage in the game is that I'm starting to re-use core pieces of code. The tank uses the same code to shoot it's projectile as does the helicopter, and the NPCs who have RPG launchers.

The tank shells will do a lot of damage, but you should be able to dodge most shots.
An M1 Abrams tank weighs about 55 tons. Pretty heavy. Each helicopter in the game has a max upwards force it can give, and the object you're carrying exerts a force on the helicopter. By default, this Little Bird helicopter wouldn't be able to move a tank. It can be tuned a bit for gameplay, so maybe it should only be able to drag a tank, but a larger helicopter could carry it. This is TBD based on what makes the gameplay better.

I will be at the Game Developer Conference in San Francisco this year, March 20-24. Come say hi and I'll give you a sneak peak of what's to come.
If you've read this far, you should be on the email list. I consider you an early adopter and I'll be asking for direct feedback on the game's direction soon. I want to hear from you! The game's at an early stage where you can have an impact on what comes next, so take advantage of that.
Join the email list here: https://clearedhotgame.com/email-list/
So after working on an entirely new upgrade system, with it's fair share of head-scratching bugs, I decided to treat myself to a brand new unit: a f*cking tank!

Movement
I had this idea in my head of a fully physics based tank, that bounced around from recoil and could be picked up by a strong enough helicopter. How much does a tank weight, anyhow? More on this later.
Let's start with movement. This thing has to be able to roll around and climb over objects, but it's not quite the same as the 4 wheeled vehicles in the game, like the pickup truck. Oh and it has to be simple, because I want to be able to have a ton of these in one level.
I decided to try an approach to model the tank tracks with a series of wheels.

Each one of these wheels uses a raycast (like an invisible laser...) to figure out how far the ground is. Then it applies some forces based on this distance. One force is applied upwards on the tank, simulating a car suspension. The other resists moving sideways, like a tire or tank tread would. You can set the friction how you'd like, so you can make it as sticky or drifty as you want.
You can see the suspension forces in the Unity editor- the red lines represent how much force is being applied upwards from each wheel.

You can see it doesn't have much trouble getting over obstacles :)
Shooting
Oh and yes, it can shoot! One of the great things about this stage in the game is that I'm starting to re-use core pieces of code. The tank uses the same code to shoot it's projectile as does the helicopter, and the NPCs who have RPG launchers.

The tank shells will do a lot of damage, but you should be able to dodge most shots.
Yes, you can pick it up
An M1 Abrams tank weighs about 55 tons. Pretty heavy. Each helicopter in the game has a max upwards force it can give, and the object you're carrying exerts a force on the helicopter. By default, this Little Bird helicopter wouldn't be able to move a tank. It can be tuned a bit for gameplay, so maybe it should only be able to drag a tank, but a larger helicopter could carry it. This is TBD based on what makes the gameplay better.

GDC 2023
I will be at the Game Developer Conference in San Francisco this year, March 20-24. Come say hi and I'll give you a sneak peak of what's to come.
Email List
If you've read this far, you should be on the email list. I consider you an early adopter and I'll be asking for direct feedback on the game's direction soon. I want to hear from you! The game's at an early stage where you can have an impact on what comes next, so take advantage of that.
Join the email list here: https://clearedhotgame.com/email-list/