TheComet / clither

Slither.io implemented in C and Vulkan
2 stars 0 forks source link

Clither

slither.io but not shit. Rollback netcode. No lag.

A cross-platform multi-player 2D arcade game implemented in plain C89.

How to Build

The tools you will need to build this project are:

Windows MSVC Developers should start the "Visual Studio Command Prompt" from the start menu instead of CMD. It sets the required environment variables. If you are using MSYS then you can use regular CMD (or bash).

The general procedure is as follows:

This will configure the project for your platform. Linux/Mac users now type make to build.

If you're on Windows, there will now be Visual Studio project files, inside the build directory. So go in there and open them up.

Emscripten

Install emscripten:

git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
./emsdk update-tags
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh

Next, configure:

cd path/to/clither
mkdir build && cd build
cmake \
    -DCMAKE_TOOLCHAIN_FILE=/path/to/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
    -DCLITHER_SERVER=OFF \
    -DCLITHER_MCD=OFF \
    -DCLITHER_DOC=OFF \
    -DCLITHER_GFX_GLES2=ON \
    -DCLITHER_GFX_SDL=OFF \
    -DCLITHER_GFX_VULKAN=OFF \
    -DCLITHER_TESTS=OFF \
    -DCLITHER_BENCHMARKS=OFF ..
cmake --build .

Usage

There are 3 different modes: