HexGPU is a game project with all game logic calculated entirely on the GPU side.
The world in this game is a 3D grid of hexagonal prisms of size roughly equal to 1 m. This grid is updated with fixed frequency - water flows, grass grows, light propagates, sand falls, etc.
All world data (blocks, additional data, lighting data, etc.) is stored in GPU memory. All game logic is implemented via set of compute shaders which operate with game data on the GPU side. World generation performs by a shader too.
Player logic (movement) is also GPU-driven, C++ code provides only user inputs. Thus player state is stored in GPU memory too.
World meshing is (of course) performed on the GPU. World data is used directly by special compute shader which produces result triangles. Finally these triangles are rendered as usually.
You need a C++ compiler with C++17 standard support. CMake 3.15 or newer required.
SDL2 library is used for platform-independent window creation and input. You can specify path to SDL2 libraries via _SDL2DIR cmake variable.
The project uses Vulkan as API for GPU computing and rendering. So, Vulkan headers are necessary. I recommend to use Vulkan SDK for that. Vulkan 1.1 or newer is required.
glslangValidator is required in order to compile GLSL shaders. You can specify path to it via GLSLANGVALIDATOR cmake variable.
This project uses some thirdparty dependencies as git submodules. Do not forget to init/update submodules before building!
Vulkan 1.1 support in the system is required. Some Vulkan extension are also needed, like 8bit/16bit integers. Generally the game should work on any modern GPU (AMD, nVidia, Intel).
Video memory requirements are for now in orders of hundreds of megabytes. More memory for bigger active world size is required.
For now it's possible to run the game, fly, build blocks, destroy them. Game world is pseudo-randomly generated and is somewhat unlimited. The number of block types is for now very poor - around 20.
It's possible to specify time of day via debug menu. Weather conditions may be specified too. This sometimes affects game logic.
World state is automatically saved on disk, default directory is named world (make sure it exists).
For now all controls are fixed:
HexGPU uses file HexGPU.cfg for settings.
Some configuration params: