- Live demos
- Source code and submodules
- Local build (Macos)
- Linux build
- Wasm build
- Windows build
- Build using cmake presets
- What to do with all this
Live demo: main Live demo: testing
Checkout repository and modules
git submodule update --init --recursive
brew install cmake glew zlib libpng libogg libvorbis freetype glfw shaderc spirv-cross
./configure.sh
./build.sh
Optionally, you can run a server that collects logs from all instances of the engine client for debugging purposes. If you don't specify "server_ip" in the build_config configuration file, or don't specify -DCLAP_BUILD_NETWORKING during cmake configuration stage, you don't have to run the server. Otherwise, set "server_ip" to the IP address of the machine where the server will be running.
build/debug/tools/server/server
And run the demo
build/test/demo/ldjam56/ldjam56
Install dependencies (see also the simple-build.yml in case this goes out of date):
sudo apt-get install -y libfreetype-dev libglew-dev libglfw3-dev libogg-dev libopenal-dev libpng-dev libvorbis-dev zlib1g-dev glslc spirv-cross
The rest is the same as the Mac OS build instructions
Install some of the dependencies needed for native build: cmake, shaderc/glslc, spirv-cross. See Mac OS build or Linux build, depending on your host operating system for details. The rest of the dependencies will be brought in by emsdk.
Download and install Emscripten
emsdk_env_path=<path to installed emscripten SDK>
www_dir=<path to www build folder where static content will be build>
See Run section about the server_ip=... setting.
For example:
emsdk_env_path=${HOME}/src/game/emsdk/emsdk_env.sh
www_dir=${HOME}/src/game/www
For example, using python3 embedded httpd server:
python3 -m http.server -d ${HOME}/src/game/www
Ok, are you sure? Yes? Read on. For reference, check windows-build github action.
First, install Visual Studio 2019 Community edition (free). VS 2022 doesn't work yet, because of conflicts with windows-libc, somebody will fix it eventually.
Then, install LLVM for clang. There's also a way of installing clang via Visual Studio, but this one is easier.
Then, install python.
Then, set up vcpkg and set an environment variable to the path of the cloned repository:
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat -disableMetrics
export VCPKG_INSTALLATION_ROOT=.../vcpkg
Note: everything up to this point is preinstalled in github runners, so windows-build.yml doesn't mention any of that.
Then, install all the dependencies using vcpkg:
$VCPKG_INSTALLATION_ROOT/vcpkg.exe libpng:x64-windows-static glfw3:x64-windows-static glew:x64-windows-static freetype:x64-windows-static openal-soft:x64-windows-static libogg:x64-windows-static libvorbis:x64-windows-static shaderc spirv-cross
Then, in the root of the clap directory, configure and build using cmake. Use --parallel X option with cmake --build commands to speed things up.
cmake --preset w32test -B build/test
cmake --preset w32debug -B build/debug
cmake --build build/test
cmake --build build/debug
Then, run the result:
.\build\test\demo\ldjam56\ldjam56.exe
Windows build is an example of how to build using cmake presets (w32test, w32debug). These two require VCPKG_INSTALLATION_ROOT environment variable to point to vcpkg root.
Wasm build can be done similarly, setting EMSDK to point to the Emscripten installation root. Having done that, you can do one or several of the cmake presets:
cmake --preset emtest -B build/emtest
cmake --build build/emtest
Check out the brand new CONTRIBUTING file for details on the whats and the hows.