TurnBasedBattle
A downloadable game for Windows and macOS
# GitHubLink (Unity, C#) (https://github.com/michalsobr/TurnBasedBattlePrototype)
# ๐ฎ Turn-Based Battle System (Unity, C#)
A polished 2D turn-based battle system built in Unity, focusing on clean architecture, modular systems, and responsive UI/UX.
This project demonstrates a complete combat loop with multiple enemies, player abilities, and dynamic UI feedback.
---
## ๐ Features
- ๐ Turn-based combat loop (Player โ Enemy โ Player)
- โ๏ธ Multiple enemies with independent behavior
- ๐ก๏ธ Defend system (player & enemies)
- ๐ฅ Skill combo system (multi-hit animation + SFX logic)
- โค๏ธ Heal system using skill points
- ๐ฏ Target selection (keyboard + mouse support)
- ๐ต Centralized SFX system
- ๐ฑ๏ธ Hover feedback (UI + enemies)
- โธ๏ธ Pause menu with resume / restart / exit
- ๐ Win / Lose states with UI transitions
---
## ๐ ๏ธ Technologies Used
- Unity (Version: 6.4)
- C#
- Unity Input System
- TextMeshPro
---
## ๐ Project Structure
Assets/
_Project/
Scripts/
Core/
Combat/
UI/
Animation/
Audio/
Prefabs/
Scenes/
Sprites/
Animations/
ThirdParty/
---
## ๐ง Architecture
The project follows a clean separation of responsibilities:
### Core Scripts
- BattleManager โ game logic, turn flow, combat rules
- BattleUI โ UI rendering and interaction
- BattleCharacterAnimator โ animation control only
- SFXManager โ centralized audio playback
### Design Principles
- No gameplay logic in UI
- Modular and readable code
- Minimal duplication
- Clear separation of concerns
---
## ๐ฎ Controls
| Action | Key |
|------------------|-----|
| Select Action | W / S |
| Select Enemy | A / D |
| Confirm | Enter |
| Pause Menu | ESC |
| Skip Turn | P |
---
## ๐ What I Learned
- Designing a modular turn-based combat system with clear separation of concerns
- Structuring Unity projects for readability and maintainability
- Managing game state and turn flow using a centralized controller (BattleManager)
- Implementing responsive UI systems without embedding gameplay logic in UI scripts
- Creating reusable animation wrappers to decouple logic from presentation
- Designing and implementing a flexible input system using Unity's new Input System
- Handling edge cases in gameplay (defend mechanics, target validation, action availability)
- Improving user experience through audio feedback, hover states, and UI responsiveness
- Refactoring and cleaning up code to achieve a consistent and professional codebase
---
## ๐ Future Improvements
- Status effects (poison, stun, buffs)
- Enemy AI patterns
- Data-driven abilities
- Save system
- Expanded UI polish
---
## ๐จ Assets & Credits
The following third-party assets were used in this project:
### ๐ต Music
- JRPG/RPG Combat Exploration Theme https://assetstore.unity.com/packages/audio/ambient/fantasy/jrpg-rpg-combat-expl...
### ๐ Sound Effects
- RPG Essentials Sound Effects - FREE! https://assetstore.unity.com/packages/audio/sound-fx/rpg-essentials-sound-effect...
### ๐ฅ๏ธ UI
- GUI Parts https://assetstore.unity.com/packages/2d/gui/icons/gui-parts-159068
### ๐ Background
- Free 2D Cartoon Parallax Background https://assetstore.unity.com/packages/2d/environments/free-2d-cartoon-parallax-b...
### ๐ง Player Character
- Hero Knight - Pixel Art https://assetstore.unity.com/packages/2d/characters/hero-knight-pixel-art-165188
### ๐ก๏ธ Enemy Characters
- Bandits - Pixel Art https://assetstore.unity.com/packages/2d/characters/bandits-pixel-art-104130
### ๐ค AI-Generated Assets
- Character avatar visuals generated using Playground AI https://playground.com/
---
All assets are used under their respective licenses for educational and portfolio purposes.
## ๐ License
This project is made for my portfolio, for educational purposes only.
| Status | Prototype |
| Platforms | Windows, macOS |
| Author | MichalSobr |
| Genre | Role Playing |
| AI Disclosure | AI Assisted |
