1. Cleared Hot
  2. News

Cleared Hot News

Missions, Upgrades, UI!

Welcome back, future pilots and brave early adopters... Let me regale you with tales of battling Unity UI elements and ever growing game loops.

Missions!

A lot of people have been asking me if the game will have a campaign mode. Yes- it does! I'm taking this a great sign that people do want some kind of a direction in the game. I plan on having both a campaign mode and a variety of "quick play" modes that you can pick up and play within seconds.

My goal is to not make it entirely linear, but to have some kind of a path to follow. There will be ways to make it easier or harder on yourself, as you prefer, by choosing when to upgrade your helicopter and how early you take on the harder missions.



Here is a quick preview of the Mission view. These missions are all drafts or for testing, and not what will be reflected in the released game.

Upgrades

Next on my list is an upgrade system that allows you to increase your helicopter's stats, add new weapons, and unlock new ammo types.

This is what I'm working on currently, so all I have right now is a draft of the UI from the designer I'm working with.



As I'm currently planning (this may change) but upgrades work like this:
  • Each upgrade has a cost and a minimum XP required.
  • Once purchased, it can be installed or removed from any helicopter you own (yes you'll be able to have multiple, of course!)
  • Each upgrade has a weight. Your helicopter will have a max weight, so you'll have to make strategic choices about what to install. Some helicopters will have a higher max weight so you can install more.
What kind of missions do you want to play? I'd love to hear from you- what comes to mind when you think of missions for this game? I have a wide variety of ideas but I'm super curious to hear yours.

Sign Up For Beta Testing

Do you want to be the first to play a closed beta of the game? Join the email list here: https://clearedhotgame.com/email-list/

I don't have a date set for this yet, but you will be the first to get access. I will add more info as the time gets closer.

No Rope, Best Rope?

Welcome, gather round and take a seat, as I fill this dark chrome window with half-intelligible war-stories of trying to make a rope, a simple rope, that hangs beneath a helicopter... It's been a long summer of solo-dev, and it's time to open the kimono.

[h2]Why A Rope?[/h2]
I think the coolest part of having a helicopter in a game is that it's still able to interact with things on the ground. And the rope just expands those possibilities.

There's a lot of interesting gameplay scenarios that involve moving things around: people, vehicles, supplies, etc. And I want the game to be very open ended as far as what you can pick up and how you use it. So we need a rope, and it needs to be physics based.

[h2]Enter Particle Physics[/h2]
My first attempt used a rope that was simulated with particle physics. It also had a magnet that could shoot out towards your crosshair. But the rope was limited in length, and often times you wouldn't hit what you wanted to.


The problems with this approach were:
  • It was very performance intensive
  • Objects would swing way too much, and placing things precisely was impossible
  • Objects would swing around and on top of the helicopter and land on the rotor blades
  • Connecting to objects was frustrating and time consuming

[h2]No Rope, Best Rope?[/h2]
After a trip home where I got sick and took a full week off, I returned with fresh eyes and had an idea: what if I separated the rope from the actual physics of carrying things? Then I could code the behavior directly, and just add a purely cosmetic rope to make it look right.

Had I been searching for the best rope, but really what I needed wasn't a rope at all? I took a deep breath, deleted the rope from the helicopter object and stepped into the void.

I thought, if I'm not just using a rope, and designing the behavior from scratch, what actually is the desired behavior?
  • Objects under the helicopter are highlighted so you know which one you'll pick up
  • Once you select an object, you know it's the one that will be picked up
  • Objects are pulled in and hang mostly underneath the helicopter
  • Objects don't bounce or swing too much, so they can moved and placed effectively
  • Objects under a certain mass should move similarly, but really heavy objects should move more slowly, or should slow down the helicopter.

On a whim, I decided to try a PID algorithm to move the objects directly.

[h2]WTF is a PID[/h2]
The PID algorithm is one of those things that sounds complicated because it's an acronym (also when you call it an algorithm), but it's actually fairly simple. It's just a way to move something to a target, and being able to control how fast it gets there and how much it slows down as it gets closer. PID stands for the 3 parameters you can tweak: proportional, integral, differential.

You can use PID control for many different things; it's used by thermostats to get the temperature right, used by robots to move objects, etc. I was an electrical engineer in a past life, so that's where I heard about it.

So how do we use it here? We have a PID controller that tries to move an object to a place under the helicopter. We have another one to add torque (change the angle) of the object, so it sways with movement. In the Unity Debug view it looks like this:

The green circle shows the range of objects that can be picked up, and the magenta line shows the force being added to the cube once it's picked up.

Then we connect the helicopter and magnet with a "cosmetic" rope, and it looks pretty good. This rope still uses particle physics but is much more performant.


[h2]What Can you Pick Up?[/h2]
  • Vehicles (even when being driven by AI)
  • NPCs, both friendly, enemies, and civilians/VIPs.
  • Inventory Supply crates, which give you additional ammo or other items once reeled it.
  • Any kind of movable objects (burned out cars, crates, etc).

To make all of these possible, there were some edge cases to cover.
  • NPCs have to be "unpinned" so they behave as a ragdoll
  • NPCs are carried by their hips, but if you calculate the force by using their hip mass, it's not enough. So we need a way to override the mass used by the PID in certain cases.
  • Vehicles should generally work but we don't want to flip them over
  • Inventory Supply crates should give us ammo and then get destroyed cleanly

To solve this, each object that can be picked up has a PickupRoot component on it, that can declare it's type, mass, and can be inherited from for the things that need special care. For example, there is a PickupRootNPC that can unpin the NPC when picked up.


NPCs can be picked up, and actually still animate while being carried around. Should they still shoot at enemies while hanging?

[h2]What Do You Want To Know?[/h2]
Ok, you read this far. You're a pro. What do you want to hear more about? What should I cover next time? Hearing from you is motivating, so let me know!

If you're interested in eventually getting a steam key to play a closed beta, you can sign up for my email list here: https://clearedhotgame.com/email-list/ I don't have a date set for this yet, but you will be among the first to get access.