Giter Club home page Giter Club logo

voxelengine-cpp's Introduction

Run with compiled executable file:

Download | Скачать

Controls:

  • Esc - pause
  • Tab - open inventory
  • W A S D - movement
  • Space - jump
  • LMB - remove block
  • RMB - place block
  • F - toggle flight mode
  • N - noclip mode
  • F1 - toggle interface
  • F2 - save screenshot
  • F3 - debug mode
  • F5 - reload chunks

Build 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 .

Install libs:

Debian-based distro:

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

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

Arch-based distro:

If you use X11

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

If you use Wayland

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

macOS:

brew install glfw3 glew glm libpng libvorbis lua luajit openal-soft

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 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

Build with CMake and vcpkg for Windows

git clone --recursive https://github.com/MihailRis/VoxelEngine-Cpp.git
cd VoxelEngine-Cpp
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_WINDOWS_VCPKG=ON ..
del CMakeCache.txt
rmdir /s /q CMakeFiles
cmake -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_WINDOWS_VCPKG=ON ..
cmake --build . --config Release

note: you can use rm CMakeCache.txt and rm -rf CMakeFiles while using Git Bash

If you have issues during the vcpkg integration, try navigate to vcpkg\downloads and extract PowerShell-[version]-win-x86 to vcpkg\downloads\tools as powershell-core-[version]-windows. Then rerun cmake -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_WINDOWS_VCPKG=ON ..

voxelengine-cpp's People

Contributors

a-lex-ra avatar alexei-zebra avatar c4e10vek avatar callfishxt avatar clasher113 avatar cogitary0 avatar danielprol1xy avatar drdub avatar dsdemen avatar er2off avatar etocasper avatar igorkorobeynikov avatar infinitecoder01 avatar istudyatuni avatar koval01 avatar mihailris avatar mks14stdio avatar nigthlier avatar onran0 avatar quflax avatar rekvizitt avatar sergwest585 avatar v-gulevitc avatar winetgh avatar xertis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.