Everything is in the title, this project is an attempt to write a game engine in C.
You can clone it but, you will need the submodules that go with it:
git clone --recurse-submodules git@github.com:Gamabunta57/GooE.git
If you already have cloned the project but don't have all the submodules:
git submodule init
git submodule update
If you want to test the project as-is please notice that some images are not provided in this repository (mainly because the project doesn't aim at providing such assets and also to avoid some licensing issues). You will have to provide the files yourself of change the source code at your convenience.
The file to provide is:
- assets/img/test.png
- assets/music/test.ogg
If all the dependencies are already built, then you just have to pick one the following script and run it.
# For a default (Congif=Debug) build
mkdir build
cd build
cmake ../
cmake --build .
# For a Release build
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
cmake --build .
In order to build everything manually, some tools are required:
Make sure these are installed on your machine and their executable directories are available in the PATH. The following dependencies could be built the way you want of course or you can try to follow the process described.
This lib has been choosen amongst other, and it has been decided to go root by building it ourselves. The details could be found here on the SDL official website.
You can build it the way you want but, this project goes with the classic CMake following the instructions of the SDL official website.
cd vendors/sdl
mkdir build
cd build
cmake.exe ../ -DCMAKE_BUILD_TYPE=Release
cmake.exe --build . --config Release --parallel
cmake.exe --install . --config Release --prefix ../../builds
This will build SDL3 for you and create the folder structure that is compatible with the batch script to build the project itself.
To load images the SDL way we need SDL_image. Make sure SDL is built first as it is required for SDL_image to be built.
cd vendors/sdl_image
git submodule update --init
mkdir build
cd build
cmake.exe ../ -DCMAKE_BUILD_TYPE=Release -DSDL3_DIR="$pwd/../../build/sdl/cmake"
cmake.exe --build . --config Release --parallel
cmake.exe --install . --config Release --prefix ../../builds
This will build SDL3_image and create the folder structure that is compatible with the batch script to build the project itself.
To load sound and music the SDL way we need SDL_mixer. Make sure SDL is built first as it is required for SDL_mixer to be built.
cd vendors/sdl_mixer
git submodule update --init
mkdir build
cd build
cmake.exe .. -DCMAKE_BUILD_TYPE=Release -DSDL3_DIR="$pwd/../../build/sdl/cmake"
cmake.exe --build . --config Release --parallel
cmake.exe --install . --config Release --prefix ../../builds
This will build SDL3_mixer and create the folder structure that is compatible with the batch script to build the project itself.