MonsterWar
A tower defense game developed in C++ with SDL3, entt, imgui, glm, nlohmann-json and Tiled.
**MonsterWar** is a cross-platform tower defense game developed in C++ with Entt, SDL3, glm, ImGui, nlohmann-json and Tiled. The project is written primarily in C++, distributed under the Creative Commons Zero v1.0 Universal license, first published in 2025. Key topics include: cpp, ecs, entt, game-development, imgui.
English | 简体中文
MonsterWar
MonsterWar is a cross-platform tower defense game developed in C++ with Entt, SDL3, glm, ImGui, nlohmann-json and Tiled.
This project is a teaching demonstration project; it is the 4th episode in a series of tutorials titled "C++ 游戏开发之旅".
Control
Mouse left - select a unit from UI portrait / place a unit on map;
S - Skill active shortcut;
R - Retreat shortcut;
U - Upgrade shortcut;
P - pause or resume;
A,D / left,right - to move UI portrait panel;
Play on Webpage
- Note: The game uses ImGui for temporary UI, so you need to resize the webpage size to fit the screen. Otherwise some UI elements may not be visible.
ScreenShot
<img src="https://theorhythm.top/gamedev/MW/screen_shot_mw-en1.webp" style='width: 800px;'/> <img src="https://theorhythm.top/gamedev/MW/screen_shot_mw-en2.webp" style='width: 800px;'/> <img src="https://theorhythm.top/gamedev/MW/screen_shot_mw-en3.webp" style='width: 800px;'/>Third-party libraries
How to build
Dependencies will be automatically downloaded by Git FetchContent to make building quite easy:
bashgit clone https://github.com/WispSnow/MonsterWar.git cd MonsterWar cmake -S . -B build cmake --build build
If you encounter trouble downloading from GitHub (especially on networks in mainland China), please refer to the wiki for an alternative building guide.
Credits
-
sprite
-
portrait
-
FX
-
font
-
UI
-
sound
- https://ateliermagicae.itch.io/fantasy-ui-sound-effects
- https://pixabay.com/sound-effects/violin-lose-4-185125/
- https://pixabay.com/sound-effects/level-win-6416/
- https://freesound.org/people/SilverIllusionist/sounds/664265/ (Healing (Balm).wav by Dylan Kelk)
- https://freesound.org/people/DWOBoyle/sounds/136696/
-
music
-
Sponsors:
sino,李同学,swrainbow,爱发电用户_b7469,玉笔难图,jl
Contact
For support or feedback, please contact us through the GitHub issues section of this repository. Your feedback is crucial for making this series of tutorials better!
Buy Me a Coffee
<a href="https://ko-fi.com/ziyugamedev"><img src="https://storage.ko-fi.com/cdn/kofi2.png?v=3" alt="Buy Me A Coffee" width="200" /></a>
<a href="https://afdian.com/a/ziyugamedev"><img src="https://pic1.afdiancdn.com/static/img/welcome/button-sponsorme.png" alt="Support me on Afdian" width="200" /></a>
QQ Discussion Group and My WeChat QR Code
<div style="display: flex; gap: 10px;"> <img src="https://theorhythm.top/personal/qq_group.webp" width="200" /> <img src="https://theorhythm.top/personal/wechat_qr.webp" width="200" /> </div>Contributors
Showing top 1 contributor by commit count.
