Find a file
VOXEL 7a9587bf8f
Update flake.lock
Обновил flake.lock поскольку в прежней версии были каналы в которых еще небыло sdl3, и собрать проект было не возможно.
2025-10-15 01:25:25 +03:00
.github Final ci/cd fix 2025-10-05 22:46:06 +03:00
dev Final ci/cd fix 2025-10-05 22:40:59 +03:00
doc fix body:set_gravity_scale & fix docs 2025-09-22 23:52:50 +03:00
res fix: some container attributes not available in panel 2025-10-06 20:53:29 +03:00
src clean 2025-10-11 10:07:55 +03:00
test fix unicode string literal escape 2025-09-23 00:08:05 +03:00
vctest fix windows build 2025-04-07 20:30:44 +03:00
.clang-format format: fix: set AllowShortFunctionsOnASingleLine to 'None' 2024-08-03 19:39:58 +03:00
.cmake-format.py add cmake-format.py and formating all cmake files 2025-01-09 16:32:54 +03:00
.gitignore refactoring 2025-10-05 01:00:22 +03:00
CHANGELOG.md update CHANGELOG.md to 0.29 2025-09-19 23:42:16 +03:00
CMakeLists.txt reset cmake min version changes 2025-10-14 18:07:20 +03:00
CMakePresets.json Add back default-vs-msvc-windows preset used in CI 2025-04-13 17:14:34 +03:00
compile_flags.txt add compile_flags.txt with -Isrc for ide with clangd 2024-10-19 21:02:21 +03:00
Dockerfile ci/cd update 2025-10-05 22:12:27 +03:00
flake.lock Update flake.lock 2025-10-15 01:25:25 +03:00
flake.nix ci/cd update 2025-10-05 22:12:27 +03:00
README.md Final ci/cd fix 2025-10-05 22:40:59 +03:00
run.sh run script: add help page 2025-01-30 01:52:20 +03:00
vcpkg.json ci/cd update 2025-10-05 22:12:27 +03:00

voxel-core VoxelCore

Latest release


Build project in Linux

Install libraries

Install EnTT

git clone https://github.com/skypjack/entt.git
cd entt
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DENTT_INSTALL=ON ..
sudo make install

Warning

If you are using ALT Linux, do not use this EnTT installation method.

ALT Linux based distros

su -
apt-get install entt-devel SDL3-devel libGLEW-devel libglm-devel libpng-devel libvorbis-devel libopenal-devel libluajit-devel libstdc++13-devel-static libcurl-devel

Debian based distros

sudo apt install libglew-dev libglm-dev libpng-dev libopenal-dev libluajit-5.1-dev libvorbis-dev libcurl4-openssl-dev

Warning

You need manualy prebuild and install SDL3 lib.

Tip

CMake missing LUA_INCLUDE_DIR and LUA_LIBRARIES fix:

sudo ln -s /usr/lib/x86_64-linux-gnu/libluajit-5.1.a /usr/lib/x86_64-linux-gnu/liblua5.1.a
sudo ln -s /usr/include/luajit-2.1 /usr/include/lua

RHEL based distros

sudo dnf install SDL3-devel glew-devel glm-devel libpng-devel libvorbis-devel openal-soft-devel luajit-devel libcurl-devel

Arch based distros

sudo pacman -S sdl3 glew glm libpng libvorbis openal luajit libcurl

And install EnTT:

yay -S entt

Building engine with CMake

git clone --recursive https://github.com/MihailRis/VoxelCore.git
cd VoxelCore
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel

Tip

Use --parallel to utilize all CPU cores during build.


Building project in macOS

Install libraries

brew install sdl3 glew glm libpng libvorbis lua luajit libcurl openal-soft skypjack/entt/entt

Tip

If Homebrew fails to install lua, luajit, or openal-soft, download, compile, and install them manually.

Building engine with CMake

git clone --recursive https://github.com/MihailRis/VoxelCore.git
cd VoxelCore
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel

Building in Windows

Note

Requirements: vcpkg, CMake, Git, and Visual Studio (with C++ tools).

There are two options to use vcpkg:

  1. If you have Visual Studio installed, the VCPKG_ROOT environment variable is often already set in the Developer Command Prompt for VS.
  2. Otherwise, install vcpkg manually:
cd C:\
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat

Then set the VCPKG_ROOT environment variable and add it to PATH:

$env:VCPKG_ROOT = "C:\vcpkg"
$env:PATH = "$env:VCPKG_ROOT;$env:PATH"

Tip

For troubleshooting, refer to the official vcpkg documentation.

After installing vcpkg, build the project:

git clone --recursive https://github.com/MihailRis/VoxelCore.git
cd VoxelCore
cmake --preset default-vs-msvc-windows
cmake --build --preset default-vs-msvc-windows

Note

Make sure your CMakeUserPresets.json (if used) contains the correct VCPKG_ROOT path.


Build using Docker

Note

First, install Docker Engine: https://docs.docker.com/engine/install

On Linux

Step 1. Build Docker image

docker build -t voxel-engine .

Step 2. Build project inside container

docker run --rm -it -v "$(pwd):/project" voxel-engine bash -c "cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && cmake --build build --parallel"

Step 3. Run the application (requires X11 forwarding)

docker run --rm -it \
  -v "$(pwd):/project" \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v "$XAUTHORITY:/home/user/.Xauthority:ro" \
  -e DISPLAY="$DISPLAY" \
  --network=host \
  voxel-engine ./build/VoxelEngine

On Windows

Note

You need an X server like VcXsrv to display the GUI.

Step 1. Install and run VcXsrv

Launch with:

.\vcxsrv.exe :0 -multiwindow -ac

Step 2. Build Docker image

docker build -t voxel-engine .

Step 3. Build project

docker run --rm -it -v "${PWD}:/project" voxel-engine bash -c "cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && cmake --build build --parallel"

Step 4. Run the application

docker run --rm -it -v "${PWD}:/project" -e DISPLAY=host.docker.internal:0.0 --network=host voxel-engine ./build/VoxelEngine