Mostly testing and playing with SDL3, it is still WIP so be patient, I'm learning about it. I'm trying to achieve an ECS-Message Architecture.
- AsteroidsGame.cpp is the main file
- EntityManager.hpp holds the logic for Entities Creation.
- texture.hpp has the Texture class, which is used to load images and text into the screen.
- timer.hpp has a simple timer class, you can pause, resume and restart timer.
- game.hpp holds the methods for the gameLoop, ship creation and asteroids generation. I still need to clean and refactor it.
- components.h holds the Components that each entity can have.
- systems holds the multiple systems the game will have. They are responsible for all the logic on how the entities and components should behave.
Clone the repo with
git clone https://github.com/trexem/Asteroids.git --depth=1 --recurse-submodules"so it downloads the SDL submodules. After that you might still have to download some files for SDL to compile correctly, you might have to run download.sh inside external subdirectory of SDL_image and SDL_ttf.
To generate make files you need to run
cmake -S . -B buildThen to compile we run
cmake --build buildAlternatively to generate build files and build you can just run
./build.shThen just open the asteroids program.
./build/asteroidsOpen Visual Studio 2022 and clone the repo through the initial options. It should download the submodules and everything necessary for the project to compile.
After it finishes downloading and cmake stops working you will have to choose asteroids.exe solution (besides the "Play" button). Then just press the "Play" button.
Right now loading assets is being made trough a PackReader, I'm not adding the assets.pak as it would be redundant, but you might need to have that, so for now just zip
the directories inside data/ and rename that zip to assets.pak and save that in the main directory of the project.
- Implement it
- EnemyAISystem (moves enemies based on AIComponent)
- SpawnSystem (handles waves of enemies & asteroids)
- TeslaCoil
- Balance them
- GameOverScreen, add gold and kills display.
- Settings
- Upgrade Store
- Gold texture
- Make it look good
- Implement them
- Refactor all includes to forward declare and not include everything in header files
- Decide and change all naming of the files to one standard (first letter mayus or not, hpp or h)