A simple cooperative multiplayer game, written in C++ using custom ECS implementation.
Currently in early stages of development
This is an educational project that doesn't have any applications to real-world problems, but it can still be used as a source of inspiration (or as a copypaste source).
This project was made in my free time for fun and to test some approaches. So don't expect much.
This is chosen mostly for educational purposes (since cheating in a real cooperative game may be not that a big problem). The server simulates the game based on input from the player, and the players only run the simulation for prediction. Any desynchronization results in the resimulation of incorrectly predicted frames with new data.
ECS pattern has been chosen here not for performance reasons, but to get better maintainability and increase the testability of gameplay code. ECS makes these goals easier to achieve.
- git with git-lfs
- CMake (see the minimal supported version in CMakeLists.txt)
- python3
- GCC 13 (or higher), or
clang-16 (or higher),or the latest Visual Studio 2022 (or newer) - for Linux, you need to install dependencies of SLD2, also libssl, and protobuf using your packet manager
e.g. for apt:sudo apt-get install libopusfile-dev libflac-dev libxmp-dev libfluidsynth-dev libwavpack-dev libmodplug-dev libssl-dev libprotobuf-dev protobuf-compiler
- git with git-lfs
- CMake (see the minimal supported version in CMakeLists.txt)
- python3
- GCC 13 (or higher), or clang-16 (or higher), or Visual Studio 2022 (or newer)
- for Linux, you need to install libssl and protobuf using your packet manager
e.g. for apt:sudo apt-get install libssl-dev libprotobuf-dev protobuf-compiler
With SSH
git clone --recursive [email protected]:gameraccoon/tank-game.git
With HTTPS
git clone --recursive https://github.com/gameraccoon/tank-game.git
For Windows with Visual Studio you can run scripts\scripter\windows\generate_vs_project.cmd
it will generate the solution for Visual Studio 2022. Path to the generated solution: build\game\GameMain.sln
For all the other cases and platforms other than Windows just generate the project using CMake with CMakeLists.txt
in the root folder.
E.g. using make
mkdir -p build/game
cd build/game
cmake ../..
make
After being built, the resulting executables can be found in bin
folder
For Windows with Visual Studio you can run scripts\generate_dedicated_server_vs2022_project.cmd
it will generate the solution for Visual Studio 2022. Path to the generated solution: build\dedicated_server\DedicatedServer.sln
For all the other cases and platforms other than Windows just generate the project using CMake as in the steps above but adding -DDEDICATED_SERVER=ON
.
E.g. using make
mkdir -p build/dedicated_server
cd build/dedicated_server
cmake ../.. -DDEDICATED_SERVER=ON
make