This repository has been archived and will no longer receive updates or maintenance.
All ongoing development has been migrated to this project, which features significant architectural improvements:
-
Core Logic Encapsulation:
ECSframework,SDL3interactions, and other fundamental functionalities are abstracted into an independentcoremodule, forming a game engine-like foundation. -
Multi-game Support: The
coremodule enables rapid development of games across different genres. It is planned to build various types of games based on it, includingsurvivor,RPG,MOBA,RTSgames, and more.. -
Visualization editor: A
visualization editorsimilar to War3's editor is in the roadmap, designed to assist with programming and facilitate game content creation.
Stay tuned to the new repository for the latest developments!
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 speed -
QuadTreeto accelerate collision detection -
SceneGraphto manage the logical relationship between objects and the rendering order -
BehaviorTreeto manage the AI Logic of enemies and defense towers -
Lazy Theta*pathfinding algorithm, providing smoother movement compared toA* -
JSONis used to configure game settings, monster information, item information, upgrade rewards, monster upgrade information, behavior tree, etc. -
ECSrely on my ECS library. -
QuadTreeand 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/gameThe game controls are as follows:
- Movement
WASDto move the character
- Combat
LeftMouseto shoot if you have a gun selectedRto reload the gun if you have one selectedSpaceto use consumables if you have one selectedFto flashGto drop selected item
- Hotbar
1,2,3, etc. to select itemsQEto cycle through items- hold
LeftMouseto swap items
- Menu
ESCto show the exit menu1to quit2to resume
Ito switch inventory menu- same as hotbar controls
MIT © m1dsolo