A high-performance, visually stunning Tactical Base-Building & Tower Defense Survival game built from the ground up in Modern C++ using the cutting-edge SDL3 library. Defend your village, manage resources, and lead your troops against relentless waves of enemies.
- ✨ Visual Interpolation (Lerp): Entities move fluidly between grid cells using high-frequency linear interpolation, eliminating "snapping" and jitter.
- ⏱️ Frame-Rate Independence: Integrated Delta-Time (dt) logic ensures game speed and animations remain consistent across different monitor refresh rates (60Hz to 144Hz+).
- 🛡️ Modern C++ Architecture: Refactored core engine to use
std::unique_ptrandstd::shared_ptr, ensuring zero memory leaks and robust state management. - 🔊 Spatial Audio: Implemented a positional sound system that scales volume based on the player's proximity to combat and construction.
- 🔍 Advanced A Pathfinding*: Intelligent 8-direction navigation allows units to path around complex building layouts and wall fortifications.
- 💎 Glassmorphic UI: High-end immediate-mode GUI with real-time blur, pulsing glows, and responsive micro-animations.
- 💾 State Persistence: Fully functional Save/Load system to preserve your village across sessions.
- Protect the Town Hall: If it falls, your legacy ends.
- Resource Cycle: Harvest Gold and Elixir from specialized mines.
- Build Defenses: Erect Walls and Barracks to slow down and eliminate threats.
- Army Composition: Recruit melee Barbarians, ranged Archers, and powerful Mages.
| Key | Action |
|---|---|
| Arrow Keys | Move The Commander |
| [C] | Collect Resources (Gold/Elixir) |
| [G] | Construct a Gold Mine (100 Elixir) |
| [E] | Construct an Elixir Collector (100 Gold) |
| [W] | Erect a Wall (10 Gold) |
| [B] | Build a Military Barracks (150 Gold + Elixir) |
| [A] / [H] / [M] | Recruit Archer / Barbarian / Mage |
| [U] | Upgrade building at current position |
| [S] / [L] | Save / Load Village State |
| [ESC] | Menu / Back |
- Language: Modern C++17 (RAII, Smart Pointers)
- Graphics/Audio: SDL3
- Pathfinding: Custom A* (Chebyshev distance)
- Animation: Linear Interpolation (Lerp) with Delta-Time
- Image Loading: stb_image
The project follows a clean, decoupled Object-Oriented Design:
Entities/: Intelligent Npcs, Units, and Enemy hierarchies.Buildings/: Resource management and defensive structures.Board.cpp/h: Centralized logic controller for combat and spatial awareness.sdl_render.h: A custom premium UI framework for modern SDL3 applications.
- A C++17 compliant compiler (MinGW, GCC, or MSVC)
- SDL3 Development Libraries
.\compile_sdl.bat- Lead Developer: escgot
- Engine: SDL3 Premium Architecture