- Notifications
You must be signed in to change notification settings - Fork0
Development repo for@zig-gamedev libs and sample applications
License
CoffeeImpliesCode/zig-gamedev
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Libraries -Getting Started -Sample applications -Others using zig-gamedev
zig-gamedev dev repo
We build game development ecosystem forZig programming language, every day since July 2021. Please considersupporting the project. We create:
- Cross-platform and composablelibraries
- Cross-platformsample applications
- DirectX 12sample applications
- Very modular "toolbox of libraries", user can use only the components she needs
- JustZig is required to build on Windows, macOS and Linux - no Visual Studio, Build Tools, Windows SDK, gcc, dev packages, system headers/libs, cmake, ninja, etc. is needed
- Building is as easy as
zig build - Libraries are written from scratch in Zigor provide Ziggified bindings for carefully selected C/C++ libraries
- Uses native wgpu implementation (Dawn) or OpenGL for cross-platform graphics and DirectX 12 for low-level graphics on Windows
Download thelatest archive or clone/submodule with Git.
Note: If using Git then you will needGit LFS to be installed.
Ourmain branch is currenly tracking Zig0.13.0-dev.351+64ef45eb0. Or you can use theunstablezig-0.14.0 branch.
zigup is recommended for managing compiler versions. To switch to the compiler version after branch checkout:
zigup$(< .zigversion)Alternatively, you can download and install manually using the links below:
| OS/Arch | Download link |
|---|---|
| Windows x86_64 | zig-windows-x86_64-0.13.0-dev.351+64ef45eb0.zip |
| Linux x86_64 | zig-linux-x86_64-0.13.0-dev.351+64ef45eb0.tar.xz |
| macOS x86_64 | zig-macos-x86_64-0.13.0-dev.351+64ef45eb0.tar.xz |
| macOS aarch64 | zig-macos-aarch64-0.13.0-dev.351+64ef45eb0.tar.xz |
Build and run theSamples
To get started on Windows/Linux/macOS try outphysically based rendering (wgpu) sample:
zig build physically_based_rendering_wgpu-runTo get a list of all available build steps:
zig build -lNote: Libs are being migrated fromlibs/ folder in this repo to each their own repository under thezig-gamedev GitHub organisation. Seemigration tracking PR.
| Library | Description |
|---|---|
| zaudio | Cross-platform audio usingminiaudio |
| zbullet | Build package,C API and bindings forBullet physics |
| zflecs | Build package and bindings forflecs ECS |
| zemscripten | Build package and shims forEmscripten emsdk |
| zglfw | Build package & bindings forGLFW |
| zgpu | Small helper library built on top ofDawn native WebGPU implementation |
| zgui | Build package and bindings forDear Imgui,Test engine,ImPlot,ImGuizmo andimgui-node-editor |
| zjobs | Generic job queue implementation |
| zmath | SIMD math library for game developers |
| zmesh | Loading, generating, processing and optimizing triangle meshes |
| znoise | Build package & bindings forFastNoiseLite |
| zopengl | OpenGL loader (supports 4.2 Core Profile and ES 2.0 Profile) |
| zopenvr | Bindings forOpenVR |
| zphysics | Build package,C API and bindings forJolt Physics |
| zpix | Support for GPU profiling with PIX for Windows |
| zpool | Generic pool & handle implementation |
| zsdl | Bindings for SDL2 and SDL3 |
| zstbi | Image reading, writing and resizing withstb libraries |
| ztracy | Support for CPU profiling withTracy |
| zwindows | Windows development SDK for Zig game developers |
Some of the sample applications are listed below. More can be found insamples directory.
physically based rendering (wgpu): This sample implements physically-based rendering (PBR) and image-based lighting (IBL) to achive realistic looking rendering results.
zig build physically_based_rendering_wgpu-runaudio experiments (wgpu): This sample lets the user experiment with audio and observe data that feeds the hardware.
zig build audio_experiments_wgpu-runbullet physics test (wgpu): This sample application demonstrates how to use full 3D physics engine in your Zig programs.
zig build bullet_physics_test_wgpu-runprocedural mesh (wgpu): This sample shows how to efficiently draw several procedurally generated meshes.
zig build procedural_mesh_wgpu-rungui test (wgpu): This sample shows how to use ourzgui library.
zig build gui_test_wgpu-run
Some of the sample applications are listed below. More can be found insamples directory. They can be built and run on Windows and Linux (Wine + VKD3D-Proton 2.8+):
bindless: This sample implements physically based shading and image based lighting to achieve realistic looking rendering results. It uses bindless textures and HLSL 6.6 dynamic resources.
zig build bindless-runrasterization: This sample application shows how GPU rasterizes triangles in slow motion.
zig build rasterization-runsimple raytracer: This sample implements basic hybrid renderer. It uses rasterization to resolve primary rays and raytracing (DXR) for shadow rays.
zig build simple_raytracer-runmesh shader test: This sample shows how to use DirectX 12 Mesh Shader.
zig build mesh_shader_test-run
- Tides of Revival - First-person, open-world, fantasy RPG being developed in the open
- Markets - Visually simulate markets of basic consumers and producers
- krateroid - 3D strategy game
- blokens - Voxel game
- Delve Framework - Simple game framework for making games with Lua
- jok - A minimal 2D/3D game framework for Zig
- Aftersun - Top-down 2D RPG
- Pixi - Pixel art editor made with Zig
About
Development repo for@zig-gamedev libs and sample applications
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- C53.2%
- C++29.8%
- Objective-C11.0%
- Zig5.0%
- R0.7%
- Rez0.3%








