Merge pull request #289 from alexei-zebra/refactoring-README
Refactoring README.md
This commit is contained in:
commit
34ae57dd60
189
README.md
189
README.md
@ -1,16 +1,20 @@
|
|||||||
# Latest release
|
#  VoxelCore
|
||||||
|
|
||||||
- [Download | Скачать](https://github.com/MihailRis/VoxelEngine-Cpp/releases/latest)
|
## Latest release
|
||||||
- [Documentation |](https://github.com/MihailRis/VoxelEngine-Cpp/blob/release-0.22/doc/en/main-page.md) [Документация](https://github.com/MihailRis/VoxelEngine-Cpp/blob/release-0.22/doc/ru/main-page.md)
|
|
||||||
|
- [Download](https://github.com/MihailRis/VoxelEngine-Cpp/releases/latest) | [Скачать](https://github.com/MihailRis/VoxelEngine-Cpp/releases/latest)
|
||||||
|
- [Documentation](https://github.com/MihailRis/VoxelEngine-Cpp/blob/release-0.22/doc/en/main-page.md) | [Документация](https://github.com/MihailRis/VoxelEngine-Cpp/blob/release-0.22/doc/ru/main-page.md)
|
||||||
|
|
||||||
|
## Base controls
|
||||||
|
<!-- Remove this paragraph -->
|
||||||
|
|
||||||
# Controls
|
|
||||||
- <kbd>**Esc**</kbd> - pause
|
- <kbd>**Esc**</kbd> - pause
|
||||||
- <kbd>**Tab**</kbd> - open inventory
|
|
||||||
- <kbd>**W**</kbd> <kbd>**A**</kbd> <kbd>**S**</kbd> <kbd>**D**</kbd> - movement
|
- <kbd>**W**</kbd> <kbd>**A**</kbd> <kbd>**S**</kbd> <kbd>**D**</kbd> - movement
|
||||||
- <kbd>**Space**</kbd> - jump
|
- <kbd>**Space**</kbd> - jump
|
||||||
- <kbd>**Q**</kbd> - drop item
|
|
||||||
- <kbd>**LMB**</kbd> - remove block
|
- <kbd>**LMB**</kbd> - remove block
|
||||||
- <kbd>**RMB**</kbd> - place block
|
- <kbd>**RMB**</kbd> - place block
|
||||||
|
- <kbd>**Tab**</kbd> - open inventory
|
||||||
|
- <kbd>**Q**</kbd> - drop item
|
||||||
- <kbd>**F**</kbd> - toggle flight mode
|
- <kbd>**F**</kbd> - toggle flight mode
|
||||||
- <kbd>**N**</kbd> - noclip mode
|
- <kbd>**N**</kbd> - noclip mode
|
||||||
- <kbd>**F1**</kbd> - toggle interface
|
- <kbd>**F1**</kbd> - toggle interface
|
||||||
@ -19,7 +23,65 @@
|
|||||||
- <kbd>**F4**</kbd> - switch camera
|
- <kbd>**F4**</kbd> - switch camera
|
||||||
- <kbd>**F5**</kbd> - reload chunks
|
- <kbd>**F5**</kbd> - reload chunks
|
||||||
|
|
||||||
#### Build with CMake
|
## Build project in Linux
|
||||||
|
|
||||||
|
### Install libraries
|
||||||
|
|
||||||
|
#### Install EnTT
|
||||||
|
|
||||||
|
```sh
|
||||||
|
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
|
||||||
|
|
||||||
|
```sh
|
||||||
|
su -
|
||||||
|
apt-get install entt-devel libglfw3-devel libGLEW-devel libglm-devel libpng-devel libvorbis-devel libopenal-devel libluajit-devel libstdc++13-devel-static
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Debian based distro
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo apt install libglfw3-dev libglfw3 libglew-dev libglm-dev libpng-dev libopenal-dev libluajit-5.1-dev libvorbis-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> CMake missing LUA_INCLUDE_DIR and LUA_LIBRARIES fix:
|
||||||
|
>
|
||||||
|
> ```sh
|
||||||
|
> 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
|
||||||
|
|
||||||
|
```sh
|
||||||
|
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
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo pacman -S glfw-x11 glew glm libpng libvorbis openal luajit
|
||||||
|
```
|
||||||
|
|
||||||
|
If you use Wayland
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo pacman -S glfw-wayland glew glm libpng libvorbis openal luajit
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build engine with CMake
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone --recursive https://github.com/MihailRis/VoxelEngine-Cpp.git
|
git clone --recursive https://github.com/MihailRis/VoxelEngine-Cpp.git
|
||||||
cd VoxelEngine-Cpp
|
cd VoxelEngine-Cpp
|
||||||
@ -29,76 +91,36 @@ cmake -DCMAKE_BUILD_TYPE=Release ..
|
|||||||
cmake --build .
|
cmake --build .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install libraries
|
## Build project in macOS
|
||||||
|
|
||||||
|
### Install libraries
|
||||||
|
|
||||||
#### Install EnTT
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/skypjack/entt.git
|
|
||||||
cd entt/build
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
||||||
sudo make install
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Debian-based distro:
|
|
||||||
```sh
|
|
||||||
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:
|
|
||||||
```sh
|
|
||||||
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:
|
|
||||||
```sh
|
|
||||||
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
|
|
||||||
```sh
|
|
||||||
sudo pacman -S glfw-x11 glew glm libpng libvorbis openal luajit
|
|
||||||
```
|
|
||||||
|
|
||||||
If you use Wayland
|
|
||||||
```sh
|
|
||||||
sudo pacman -S glfw-wayland glew glm libpng libvorbis openal luajit
|
|
||||||
```
|
|
||||||
|
|
||||||
#### macOS:
|
|
||||||
|
|
||||||
```
|
|
||||||
brew install glfw3 glew glm libpng libvorbis lua luajit openal-soft skypjack/entt/entt
|
brew install glfw3 glew glm libpng libvorbis lua luajit openal-soft skypjack/entt/entt
|
||||||
```
|
```
|
||||||
|
|
||||||
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).
|
> [!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 using Docker
|
### Build engine with CMake
|
||||||
|
|
||||||
### Step 0. Install docker on your system
|
```sh
|
||||||
|
git clone --recursive https://github.com/MihailRis/VoxelEngine-Cpp.git
|
||||||
See https://docs.docker.com/engine/install
|
cd VoxelEngine-Cpp
|
||||||
|
mkdir build
|
||||||
### Step 1. Build docker container
|
cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
```
|
cmake --build .
|
||||||
docker build -t voxel-engine .
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2. Build project using the docker container
|
## Build in Windows
|
||||||
|
|
||||||
```
|
>[!NOTE]
|
||||||
docker run --rm -it -v$(pwd):/project voxel-engine bash -c "cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && cmake --build build"
|
> Requirement:
|
||||||
```
|
>
|
||||||
|
> vcpkg, CMake
|
||||||
### 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
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone --recursive https://github.com/MihailRis/VoxelEngine-Cpp.git
|
git clone --recursive https://github.com/MihailRis/VoxelEngine-Cpp.git
|
||||||
@ -111,6 +133,35 @@ rmdir /s /q CMakeFiles
|
|||||||
cmake -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_WINDOWS_VCPKG=ON ..
|
cmake -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_WINDOWS_VCPKG=ON ..
|
||||||
cmake --build . --config Release
|
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 ..```
|
> [!TIP]
|
||||||
|
> You can use ```rm CMakeCache.txt``` and ```rm -rf CMakeFiles``` while using Git Bash
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> 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 ..```
|
||||||
|
|
||||||
|
## Build using Docker
|
||||||
|
|
||||||
|
### Step 0. Install docker on your system
|
||||||
|
|
||||||
|
See <https://docs.docker.com/engine/install>
|
||||||
|
|
||||||
|
### Step 1. Build docker container
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker build -t voxel-engine .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2. Build project using the docker container
|
||||||
|
|
||||||
|
```sh
|
||||||
|
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
|
||||||
|
|
||||||
|
```sh
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user