Quick Turret

I set out one night to try and make a turret in Unity as fast as I possibly could. I ended up making it into a small game demo.

Quick Turret

The Modular Systems

I tried to focus on making modular systems that could work together without tight coupling. I was able to do this for the game's damage system, the targetting system, and for the operation of the turrets. The resulting designs can be neatly described by the following UML diagrams:

The Damage System

Diagram showing Hurtable component

Generating Damage Text Of Multiple Concurrent Types

Diagram showing DamageTextFactory component

The Targetting System

Targetting System Diagram

The Turrets

Turret Component Diagram

Custom Editor Features

To make my components easy to work with, I set about customising the Unity Editor. At the time, I had never tried this before. I now understand it to be an essential part of the development process. You are not just using Unity to build your game, you are building upon Unity to create the engine which will make your game possible. The work is tough but satisfying I think.

Turret Autoloarder Component

Autoloader Custom Inspector

Setting Up A Stylesheet for Different Damage Types

Types Of Damage Text

Setting up subtargets on an enemy

Targetting System Custom Inspectors

Creating a network of waypoints for mob pathfinding

Waypoint Component Features

Minigun Turret