Skip to content

1mB33/AtlanticBeast

Repository files navigation

Table of content

AtlanticBeast

Realtime GPU Voxel Ray Tracer using Vulkan Compute & DDA Traversal.
Project is separated into several libraries. For demonstration purpose a Minecraft alike demo game was created.

Engine libraries:

  • Core (fundamental functionality, debugging tools, OS headers)
  • Application (windows managment, input managment, application managment)
  • Math (vector math, geometric primitives, matrices and vector implementations)
  • Rendering (vulkan C++ wrappers, rendering logic, shaders)

Project uses voxel traversal algorithm implementation based on 'A Fast Voxel Traversal Algorithm for Ray Tracing' by John Amanatides and Andrew Woo (1987) and Blinn-Phong Reflection lighting.

Implements a custom cross-platform window management system with runtime switchable behavior. Features a low-latency input system and a fully custom Vulkan-based compute rendering pipeline.

About demo

In demo we can play a simple minecraft lookalike game where you can place and remove blocks. Uses Jolt Physics to showcase the rendering pipeline and test performance.

Demos physics showcase

Screenshot

Screenshot

Screenshots

Screenshot Screenshot

Screenshot Screenshot

Screenshot Screenshot

Current demo keybinds:

Movement:

W - Move forward
S - Move backward
D - Strafe right
A - Strafe left
E - Fly up
Q - Fly down
Mouse movement - camera rotation

Interactions:

SPACE or LEFT MOUSE BUTTON - Place a block
X or RIGHT MOUSE BUTTON - Remove a block
1 - Weak push
2 - Medium push
3 - Strong push
Z - Debug view

Building the project

Build dependencies:

  • Vulkan SDK
  • CMake or Visual Studio with CMake support
  • Compiler that supports at least C++17
  • Windows or Linux operating system
  • X11 libraries (linux only)

Linux

Get necessary libraries and headers

Arch linux based systems

sudo pacman -S --needed cmake make libx11 libxrandr libxinerama libxcursor libxi vulkan-tools vulkan-headers vulkan-utility-libraries glslang spirv-tools

Ubuntu/Debian based systems

sudo apt update && sudo apt install -y cmake make libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev vulkan-tools libvulkan-dev vulkan-utility-libraries-dev glslang-tools spirv-tools

Download and build the project

git clone --recurse-submodules -j8 https://github.com/Im-Bee/AtlanticBeast.git &&
cd AtlanticBeast &&
mkdir Build &&
cd Build &&
cmake .. -DCMAKE_BUILD_TYPE=Release &&
cmake --build .

Run project from a bin directory that is created in root directory of the project Bin/TARGET_ARCH/BUILD_TYPE/.

Windows

Download Vulkan SDK from a place like LunarG. If you are using Visual Studio make sure to have CMake support installed.

Visual Studio

Open root directory of the project with Visual Studio. Wait for cmake to build. Select AtlBee project as a build target. Prefer release build.

CMake

mkdir Build
cd Build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .

Run project from a bin directory that is created in root directory of the project Bin/TARGET_ARCH/BUILD_TYPE/.