COMBAT SYSTEM PROTOTYPE
"SOMETHING SIMPLE, WELL STRUCTURED AND SCALABLE"
"SOMETHING SIMPLE, WELL STRUCTURED AND SCALABLE"
A 2D boss-focused combat prototype developed in Unity, designed to showcase modular gameplay systems, event-driven architecture, and strong game feel.
Team size: Solo Developer
Role: Gameplay Programmer , Systems Architecture, Combat Design and UI & Game Flow
Stack: Unity, C#
Art & Design: Aseprite
Modular player controller (movement, roll, ranged attack)
Boss AI using a custom State Machine
Event-driven battle flow system
Object pooling for performance optimization
ScriptableObjects for attack configuration
Camera effects (screen shake, hit stop) for game feel
Implemented a GameManager using DontDestroyOnLoad to control global states:
Menu → Combat → PostBattle
Built a GameEvents system to handle state transitions via events
Created a Bootstrap scene responsible for initializing the game and loading the main flow
Designed a BattleManager to control the full combat lifecycle:
Combat start
Player control activation
Boss behavior activation
End of battle (Victory / Defeat)
Implemented a flexible IBattleResult interface
All entities react to battle outcome through a shared contract
Enables decoupled post-battle behaviors (celebration, death, cleanup)
Built a modular player system with clear separation of responsibilities:
PlayerInputReader (event-based input using Unity Input System)
PlayerMovement, PlayerRoll, PlayerShooter
PlayerHealth and PlayerInvulnerability
Input is event-driven, allowing scalable and flexible action handling
Implemented a custom State Machine with full control over:
Enter(), Update(), and Exit() for each state
Core combat loop:
Reposition → Windup → Attack → Recovery
Additional states:
Idle (intro), Victory, Death
Attack selection is randomized, allowing variation in combat patterns
Implemented two enemy types summoned by the boss:
Kamikaze (explosive behavior)
Healer (support behavior)
Used animation events to drive state transitions, simplifying logic for linear behaviors
Created a universal damage system using IDamageable
EnemyHealth handles:
Damage processing
Visual feedback (flash, popups)
Health UI
Death and fade-out
Implemented CameraEffects:
Screen shake for impact
Hit stop for dramatic feedback
Built a custom ObjectPool system
Reuses objects instead of instantiating/destroying
Improves runtime performance
Requires controlled reinitialization when retrieving pooled objects
Used ScriptableObjects to define:
Projectile behavior
Area-of-effect attacks
Enables faster iteration and easier scalability for new attack types
AudioManager:
Handles SFX, BGM, and ambient audio independently
PauseManager:
Controls when pause is allowed and manages game state
CharacterFlip:
Ensures characters face targets or action direction dynamically
Challenge: Coordinating multiple systems (player, boss, UI) during battle without creating dependencies
Solution: Implemented an event-driven flow combined with a central BattleManager, allowing systems to react independently to combat events
Challenge: Creating a system that allows control over timing and behavior while remaining scalable
Solution: Built a custom State Machine with explicit lifecycle methods (Enter, Update, Exit), enabling precise control and easy extension
Challenge: Triggering different outcomes (death, celebration, cleanup) across multiple objects
Solution: Created the IBattleResult interface, allowing any entity to respond to battle results in a decoupled way
Challenge: Frequent instantiation of projectiles and effects
Solution: Implemented an Object Pooling system to reuse objects and reduce runtime overhead
Expand event system into a more robust event bus architecture
Introduce Behavior Trees or hybrid AI for more complex boss logic
Improve separation between presentation (VFX/UI) and gameplay logic
Add more variation in boss attack patterns and phases
Designed a modular combat system with scalable architecture
Implemented event-driven battle flow and decoupled systems
Built a custom boss State Machine with controlled lifecycle
Focused on game feel through feedback systems and camera effects