Find a file
2025-01-02 11:45:28 +03:00
.github feat: simple valgrind integration in vctest & AppImage workflow: change build-type to RelWithDebInfo 2025-01-01 15:47:41 +03:00
dev revert failing test 2025-01-01 20:10:44 +03:00
doc update pack.get_info 2025-01-02 11:45:28 +03:00
res optimize content-packs related pages 2025-01-02 11:18:00 +03:00
src update pack.get_info 2025-01-02 11:45:28 +03:00
test update cmake lists 2024-12-27 07:14:47 +03:00
vctest update vctest 2025-01-01 18:23:04 +03:00
.clang-format format: fix: set AllowShortFunctionsOnASingleLine to 'None' 2024-08-03 19:39:58 +03:00
.gitignore Fix usage vcpkg for windows and fix readme, remove vcpkg usage flag from cmake 2024-12-15 01:56:02 +03:00
CHANGELOG.md update CHANGELOG.md 2024-12-01 12:12:10 +03:00
CMakeLists.txt set minimum required cmake version to 3.26 2024-12-27 07:21:06 +03:00
CMakePresets.json Delete clang preset besause need cmake compatibility with msys2 2024-12-25 19:21:50 +03:00
compile_flags.txt add compile_flags.txt with -Isrc for ide with clangd 2024-10-19 21:02:21 +03:00
Dockerfile update Dockerfile and README.md 2024-11-28 10:50:20 +03:00
flake.lock Flake update 2024-08-05 23:29:13 +03:00
flake.nix Add missing curl dependency to nix build 2024-12-01 21:11:27 +07:00
README.md Refactoring CmakePresets for windows github actions and refactoring README 2024-12-20 17:16:31 +03:00
run.sh very important -p flag in mkdir in run.sh 2024-10-22 02:02:37 +03:00
vcpkg.json add libcurl 2024-11-10 22:37:28 +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/build
cmake -DCMAKE_BUILD_TYPE=Release ..
sudo make install

Warning

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

ALT Linux based distro

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

Debian based distro

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

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 distro

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

Arch based distro

If you use X11

sudo pacman -S glfw-x11 glew glm libpng libvorbis openal luajit libcurl

If you use Wayland

sudo pacman -S glfw-wayland glew glm libpng libvorbis openal luajit libcurl

And you need entt. In yay you can use

yay -S entt

Build engine with CMake

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

Build project in macOS

Install libraries

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

Tip

If homebrew for some reason could not install the necessary packages: lua luajit openal-soft, then download, install and compile them manually (Lua, LuaJIT and OpenAL).

Build engine with CMake

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

Build in Windows

Note

Requirement:

vcpkg, CMake, Git There are two options to use vcpkg:

  1. If you have Visual Studio installed, most likely the VCPKG_ROOT environment variable will already exist in Developer Command Prompt for VS
  2. If you want use vcpkg, install vcpkg from git to you system:
cd C:/
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat

After installing vcpkg, setup env variable VCPKG_ROOT and add it to PATH:

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

Tip

For troubleshooting you can read full documentation for vcpkg

After installing vcpkg you can build project:

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

Build using Docker

Step 0. Install docker on your system

See https://docs.docker.com/engine/install

Step 1. Build docker container

docker build -t voxel-engine .

Step 2. Build project using the docker container

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

Step 3. Run project using the docker container

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