April 5, 2025

Unity Autobattler

Project thumbnail.

📌 Overview

This project is a 3D Auto-Battler developed in Unity, inspired by titles like Totally Accurate Battle Simulator (TABS). The primary objective was to design a robust architecture capable of managing diverse entities, an equipment system (items), and an autonomous combat loop.

  • Role: Gameplay Developer & Software Architect
  • Technologies: Unity 3D, C#, Object-Oriented Programming (OOP)
  • Context: Video Game Architecture Course

🏗️ Technical Architecture

The core of the project relies on a modular structure favoring decoupling between data and behaviors.

Entity and Attribute System

I implemented a class hierarchy that allows for easy extension of new units or objects:

  • Entity & Champion: Used composition rather than massive inheritance to define units. A Champion consists of Health, Attack, and Movement modules.
  • Attribute System: Each statistic (Speed, Damage, Health) inherits from an Attribute abstract class, simplifying the implementation of the upgrade system.

Structure Diagram (Excerpt)

Note: Here is how the components interact to modify statistics in real-time:

  • Item System: Items apply multipliers via runUpgrades, dynamically modifying speedMultipliers or damage without altering the unit’s base values.
  • State Management: Seamless transition between “Placement Mode” and “Battle Mode.”

🎮 Key Features

  • Dynamic Equipment System: Drag-and-drop interface to equip items (e.g., Strength Gauntlets, Lightning Sword) with immediate stat updates.
  • Combat AI: Target-finding algorithms and attack cooldown management (ranging from 0.2s to 1.5s).
  • Balancing: Coin-based cost system to limit the power of the player’s army.

📈 Challenges and Solutions

  • Challenge: Cleanly managing the accumulation of item bonuses.
  • Solution: Implemented a list of multipliers (List<float>) within the movement module, allowing the final speed to be recalculated predictably rather than directly modifying the base variable, thus avoiding cumulative calculation errors.

🚀 Developed by Evanescent.

Ready to take your idea to the next level? Let's work together.