Football game, a fork of discontinued GameplayFootball written by Bastiaan Konings Schuiling.
In 2019, Google Brain team picked up a game and created a Reinforcement Learning environment based on it - Google Research Football. They made some improvements to the game, updated the libraries, but threw away everything (e.g. menus, audio effects, etc.) that was not necessary for their task.
The goal of this repository is to update the existing code, based on Google Brain's changes (see google_brain
branch) and other forks, and make it compiling and running on as many platforms as possible. PRs are always welcome.
Install required dependencies:
sudo apt-get install git cmake build-essential libgl1-mesa-dev libsdl2-dev \
libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev libopenal-dev libboost-all-dev \
libdirectfb-dev libst-dev mesa-utils xvfb x11vnc libsqlite3-dev
Run the following commands:
# Clone the repository
git clone https://github.com/vi3itor/GameplayFootball.git
cd GameplayFootball
# Copy the contents of `data` directory into `build`
cp -R data/. build
# Go to `build` directory
cd build
# Generate Makefile
cmake ..
# Compile the game
make -j$(nproc)
Run the game:
./gameplayfootball
Important: Currently, the game can be compiled on Mac OS, but it is not running yet, because rendering must be done on the Main Thread.
To install required dependencies you need brew
which can be installed in Terminal by running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# Install dependencies
brew install git cmake sdl2 sdl2_image sdl2_ttf sdl2_gfx boost openal-soft
# Navigate to the directory where you want to put the repository
cd ~
# Clone the repository
git clone https://github.com/vi3itor/GameplayFootball.git
cd GameplayFootball
# Copy the contents of `data` directory into `build`
cp -R data/. build
# Go to `build` directory
cd build
# Generate Makefile
cmake ..
# Compile the game
make -j$(nproc)
# Run the game (Currently is not working)
./gameplayfootball
Download and install:
- Visual Studio 2019,
- Git,
- CMake (make sure to add it to the system PATH).
Install vcpkg
as explained in Quick Start Guide or simply:
create a directory, e.g. C:\dev
, open Command Prompt and run the following commands:
% Navigate to the created directory
cd C:\dev
% Clone vckpg
git clone https://github.com/microsoft/vcpkg
% Run installation script
.\vcpkg\bootstrap-vcpkg.bat
Install required dependencies (all triplets must be x86-windows
):
.\vcpkg.exe install --triplet x86-windows boost:x86-windows sdl2 sdl2-image[libjpeg-turbo] sdl2-ttf sdl2-gfx opengl openal-soft
% Navigate to the directory where you want to put the repository
cd C:\dev
% Clone repository
git clone https://github.com/vi3itor/GameplayFootball.git
cd GameplayFootball
% Switch to windows branch
git switch windows
% Copy the contents of `data` directory into `build\Debug` or (and) `build\Release`
xcopy /e /i data build\Debug
xcopy /e /i data build\Release
Go to build
directory and generate cmake
files. Make sure that you correctly set the directory for vcpkg
(in our case it is installed into C:\dev\vcpkg
):
cd build
cmake .. -DCMAKE_GENERATOR_PLATFORM=Win32 -DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE
To build Release
version:
cmake --build . --parallel --config Release
For Debug
version:
cmake --build . --parallel --config Debug
That's it! Run gameplayfootball.exe
inside build\Release
directory (or inside build\Debug
for Debug
version)
If you have any problems please open an issue.
If you want to thank Bastiaan for his great work, consider a donation to his Bitcoin address 1JHnTe2QQj8RL281fXFiyvK9igj2VhPh2t