top of page

Scenario Test Week 2020: Unity Airship game

In order to test the functionality of the systems in Unity's latest release, everyone got into groups and made small games. Our original plan was to have an airship you can pilot, some type of combat (cannons or guns), a repair system, and a lose condition (taking too much damage and your airship fails).

The first thing I did was program the airship's physics. It can go up/down (ballast), turn, and accelerate/decelerate. It would also make a good effort to try to stay upright, but could get knocked sideways a bit. In order to get this to work with the simple character controller we got off the asset store, I had to make quite a bit of modifications to make the player move and rotate with the airship, as well as keep from falling through the airship when it was going too fast. This took a lot of work but in the end I got it to work pretty well. There was a bit of jitter but moving around was very functional, and the jitter worked as a sort of screen shake to indicate the airship was going fast, so we left it in. There were additionally some bugs; your character would get launched into the air when moving by the physics force of the ship moving quickly, especially when climbing stairs, but I was able to fix this. More functionality was added to the character controller to allow the player to "lock" to objects (the ballast, steering wheel, thrust gauge and later the gun) and unlock smoothly without getting stuck.

Later in the week, as we got the ship's guns and interactable objects working, I began scoping out the core game loop. Our first step was adding danger: enemy airships were out of scope due to the lack of time, so I went with floating rocks with cannons that would spawn in and shoot at you, which I programmed myself. You can shoot the cannons to destroy them or just destroy the rocks. They would attempt to spawn in within a certain vertical and horizontal range, outside the view distance; if they ended up too far in front of or behind the ship (where you couldn't shoot them) due to the ship turning, they would move around the ship to where you can shoot them. They would start with the cannons aiming away from the ship and slowly aim the cannons towards the ship; this gave you time to notice them (cannonballs missing the ship are easy to spot and figure out where they're coming from) and shoot them down. The team was happy with this solution.

The repair system is pretty simple; you just look at a repairable object and press R. There is UI to indicate the health off the different steering devices as well as UI on screen indicating the total health of the airship. If that health reaches zero, the airship's balloon is destroyed and the airship will fall out of the sky and fall sideways. Additionally, damaged steering devices will leak smoke and their steering will function worse when damaged, so you want to repair them right away.

In order to complete the core gameplay loop, at the end I added checkpoint bubbles for the ship to fly through. This worked well with the other mechanics; you needed to pilot the ship by walking to the individual steering objects and using them to adjust the course of your airship, and repair them so you will stay on course; at the same time you will have to manage the guns and shoot down the incoming floating rocks, which will quickly overrun your ships with damage if you allow them to build up. This gives you several things to worry about at once and managing the repairs, steering of 3 separate devices to try to steer towards the checkpoints, and shooting down the rocks makes the game frantic and fun. The gun was also given a reload mechanic that takes time, adding a bit of strategy; if you have to reload and don't get a rock shot down, your ship can take some damage.

Another thing I worked on is the clouds: I did not make the shader but I was responsible for the system that keeps a pool of clouds objects around the airship and moves clouds around as they get too far from the airship and exit the view range as the airship moves, so that it will always have a field of clouds to fly through no matter how far it goes from the origin.

Things worked on by my teammates include model/texture asset creation, polishing and customization, physics blocking for the ship (I worked on this as well), the UI and its associated code, VFX graph particle effects, some shaders (like the cloud shader and the balloon dissolve shader), bullet decals, steering object repair / airship health mechanics, some of the gun steering (I worked on this as well), and setting up the scene for the rendering pipeline and the post processing stack. I also worked on the player controller + animations (which I got off Mixamo along with the player model) + setting up the player camera. There was also a partial system for seeing mountain tops but I didn't want you to have to steer around them (would have made the game too difficult) and running into them got your ship stuck in a way that made it too hard to course correct, so we left them out of the final scene.

In the end we were not able to add audio unfortunately, but aside from that and some errors/warnings thrown to console (didn't seem to break anything and didn't have time to fix), the project came out pretty complete.


Featured Posts
Recent Posts
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page