Skip to content

License

Notifications You must be signed in to change notification settings

Jan3385/VoxaEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

50cda5a · · Aug 26, 2025

History

328 Commits
Aug 26, 2025
Jul 1, 2025
Feb 12, 2025
Aug 25, 2025
Jul 27, 2025
Aug 14, 2025
Aug 2, 2025
Jul 10, 2025
Aug 20, 2025
Jun 30, 2025
Jul 10, 2025
Aug 18, 2025
Aug 14, 2025

Repository files navigation

VoxaEngine

Game Image

Disclaimer: The definiton of a voxel was slightly bended when making this engine. A voxel here represents a set 3D OR 2D volume as a square/cube which is generally incorrect but so is pixel and calling them squares doesn't sound nice.

VoxaEngine is currently capable of making sand falling simulations, fire simulations, heat transfer & pressure simulations.ons.

Uses SDL2, FreeType library and Dear ImGui. Engine is programmed in C++ and rendered using OpenGL.

Features OpenGL compute shaders using GLEW for faster simulation passes.

Sand Falling simulation

Sand simulation Gif

Utilizes Dirty Rect's and multithreading for maximum performance.

It is capable of simulating solids, liquids and gasses all interacting with each other.

Each voxel has a density, which affects the outcome of the simulation.

Heat Transfer simulation

Capable of trasfering heat between voxels and changing voxel states based on temperature.

Utilizes multithreading and sectioning for extra performance.

Most of the heat transfer is done on the GPU for extra performace

Simulation includes heat capacity and heat conductivity for each voxel for more realistic transfers.

Pressure Transfer simulation

Capable of simulating gas and liquid "pressures" and their ability to compress or stretch in avalible space.

Most of the gas pressure simulation is done on the GPU for faster speeds

Fire simulation

Fire GIF

Utilizing flamability and flame propagation with oxygen

Physics simulation

Simulation GIF

Utilizing Box2D and a custom object logic to support fully destructable, dynamic objects

OpenGL rendering

SDL2 renderer and most of other renderers are not made with this kind of "voxel" rendering in mind. This is why this project runs on custom render shaders to provide maximum performance that wouldn't be possible without it

How To Run:

Note

ImGui and poly2tri libraries are dynamically downloaded on build. Your first build may take few minutes

Caution

Installing and setting up vcpkg is an extensive process. You will have to install your OSs triplets and such. If you have no experience with vcpkg it's recommended to first look up a tutorial to set it up correctly before compiling this project

Tip

There are prebuild binaries avalible which you can just download and immediately run

Windows 10/11

Important

You need to have installed CMake v3.10 or more, g++ compiler with Ninja generator. You will need to have vcpkg installed somewhere to use its path to get vcpkg.cmake

(All commands are inside the PROJECT folder)

To prepare the project for compilation run:

cmake -S . -B build -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="PATH\TO\VCPKG\CMAKE\vcpkg.cmake"

Afterwards run following to set the release preset:

cmake --preset release

Build the project into executable binaries with:

cmake --build build

After that, run VoxaEngine.exe from inside the build/Games/Game folder.

UNIX Linux

Important

You need to have installed CMake v3.10 or more, g++ compiler with Ninja generator. You will need to have vcpkg installed somewhere to use its path to get vcpkg.cmake

You need to install these packages before compiling (package name depends on your linux distribution):

  • libglew-dev or glew
  • libgl1-mesa-dev & mp; libgl-dev or mesa

(All commands are inside the PROJECT folder)

To prepare the project for compilation run:

cmake -S . -B build -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="PATH/TO/VCPKG/CMAKE/vcpkg.cmake"

Afterwards run following to set the release preset:

cmake --preset release

Build the project into executable binaries with:

cmake --build build

After that, run VoxaEngine from inside the build/Games/Game folder.

Controls

  • w a s d - movement (w and s - swim up and down or jump when not using noclip)
  • left click - place or shoot
  • right click - explode
  • t z u - place a physics barrel, physics sphere, static crate

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published