TANK FIGHTERS

A 2-4 player fighting game where players control tanks and battle each other in a random series of arenas.

Solo Project

Dev Time: 3 Months

My Tasks

Try the game for yourself! Download available on itch.io

https://team-quest.itch.io/tank-fighters

Retrospective

Concept

My goal with this project was to create a top-down tank game, drawing inspiration from games like Jackal and Wii Play: Tanks! The original concept was a co-op experience where 1-2 players explore a series of procedurally generated rooms and battle AI controlled tanks along the way, but I had intended to spend only a few months on this project at most, and I knew my original concept would probably take longer than that. For this reason, I took away the 2 most difficult elements, the procedural generation, and the enemy AI. This left me with the concept of player-controlled tanks in pre-made levels, and I realized that these mechanics would make a great battle arena game, similar to games like Towerfall, Duck Game, and Stick Fight: The Game.

Gameplay from the 2006 Nintendo game Wii Play, more specifically, the minigame Tanks! which served as one of the main inspirations for this project.

Tank Controls

I put a lot of consideration into the control scheme of this game in order to make it feel as natural to play as possible. More specifically, I wanted to make sure it was easy for the player to turn and move their tank while also aiming and firing, rather than having to stop moving to shoot. For this reason, I settled on a twin-stick set up, where the left stick turns the player around, the right stick turns their turret, and the triggers move the player forwards and backwards.

To make the actual tank movement code, I started by re-purposing a top-down movement script that I had developed for previous projects, adding an additional mode that allowed it to move like a tank rather than with normal top-down movement. I thought it better to add the functionality of tank movement rather than replace the existing movement, as it makes the asset more versatile, and opens up the option to allow the player's movement type to change dynamically during play. I did end up taking advantage of this by including a power up that allows a player's tank to hover over the ground, and while in this mode, it uses normal top-down movement instead of tank movement.

Combat

The turret that sits on top of each tank is actually a separate object, with code on it that forces it to inherit it's position from the tank, but not it's rotation. Making the turret a separate object allows it to keep it's own rotation separate, completely unaffected by the rotation of the tank, which was another important part of allowing the player to move and aim at the same time.

Every shot fired by a turret carries information on it about the turret that fired it, including the ID of the player that shot it (if a player did in fact shoot it), the team that player is on, how much damage it will do, how many times it can bounce off of surfaces, etc. This information is reset each time a projectile is taken from the object pool to be fired, allowing any projectile object to be re-used by any player or AI controlled turret, meaning there's a much lower number of objects in the pool.

Power Ups

With the core gameplay mechanics done, I started making some additional mechanics that would add variety to each match and increase the game's replayability, starting with a powerup system. I began by compiling a list of mechanics that I thought would make fun power ups, and while doing this, I noticed that the mechanics I had listed all fit into 3 types: power ups that change the type of projectile you fire, power ups that change the way your tank moves, and power ups that allow you to deploy a support item. Having created these 3 categories, I decided that I wanted it to be possible for players to have multiple power ups at once, as this would increase the possibility for strategic play, so I created separate inputs for each category. I also made sure to color-code the power ups by type so that players know which ones will override each other.

With the power ups made, I then created a system which would randomly select power ups and spawn them at pre-determined positions in the arenas during play. I also created a separate system that allows players to equip any power up of their choice at the start of a match. You can choose which of these systems you want to play with, or even turn off power ups altogether, on the pre-game options screen.

The Big Shot ability (right) shown in comparison to the standard shot (left), fires a larger projectile that moves slower.

The Rapid Shot ability (right) shown in comparison to the standard shot (left), fires smaller projectiles that move slower but at a much faster rate.

The Bounce Shot ability fires a projectile that can bounce off surfaces a set number of times.

The Homing Shot ability fires a projectile that automatically homes in on the nearest enemy tank.

The Laser Shot ability fires a hitscan that instantly damages whatever it hits.

The Boost ability sends the player flying forwards super fast for a short time, during which they cannot turn. Anything you hit while boosting takes damage.

The Quick Turn ability decreases your tank's turning radius, allowing you to make much tighter turns.

The Hover ability lets you go faster and move in any direction without having to turn, at the cost of increased momentum. It also allows you to avoid floor-based hazards such as oil and mud.

The Shield ability deploys a shield around your tank, protecting you from projectiles.

The Land Mine ability deploys a mine. Once you leave it's range, it becomes hidden and arms itself. Once armed, it will detonate the next time an enemy tank enters its range.

The Oil Bomb ability deploys a bomb that leaves an oil puddle upon exploding. Any tank that drives through oil will be temporarily impacted with longer acceleration and deceleration times, as well as a larger turning radius.

The Mud Bomb ability deploys a bomb that leaves an mud puddle upon exploding. Any tank that drives through mud will be temporarily impacted with a slower top speed and larger turning radius.

Obstacles

As well as power ups, I also wanted to create obstacle mechanics that were specific to the arenas themselves, making them feel more distinct from each other. Firstly, I decided to create walls that could be destroyed by damaging them, allowing the players to alter the layout of an arena during play, and thereby changing they way they navigate the space. I made two versions of these walls, first being walls that can be gradually damaged until eventually being permanently destroyed, and the second being walls that are destroyed in one hit but then regenerate after a cooldown.

The next obstacle I made was pads on the floor that manipulate the players movement when they drive over them. One of these was the Boost pad, which makes the player boost forward in the same way as the boost ability described in the previous section. I also created a pad that teleports a player to another teleport pad somewhere else in the arena, with an arrow pointing in the direction it takes you. This gives players more options when navigating, allowing them to avoid potential danger or even make surprise attacks.

Finally, I made an AI-controlled turret that can detect players within a range and fire at them. Since I knew early on that I was going to attempt this, I wrote the code for the player-controlled turrets on the tanks so that all of the input detection was inside a separate class, thereby allowing me to re-use most of the turret code by replacing the player input class with an AI input class.

Customizable Rulesets

Another thing I did to increase the game's replayability was to create various modifiers that change the rules of the game. I used those modifiers to create a few distinct rulesets, each one designed for a different style of play, then I created a screen on the main menu where you can select which ruleset you want to use before starting a match. As you cycle through these rulesets, the game shows you which modifiers are used in the current selection, so you know exactly how each one works. On this same screen, you can also select the Custom ruleset, which lets you edit the modifiers yourself and create a totally unique ruleset, so you can play exactly how you want.


Art and Sound

As I usually do, I decided to stay relatively simple with the art and sound in this project, so that I may focus on programming. I made all of the graphics myself, specifically using simple shapes and colors, and all the sound effects were sourced from free resources online. One new thing I did in this project was that I made the music myself. I usually find the music for my games online too, but for this game, I had a very specific idea for how I wanted the music to sound, so I decided I would have a go at doing it myself. I was surprised at how well it came out in the end, considering I don't have much experience making music.

Conclusion

I was honestly quite worried during development that this game was not gonna be fun at all if I was not able to balance the combat just right, but when I was finally playing the finished version with others, it turned out to be as fun as I had hoped it might be. I'm also hopeful that I did a good job of ensuring that there is enough variety in the game to make it fun for a long time, with the inclusion of power ups, unique arena obstacles, and variable rulesets.

One thing that did become apparent to me during this project is that it's not super convenient to play-test a 4 player game as a solo developer, so I think in the future, as long as I am a solo dev, I will likely stick to making single player experiences.