Skip to content

Build from source

Below are instructions on how to build the editor from source

Prerequisites

To start, make sure you have the Vulkan SDK installed for your system.

Windows Development

  • Download mingw into C:/
  • I use x86_64-15.2.0-release-win32-seh-msvcrt-rt_v13-rev0.7z
  • Add the bin folder to your environment path
  • Mine is C:\mingw64\bin
  • Pull the repository
  • Go into src cd src
  • To build the exe in debug mode, run:
  • go build -tags="debug,editor" -o ../kaiju.exe ./
  • To build the exe, run:
  • go build -ldflags="-s -w" -tags="editor" -o ../kaiju.exe ./

Linux development

  • Ensure you've got gcc installed
  • Ensure you've got the X11 libs installed (xlib)
  • Pull the repository
  • Go into src cd src
  • To build the exe in debug mode, run:
  • go build -tags="debug,editor" -o ../kaiju ./
  • To build the exe, run:
  • go build -ldflags="-s -w" -tags="editor" -o ../kaiju ./

Building Soloud

Currently the engine uses Soloud for playing music and sound effects. Below are instructions on how to build the library for the engine.

Soloud Windows

git clone https://github.com/jarikomppa/soloud.git
cd soloud
cd contrib
mkdir build
cd build
cmake .. -G "MinGW Makefiles" .. -DSOLOUD_BACKEND_SDL2=OFF -DSOLOUD_BACKEND_WASAPI=ON -DSOLOUD_C_API=ON
cmake --build . --config Release

Soloud Linux

git clone https://github.com/jarikomppa/soloud.git
cd soloud
cd contrib
mkdir build
cd build
cmake .. -G "Unix Makefiles" -DSOLOUD_BACKEND_SDL2=OFF -DSOLOUD_BACKEND_ALSA=ON -DSOLOUD_C_API=ON
cmake --build . --config Release

Soloud Android (on Windows)

git clone https://github.com/jarikomppa/soloud.git
cd soloud
cd contrib
mkdir build
cd build
cmake .. -G "MinGW Makefiles" .. -DCMAKE_TOOLCHAIN_FILE=%NDK_HOME%/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-21 -DANDROID_STL=c++_static -DCMAKE_BUILD_TYPE=Release -DSOLLOUD_OPENSLES=1 -DSOLLOUD_STATIC=1 -DSOLLOUD_BUILD_DEMOS=0 -DSOLOUD_BACKEND_SDL2=OFF -DSOLOUD_C_API=ON
cmake --build . --config Release

Compiling Android

To compile for android, you can go to the engine root folder and run:

go run src/generators/engine_builds/engine_builds_android/main.go