Tanks Arena is a video game prototype produced in the Unity game engine. The game draws inspiration from top-down multiplayer games such as Boomerang Fu, and sees players control heavily stylised tanks which fire absurdly bouncy projectiles. Many of the game mechanics, such as the ricocheting bullets, were inspired by old tank-operating games such as Tank Trouble and the 'Tanks' game from Wii Play.
The two main game-modes include Single Player, in which the player battles AI adversaries through a series of challenging levels, and Multiplayer, in which two players battle in chaotic arenas filled with obstacles and power-ups. Perhaps the game's most interesting feature is the Arena Editor which allows players to create their own custom arenas in which to play.
The game was built almost entirely from scratch in Unity using C#. I created all of the assets myself, including all of the gameplay scripts, the 3D models and the custom UI components, with the only exceptions being the music, the sound-effects and a single explosion particle effect.
I put together a short trailer for the game showcasing a range of multiplayer and single player gameplay. Click below to watch the trailer on YouTube.
Possibly my favourite part of the whole project was creating game's various menus, including the main menu, the pause menu and the arena editor interface. I found designing these menus surprisingly challenging, and spent a good deal of time studying the UI design in games such as Sifu, Hitman 3 and Boomerang Fu before settling on the final style seen below.
As the majority of Unity's built-in UI components weren't suitable for the designs I had in mind, I ended up creating a wealth of custom UI components, including custom pickers, alerts, dialogue boxes and more.
A particularly interesting menu to design was the pause menu. I opted to have two panels slide in from each side of the screen when the game is paused, allowing for a seamless transition to and from gameplay.
The very first task in making the game was to create the 3D models that would be needed. This was a great opportunity to dust off my 3D modelling skills, and I had a blast making these assets with Blender. Every element from the tank models to the arena walls to the crates and explosive barrels was modelled from scratch in Blender.
The arena walls posed an interesting problem. I knew that I wanted the game to work with a grid-based system to allow for an in-game arena editor, and that I wanted the walls to look like roughly like the striped barriers you can see in the final game. This proved rather more complex that I had anticipated, as each wall block in the grid would have to react to all eight of its neighbouring blocks in order to create an appropriate transition between the blocks. This required a total of 15 different wall assets and some interesting code later on to select the appropriate asset.
The feature that I was most excited to implement in the game was an Arena Editor that would allow the player to create their own arenas to use in the game. I have always been a huge fan of games which offer level editors, especially when these are powerful enough to replicate any of the original levels playable in the game. With this in mind, the Arena Editor took shape fairly early on in the process, and so I was able to use it to create each of the official levels and arenas featured in the final game.
It was also important to me that the editor felt satisfying to use, and I spent a lot of time experimenting with different animations and sound effects to find just the right balance between the animations looking smooth and feeling snappy.
The core of the project was of course programming the gameplay. This was perhaps surprisingly one of the simplest parts of the game, but nonetheless there were some fun problems to be solved such as handling explosions, managing ricocheting bullets and adding destructible crates. The main task here was creating the player-controlled tank and bringing it to life with satisfying movement controls. I experimented with various different control schemes and mechanics before settling on the final controls, and then spent a great deal of time tweaking speeds and other values to get the feel of the controls just right. Some alternative mechanics that I implemented but subsequently abandoned included having players turn the tank manually rather than simply aiming with the joystick and giving players the ability to aim their tank's turret independently of the body of the tank.
The single player game-mode sees players battling waves of AI tanks through nine increasingly challenging levels. This involved creating AI adversaries of various difficulties for the player to encounter in these levels. This is handled by an AITank component which interfaces with the same Tank component controlled by the player through the PlayerTank component, which ensures that the AI tanks move and handle in exactly the same way as the player. Whilst I'm fairly happy with the resulting AI opponents, I'd love to go back and improve on this aspect of the game one day – their simple behaviour could be hugely improved with proper path-finding and the ability to intentionally bounce bullets off walls.
In multiplayer, two players battle against each other. Multiplayer functions relatively similarly to Single Player, with the main addition being power-ups. I hope to add many more someday, but for now there are four power-ups featured in the game:
It was quite some time ago that I started working on Tanks Arena, so portions of the code are a little questionable, but I've made it public on my GitHub nonetheless. Please don't judge the code too harshly :)