This is a pretty small game created for my thesis: "Creation of a cross-platform 2D Game using a data oriented approach". Features: one-way platforms, coins, hazards, enemies and ladders.
- SFML - The framework used for rendering
- entt - Open source library used for the ECS
- CMake - Build System
- conan - Open source package manager/dependency manager
- Tiled - Tilemap editor
- tmxlite - Parse tilemaps exported from Tiled
- box2d - A 2D Physics Engine for Games
- spdlog - Logging library
[OPTIONAL] Download and install Tiled if you want to modify the tilemaps
Download and install Python and pip from the official website.
Donwload and install CMake from the official website.
After installing pip run the following command:
pip install conan
git clone https://github.com/ggiap/2D_Game.git
cd 2D_Game
git submodule update --init --recursive
mkdir build
cd build
Using MinGW:
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
mingw32-make -j4
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
mingw32-make -j4
cd bin
./2D_Game
Using MSVC:
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
cd bin
./2D_Game
sudo pacman -Syu python-pip
pip install conan
sudo pacman -Syu cmake
sudo pacman -Syu make
Download all the dependencies with your package manager for SFML before building the project:
- freetype
- x11
- xrandr
- udev
- opengl
- flac
- ogg
- vorbis
- vorbisenc
- vorbisfile
- openal
- pthread
git clone https://github.com/ggiap/2D_Game.git && cd 2D_Game
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j4
cmake -DCMAKE_BUILD_TYPE=Release .. && make -j4
cd bin && ./2D_Game
- W A S D: Control main character
- - +: Zoom in/out
- Arrows: Camera panning
- Left mouse button: Grab and move bodies
- Num1: SFML debug draw
- Num2: Box2D debug draw
- Esc: Pause
- Backspace: (While in pause state) Return to menu
- P: Spawn enemy
- I: Reset camera target
This project is licensed under the MIT License - see the LICENSE.md file for details