Vacuunaut

Engine: Unity

Production time: 4 weeks

My Role: Gameplay Programmer

Vacuunaut is a first-person puzzle game where you have to recycle and clean with a vacuum cleaner to power up a broken space station. I primarily worked on the vacuum cleaner and its interactions with objects in the world. Additionally, I worked on some UI elements and graphics shaders.

I wrote everything in this repo.

We used perforce for this project so the github commits are not an accurate representation of the commit history

The Vacuum Gun

The vacuum gun sucking up cleanable objects

The vacuum gun pushing away cleanable objects

Originally when we were determining what the game would be, we wanted the player to have access to multiple different tools that they could use to interact with the environment and fix the ship. For this purpose I choose to go with a modular approach to how equipment could be designed, by having them equip different actions and conditions.  However due to time constraints we only had time to fully develop the vacuum gun.

The Vacuum gun has four different modes. It is able to suck up objects, carry objects, push away objects and fire compressed trash pellets. The gun utilizes the strategy pattern to equip the different actions, meaning it is as easy as changing a few values in a scriptable object to change the behavior of one of the actions.

The vacuum gun shooting pellets

The vacuum gun carrying an object

The thing that primarily makes the modes behave differently is what action conditions they have and what clean actions they have. Since these conditions determine when the clean action happens, and the clean action determines what is done to the cleanable object.

Additionally, the cleanable props themselves have a reference to a specific action and have their own collection of conditions. This way cleanable props can have actions that override the action of the vacuum cleaner. An example is objects that are not allowed to be sucked up and destroyed by the vacuum cleaner, but instead use the attach action making the player pick them up when trying to destroy them. 

Shaders

A showcase of the different shaders on the vacuum gun

I wanted to explore shaders in this project and luckily it was decided early on with the transition to only having the vacuum cleaner that most of its info should be displayed on the vacuum cleaner itself. This gave me the opportunity to experiment and come up with some interesting effects.

The light on the side of the vacuum and the air flow indicator were both done in shader graph.  The capacity indicator was done in HLSL.

Here is a link to the shader folder with the code

Air Vents

The air vents were unfortunately under-utilized in the final game, as they were only present for one puzzle. I coded them with two separate functionalities. The first functionality was that any cleanable object that entered one of them would be teleported to the other connected air vent. The object would then be spit out in the direction that the connected air vent was facing, maintaining the magnitude of the velocity the object had when it entered the first vent.

The air vents teleporting a cube between them

The air vents extending the vacuum actions

The second functionality was that they could extend the air flow of the vacuum cleaner. This allowed the player to suck objects through one vent to the other or push objects on the other side of a connected air vent. The script is relatively simple and only requires that it has a reference to another air vent to connect to in the scene.

Here  is the script that handles the air vent.

To see all the code I wrote for this project follow this Github link. I wrote everything located in this repo. We used perforce for this project, so the github commits are not an accurate representation of the commit history