# Voxelverse

This is the source code for a voxel-based game about survival and development as a lone consciousness in an unknown world.

## Development Setup

### Windows

**Prerequisites:**
- [Vulkan SDK and VulkanRT](https://vulkan.lunarg.com/sdk/home#windows)
- [CMake](https://cmake.org/download/)
- [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-cta)
  - Select the following optional components during installation:
    - **Desktop development with C++**
    - **CMake tools for Windows**
    - **Vcpkg package manager**
    - **Windows 10 SDK (latest)**
- [Git](https://git-scm.com/downloads)

You must also set the `VCPKG_ROOT` environment variable to point to the vcpkg installation. This will typically be: `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg`. You can set this in PowerShell (make sure you restart VSCode):

```
setx VCPKG_ROOT "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg"
```


**IDE Settings:**

You will need to make sure you have changed some of the settings for your IDE if they are not already set.
For example:
- Make sure vcpkg is enabled
- Plus any other settings to make it easier to develop such as configuring IntelliSense

**Setup:**
- Clone this repo
- For VSCode, install all the extensions recommended by the workspace.
- Using your IDE, Build/Configure (Visual Studio) or Configure(VSCode). You should use `MSVCDebug` or `MSVCRelease` configurations. 
- Once it has built, you will be able to run Voxelverse either through the IDE or through `/build/...`. The .exe will either be in the Debug or Release folder depending on your configuration setup.

### Linux

First install the required packages:

```
# Ubuntu
sudo apt install clang make libcrypto++-dev libopenal-dev libsdl3-dev cmake liblua5.3-dev libvulkan-dev vulkan-utility-libraries-dev glslc

# Arch Linux
sudo pacman -S clang make crypto++ openal sdl3 cmake lua vulkan-headers vulkan-utility-libraries shaderc
```

**NOTE:** On older Ubuntu you must build SDL3 from source. We bundle the required binary with the game.

Next, open the project in VSCode and install the recommended extensions.

After this, you should be able to build and run using the status bar in VSCode.