Tower Offense is a tower defence game with a procedurally generated grid, pathfinding system, and online features. Made in Unity with C#. This page explains some of the systems I put together making it. To play it, check the itch.io link above!
Main features
- Procedurally generated grid.
- Every instance of the game can be controlled remotely at runtime through the use of a database.
- In-game feedback form storing data on a database.
- In-game console.
Grid
The grid is generated at runtime and can be dynamically resized.
The helper class uses the simplest building blocks possible so any pattern is easily configurable.
public (int, int) North((int, int) x) => ClampToGrid((x.Item1, x.Item2 + 1));
public (int, int) East((int, int) x) => ClampToGrid((x.Item1 + 1, x.Item2));
public (int, int) South((int, int) x) => ClampToGrid((x.Item1, x.Item2 - 1));
public (int, int) West((int, int) x) => ClampToGrid((x.Item1 - 1, x.Item2));
public (int, int) NorthEast((int, int) x) => ClampToGrid((x.Item1 + 1, x.Item2 + 1));
public (int, int) SouthEast((int, int) x) => ClampToGrid((x.Item1 + 1, x.Item2 - 1));
public (int, int) SouthWest((int, int) x) => ClampToGrid((x.Item1 - 1, x.Item2 - 1));
public (int, int) NorthWest((int, int) x) => ClampToGrid((x.Item1 - 1, x.Item2 + 1));
Feedback form

The feedback form is a tool allowing the player to send feedback.
In addition to data sent by the player, additional data is packaged and sent:
- Data displayed to the player, like current money, health etc.
- Amount of enemies destroyed, time remaining before the end of each wave.
All the data is formatted into JSON and stored in a database.

