Demo:
game_v0.1.2.mp4
This is a simple rougelike game developed based on SDL3 and my ECS framework.
This game is a 2D top-down rougelike survivor roguelike. The objective is to survive through endless waves of enemies. Before each wave starts, you need to upgrade the enemies. Then you have half a minute to survive the relentless attacks of the enemies. During this time, you can upgrade yourself, collect resources, and establish powerful defensive structures.
Since the game is based on highly scalable ECS
framework,
and the main game information can be configured through JSON
,
you can easily add more monsters, items, and modify the AI, etc.
The project used the following technologies:
ECS
(Entity-Component-System) architecture, providing highly reusable modules and efficient execution speedQuadTree
to accelerate collision detectionSceneGraph
to manage the logical relationship between objects and the rendering orderBehaviorTree
to manage the AI Logic of enemies and defense towersLazy Theta*
pathfinding algorithm, providing smoother movement compared toA*
JSON
is used to configure game settings, monster information, item information, upgrade rewards, monster upgrade information, behavior tree, etc.
ECS
, QuadTree
and other modules primarily rely on my wheel library.
Refer to the library's documentation for more details.
This project is written in C++23
and built using CMake
.
It has only been tested on my own computer (Arch Linux).
If you use another operating systems, you may need to modify CMakeLists.txt
to meet your requirements.
- clone project
git clone --depth=1 https://github.com/m1dsolo/game.git
cd game
git submodule update --init --depth=1
- build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j4
- run
./build/game
The game controls are as follows:
- Movement
WASD
to move the character
- Combat
LeftMouse
to shoot if you have a gun selectedR
to reload the gun if you have one selectedSpace
to use consumables if you have one selectedF
to flashG
to drop selected item
- Hotbar
1
,2
,3
, etc. to select itemsQE
to cycle through items- hold
LeftMouse
to swap items
- Menu
ESC
to show the exit menu1
to quit2
to resume
I
to switch inventory menu- same as hotbar controls
MIT © m1dsolo