https://github.com/lolleko/voxelscape
Custom voxel engine with RTS game
https://github.com/lolleko/voxelscape
opengl rendering rts sdf terrain voxel
Last synced: 8 months ago
JSON representation
Custom voxel engine with RTS game
- Host: GitHub
- URL: https://github.com/lolleko/voxelscape
- Owner: lolleko
- License: mit
- Created: 2020-04-21T10:56:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-18T18:12:29.000Z (over 1 year ago)
- Last Synced: 2025-03-26T07:36:27.640Z (about 1 year ago)
- Topics: opengl, rendering, rts, sdf, terrain, voxel
- Language: C++
- Homepage:
- Size: 12.9 MB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Voxelscape

Custom voxel engine written from scratch with OpenGL 4.1. And a small RTS style game on top of it.
|  | [](https://www.youtube.com/watch?v=hcl-Bp3sYNE) [Video](https://www.youtube.com/watch?v=hcl-Bp3sYNE) |
|---|---|
## Features:
* Distance Field Shadows
* Voxel Ambient Occlusion
* Simple point lights (block emission)
* Basic RTS implemented using ECS
* Voxel rendered using advanced instancing, instead of the more popular greedy meshing
* Custom voxel model editor
* Simple terrain gerenation, with a few different biomes
|  |  |
|---|---|
|  |  |
## Requirements:
**Install vcpkg**
https://github.com/microsoft/vcpkg#quick-start
```
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
```
**Install packages**
`./vcpkg install @vcpkg_response_file.txt`
## Build:
clone this repo and cd to it
**Run cmake wih vcpkg toolchainfile**
`cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake`
Replace `$VCPKG_INSTALLATION_ROOT` with the path to your vcpkg repo.
You can also set `$VCPKG_INSTALLATION_ROOT` as enviroment variable this way you can ommit `-DCMAKE_TOOLCHAIN_FILE=`
e.g: `export VCPKG_INSTALLATION_ROOT=~/Repos/vcpkg && cmake -Bbuild`
**Excute the build**
`cmake --build build`
**Optional:** Symmlink compile_commands.json if you use clang based tooling in your IDE/Editor
`ln -s build/compile_commands.json .`
## Run
`./build/voxelscape`
## Recommended editor setup:
* VSCode
* clangd extension for auto completion
* cpp extenstion **(with intellisense disabled)** for debugging