Skip to content
MichaelFisher1997 edited this page Jan 5, 2026 · 3 revisions

ZigCraft Wiki

Welcome to the ZigCraft documentation wiki - a voxel engine built with Zig and Vulkan.


Overview

ZigCraft is a high-performance voxel engine featuring:

  • Vulkan-based rendering with a clean RHI abstraction
  • Procedural world generation with 21 biomes
  • Dynamic lighting with sky and block light propagation
  • Cascaded shadow maps for realistic shadows
  • Multithreaded chunk processing via job system
  • LOD system for extreme render distances
  • Immediate-mode UI system

Quick Links

Game Content

Page Description
Block Types Complete reference of all 40 block types
Biomes All 21 biomes with climate parameters

Engine Systems

Page Description
Architecture System overview and module organization
Engine Core Window, time, logging, job system
Rendering RHI, camera, shadows, render graph
World System Chunks, meshing, LOD
World Generation Terrain, caves, decorations
Math Library Vec3, Mat4, AABB, Frustum, Ray
Input System Keyboard and mouse handling
UI System Menus, fonts, widgets
Game Systems Player, inventory, controls

Development

Page Description
Contributing Code style and development workflow

Project Structure

src/
├── engine/               # Core engine systems
│   ├── core/             # Window, time, logging, job system
│   ├── graphics/         # RHI, camera, shadows, textures
│   ├── math/             # Vec3, Mat4, AABB, Frustum
│   ├── physics/          # Collision detection
│   ├── input/            # Input handling
│   └── ui/               # Immediate-mode UI
│
├── world/                # Voxel world
│   ├── worldgen/         # Terrain generation
│   ├── chunk.zig         # Chunk data structure
│   ├── chunk_mesh.zig    # Greedy meshing
│   └── world.zig         # World manager
│
└── game/                 # Game logic
    ├── app.zig           # Main application
    ├── player.zig        # Player controller
    ├── inventory.zig     # Item storage
    └── ui/               # Game UI

libs/                     # Local dependencies
├── zig-math/             # Math library
└── zig-noise/            # Noise functions

assets/shaders/vulkan/    # SPIR-V shaders

Getting Started

Prerequisites

The project uses Nix for dependency management. All commands must be wrapped:

nix develop --command <command>

Build Commands

# Build
nix develop --command zig build

# Run
nix develop --command zig build run

# Test
nix develop --command zig build test

# Release build
nix develop --command zig build -Doptimize=ReleaseFast

# Format code
nix develop --command zig fmt src/

Features

Rendering

  • Vulkan backend with RHI abstraction
  • Cascaded shadow maps (3 cascades)
  • Procedural sky with day/night cycle
  • Volumetric clouds
  • MSAA anti-aliasing (1x-8x)
  • Anisotropic filtering (up to 16x)

World

  • 16x256x16 chunk size
  • Greedy mesh optimization
  • Multi-level LOD (up to 160 chunks)
  • 40 block types across 21 biomes
  • Worm caves and large caverns
  • Ore generation

Gameplay

  • Physics-based player movement
  • Creative and survival modes
  • 36-slot inventory system
  • Block breaking and placing
  • World map overlay

Controls

Key Action
W/A/S/D Movement
SPACE Jump / Fly up
SHIFT Fly down
ESC Pause menu
I Open inventory
M Open map
1-9 Select hotbar slot
Left Click Break block
Right Click Place block

See Game Systems for full controls reference.


Last updated: January 2026

Clone this wiki locally