“Extra lives are often meaningless, so I wanted to make a game where they were the most important aspect.”
Stress CUPacity is an Arcade-style Top-Down Shooter game developed in Unity to be submitted as part of GJL Game Parade Spring 2022 game jam. I completed the game in around 7 days in my spare time as a hobby project. I was solely responsible for all aspects of the Programming and Design for the game, and I used generated sound effects using a free web tool.
The player controls multiple soldiers on a rescue mission. The player moves to avoid enemies and projectiles and shoots at them by aiming the mouse. The player controls all soldiers at the same time. If a soldier gets hit, they go into a “downed” state, where they can be revived (after a brief period) using other soldiers for the cost of a battery charge. Battery charges are also used to start a new run (which spawns a new player soldier). The player must accumulate as much damage as possible to deal with the increasing quantity of enemies by using battery charges to send in new soldiers and revive fallen ones. The player loses if they run out of battery charges and all of the soldiers die, and they succeed if there are any remaining soldiers when the evac chopper arrives.
The theme of the game jam was “Every Life Counts.” Having recently delved into more subversions of themes, I wanted to make a more literal approach and have the theme be the core concept of the gameplay. In the context of video games, “lives” has a very obvious meaning, so I wanted to do something with that. Extra lives are often meaningless, so I wanted to make a game where they were the most important aspect. Instead of extra lives just being a way for you to try again, I wanted the extra lives to be a resource that you spend that has a major importance. I came up with the idea of reviving your own self to further add importance to extra lives and fit the theme even more. The “extra lives” turned into “battery charges” in order to add some kind of loose narrative reason for why the mechanics are the way they are.
The design was mostly complete during the conceptualization phase. The main challenge was balancing the difficulty such that the player would be required to use the revive mechanic. I achieved this by making sure there was already one dead soldier on the field at the start and give the player two battery charges to begin with to encourage them to revive right away. I always made the difficulty increase as the timer went down. As the timer gets lower, enemies spawn at a greater frequency, meaning players who only have a couple of soldiers will eventually become overrun and will be forced to spawn in a new soldier and revive others. This also helps the battery use’s risk and reward gameplay. To make sure the difficulty was appropriate, I adjusted enemy speeds, spawn frequencies (and when it increases based on time), player movement speed, player damage, enemy health, and battery drop rate.
Having multiple characters be controlled by the same input by the player was as simple as having multiple objects with the same Player Movement script attached. Each time a run starts, a new Soldier prefab is created. The soldiers only receive input when an “isAlive” boolean is set to true. Naturally, it is set to “false” when enemies or projectiles collide with the soldier. If an alive soldier is touching the layer of a dead soldier and the player presses space, it checks to see if it has a battery available, spends on if it does, and initiates a revive state (the length of which is configurable in the Inspector). Once the soldier is alive, he is controllable along with the other alive soldiers. Aiming and shooting were done using modifications of a combination of code found online (from Brackeys and GameDev.tv).
Every time a soldier is hit, it checks to see if there are remaining soldiers alive. If there aren’t, it returns to the menu in order to spawn an additional soldier (if a battery is available) or goes to Game Over (if there are no batteries left). Enemy following AI was done by using the same code for mouse aiming, but using a random soldier (of the available alive soldiers) as its look point instead of the mouse and adding move speed (configurable in the Inspector). Tank AI was done by having a rotate and a move variable that selected between a random negative and positive amount when a timer expired. The timer is simply a variable -= Time.DeltaTime, which is also true of the evac timer.
The biggest challenge was the gradual increasing difficulty. I achieved this by setting a float to increase based on the percentage of the evac timer remaining. With this number tracked, I was able to apply it to the spawn point scripts as a reference, and use it to increase the frequency of the spawn rate as the difficulty float increases. This difficulty float could have been applied to other factors, such as enemy health or speed, but I found spawn rate flowed with the game the best.