A semi-procedural 2D top-down tank shooter with heat-map pathfinding and data-driven design
Daemon Libra is a 2D top-down tank shooter where the player navigates procedurally generated maps, fighting through waves of three distinct enemy types — Scorpio turrets, Leo mobile tanks, and Aries melee rushers. The game features dual-stick tank controls (body + turret), heat-map-based AI pathfinding, and a fully data-driven design powered by XML configuration files.
Built as a course project at SMU Guildhall, the game runs on a custom Daemon Engine providing DirectX 11 rendering, FMOD audio, and a developer console with V8 JavaScript integration.
- Procedural map generation — Worm algorithm carves organic terrain across 3 maps of increasing difficulty
- Heat-map AI pathfinding — Dijkstra-style distance fields drive enemy navigation with line-of-sight detection
- Data-driven design — XML files define all game parameters: entity stats, map layouts, tile properties, audio paths
- Dual-stick tank controls — Independent body (WASD) and turret (IJKL) rotation with Xbox controller support
- Bouncing bullet physics — Projectiles ricochet off walls up to 3 times with sound effects
- Visual Studio 2022 (or 2019) with C++ desktop development workload
- Windows 10/11 (x64)
- DirectX 11 compatible GPU
- Daemon Engine cloned as a sibling directory
# Clone both repos side by side
git clone https://github.com/dadavidtseng/Engine.git
git clone https://github.com/dadavidtseng/DaemonLibra.git
# Directory layout should be:
# ├── Engine/
# └── DaemonLibra/- Open
Libra.slnin Visual Studio - Set configuration to
Debug | x64 - Build the solution (the Engine project is referenced automatically)
- The executable is deployed to
Run/via post-build event
| Action | Keyboard | Controller |
|---|---|---|
| Move body | W / A / S / D | Left Trigger |
| Aim turret | I / J / K / L | Right Trigger |
| Shoot | Enter | — |
| Start / Pause | P | Start |
| Quit | ESC | Back |
| Action | Key |
|---|---|
| Debug rendering | F1 |
| Noclip | F3 |
| Full map camera | F4 |
| Heat map visualization | F6 |
| Hard restart | F8 |
| Skip to next map | F9 |
| Slow-mo (0.1×) / Fast-mo (4×) | T / Y |
| Frame step | O |
| Developer console | ` |
- Attract Mode — Title screen
- Map 1 (24×30) — 60% Scorpio, 20% Leo, 20% Aries
- Map 2 (50×20) — Balanced enemy distribution
- Map 3 (16×16) — Final arena, sparse but harder
- Victory — Complete all 3 maps
Launch Run/Libra_Debug_x64.exe from the Run/ directory (working directory must be Run/ for asset loading).
DaemonLibra/
├── Code/Game/ # Game source (17 classes)
│ ├── Main_Windows.cpp # WinMain entry point
│ ├── App.cpp/hpp # Application lifecycle
│ ├── Game.cpp/hpp # Core game logic, state machine
│ ├── Entity.cpp/hpp # Base entity with AI behaviors
│ ├── PlayerTank.cpp/hpp # Player tank (100 HP, dual-stick)
│ ├── Scorpio.cpp/hpp # Stationary turret enemy (5 HP)
│ ├── Leo.cpp/hpp # Mobile tank enemy (3 HP)
│ ├── Aries.cpp/hpp # Melee rusher enemy (8 HP)
│ ├── Bullet.cpp/hpp # Bouncing projectile system
│ ├── Map.cpp/hpp # Procedural generation, pathfinding
│ ├── MapDefinition.cpp/hpp # Data-driven map config
│ ├── Tile.cpp/hpp # Tile-based world
│ └── TileDefinition.cpp/hpp # Tile type definitions
├── Run/ # Runtime directory
│ ├── Data/Audios/ # 15 sound files (MP3)
│ ├── Data/Images/ # 36 textures (sprite sheets)
│ ├── Data/Fonts/ # Bitmap fonts (PNG)
│ ├── Data/Shaders/ # HLSL shaders
│ └── Data/Definitions/ # XML config (GameConfig, Maps, Tiles)
├── Docs/ # Documentation
└── Libra.sln # Visual Studio solution
Copyright 2025 Yu-Wei Tseng
Licensed under the Apache License, Version 2.0.
Yu-Wei Tseng
- Portfolio: dadavidtseng.info
- GitHub: @dadavidtseng
- LinkedIn: dadavidtseng
- Email: dadavidtseng@gmail.com