

CONQUEST CASTLE
Draw Roads to Direct Enemies, Build Towers to Defend Your Castle
OVERVIEW
Draw roads to connect enemy outposts to your castle
Build towers to defend your castle from incoming enemies
Collect exp points and resources to unlock new regions
DETAILS
Genre: 3D Tower Defense
Role: Solo Developer (Gameplay and AI Programming)
Tools: Unity, C#, Shader Graph, Blender
Platform: PC
GAME FEATURES
Gameboard
Randomly generates game map from CSV with elevated, obstacle, and resource tiles
Drawing Roads
Players draw roads to guide enemy movement, allowing flexible and reactive strategies
Tower Placement
Towers can be placed along roads or on elevated tiles to increase their range
Expanding Maps
Upon leveling up, the player can expand the map in a chosen direction, unlocking new territory
GAME DEVELOPMENT
CORE SYSTEMS AND CLASSES
Tiles and Roads
Road paths are generated using a custom rule tile algorithm
Road meshes are updated to match neighbouring tiles and added to the NavMesh
Transaction System
Enemy Characters
Projectiles - Arrows and Cannons
Creating pools, enqueuing / dequeuing objects. To optimize enemy and projectile instantiation
Build Manager
Game Manager
Event Manager
Audio Manager
Navigation Manager
Save Manager
Used to manage global core systems and managers, allowing centralized control and global access
Projectile Tower
Event Manager
Handles broadcasting, subscribing and unsubscribing
Used to decouple events
DESIGN PATTERNS
Finite State Machine
Game States
Used to manage various game states
Object Pooling
Enemy Characters
Projectiles - Arrows and Cannons
Creating pools, enqueuing / dequeuing objects. To optimize enemy and projectile instantiation
Singleton
Game Manager
Event Manager
Audio Manager
Navigation Manager
Save Manager
Used to manage global core systems and managers, allowing centralized control and global access
Observer
Event Manager
Handles broadcasting, subscribing and unsubscribing
Used to decouple events
DEVELOPMENT OVERVIEW
Major Systems
Road Drawing and Tile System
Roads are drawn by highlighting desired tiles, generating a path using a custom rule tile algorithm
Each tile updates it's model to blend correctly with neighbouring tiles
The road data is then sent to the NavMesh to bake a path
Enemy Pathfinding
Enemies are spawned at outposts and use a NavMeshAgent to follow the road path
NavMeshSurface is re-baked dynamically when new roads are added, ensuring paths are always valid
Tower and Projectiles
Towers are placed on empty tiles or elevated tiles to increase their range
Each towers scans for enemies within range and use a coroutine to fire projectiles at fixed fire rate intervals
Projectiles are pulled from a pre-pooled object list to optimize spawning and de-spawning
Each tower is represented as a Scriptable Object, allowing adjustments for variables such as damage, fire rate, range and cost