An official client for Patafour.
- CMake >= 3.19
- Git
- SFML >= 2.5
- Discord Game SDK
Simply clone the repo and CMake should automatically grab everything for you, if your IDE supports it.
Libraries may be needed, refer to the installation sections below.
Visual Studio Community 2019+, Visual Studio Code and CLion generally should work just fine.
Code::Blocks and others haven't been tested and probably won't work.
GCC is used to compile Patafour alongside with it's required libraries. C++20 support is required.
If you're running into issues with "fmt" and std::format, your GCC version is too old.
MSVCRT runtime should work. UCRT runtime won't work. We personally use MinGW on Windows.
You need to have all the libraries necessary to compile SFML in order to compile Patafour. It all depends on the flavor of Linux you're using.
After installing the dependencies, cloning the repository and launching cmake .
in the repo's folder should build everything properly.
When the compilation is done, you can just run ./V4Hero
and the game will launch.
sudo apt install build-essential libx11-dev libxrandr-dev libxcursor-dev libgl1-mesa-dev libudev-dev libopenal-dev libvorbis-dev libflac-dev libfreetype-dev libfreetype6 libfreetype6-dev zlib1g-dev libzip-dev liblzma-dev libbz2-dev
sudo dnf install make automake gcc gcc-c++ libstdc++-static kernel-devel SFML-devel systemd-devel libzip-devel libXcursor-devel libXrandr-devel mesa-libGL-devel
Builds are known to work on NVIDIA systems without issues. AMD probably works as well, further tests are needed. Intel GPU support is unknown.
The following instructions are for building Patafour on a 64-bit Windows system, using MinGW toolchain. Things may differ if you decide to use different tools, toolchains, compilers or architecture.
Make sure you have Git installed.
- Install MSYS preferably in
C:/msys64
directory. We will need the MSYS installation directory in the next steps! - Make sure to always run MSYS MINGW64!!!!! Otherwise it will most likely not work! If you see MINGW64 in your MSYS window, you're good to go.
- Run command
pacman -Syu
. Agree to everything (type the letter Y). The terminal might restart to update. Run MSYS MINGW64 again if it does. - Run command
pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-make mingw-w64-x86_64-libzip mingw-w64-x86_64-zlib
. Agree to installation (type the letter Y). - Add the MSYS
bin
folder to your global PATH environmental variable. When selecting the install directory from the first step, it would beC:/msys64/mingw64/bin
. Here is how you can add a new folder to your PATH. - If you had any other programs opened (such as IDE or Command Prompt), reopen them so they can detect the new environmental variable.
Our preferred IDE of choice is either Visual Studio Code or CLion. For Visual Studio Code, you want to install the "C++ Extension Pack" from the extensions store. It will help tremendously with integrating CMake and building the application.
After everything is compiled, simply copy the discord_game_sdk.dll
and openal32.dll
from the dlls
directory into the build
directory (or wherever else V4Hero.exe is).
If you did all the previous steps, everything should just work after running V4Hero.exe.
Potential mistakes and errors during Windows installation:
- Couldn't create
resources
symlink, permission error / Could not load tips background file!
CMake failed to make a symlink due to lack of permissions. Run the IDE as admin, or copy the resources
folder where V4Hero.exe is.
- 0x8000007B error
Architecture mismatch. You compiled the project for x64 architecture (64-bit) and used DLLs for the x86 architecture (32-bit). Both project's and DLL's architectures need to match. If you don't know where the issue is, you can use a tool such as Dependency Walker to guide you what DLLs are wrong.
PRs are welcome.
The developer team and the wider community around Patafour hangs out on Discord, and we use that to coordinate the efforts around development.
Please contact the developer team on Discord if you intend to make wide changes to the game code, otherwise feel free to open issues or send PRs!
- SFML - multimedia library holding the project together
- nlohmann/json - wonderful and simple json support
- gabime/spdlog - much better and more detailed logs
- ctabin/libzippp - .zip file support
GPL-3.0 (c) the Patafour team