- Notifications
You must be signed in to change notification settings - Fork0
Building game development ecosystem for@ziglang!
License
coderonion/zig-gamedev
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Please note that the project requires latest Zig compiler (master/nightly). It can be downloadedhere.
Libraries -Sample applications -Vision -Others using zig-gamedev -Monthly reports -Roadmap
We build game development ecosystem forZig programming language, everyday since July 2021. Please considersupporting the project. We create:
- Cross-platform and composablelibraries
- Cross-platformsample applications
- DirectX 12sample applications andintro applications
- Mini-games (in planning)
To get started on Windows/Linux/macOS try outphysically based rendering (wgpu) sample:
git clone https://github.com/michal-z/zig-gamedev.gitcd zig-gamedevzig build physically_based_rendering_wgpu-run| Library | Latest version | Description |
|---|---|---|
| zphysics | 0.0.5 | Zig API and C API forJolt Physics |
| zflecs | 0.0.1 | Zig bindings forflecs ECS |
| zopengl | 0.1.0 | OpenGL loader (supports 3.3 Core Profile and ES 2.0 Profile) |
| zsdl | 0.0.1 | Bindings for SDL2 (wip) |
| zgpu | 0.9.0 | Small helper library built on top of native wgpu implementation (Dawn) |
| zgui | 0.9.6 | Easy to usedear imgui bindings (includesImPlot) |
| zaudio | 0.9.3 | Fully-featured audio library built on top ofminiaudio |
| zmath | 0.9.6 | SIMD math library for game developers |
| zstbi | 0.9.3 | Image reading, writing and resizing withstb libraries |
| zmesh | 0.9.0 | Loading, generating, processing and optimizing triangle meshes |
| ztracy | 0.9.0 | Support for CPU profiling withTracy |
| zpool | 0.9.0 | Generic pool & handle implementation |
| zglfw | 0.5.2 | MinimalisticGLFW bindings with no translate-c dependency |
| znoise | 0.1.0 | Zig bindings forFastNoiseLite |
| zjobs | 0.1.0 | Generic job queue implementation |
| zbullet | 0.2.0 | Zig bindings and C API forBullet physics library |
| zwin32 | 0.9.0 | Zig bindings for Win32 API (d3d12, d3d11, xaudio2, directml, wasapi and more) |
| zd3d12 | 0.9.0 | Helper library for DirectX 12 |
| zxaudio2 | 0.9.0 | Helper library for XAudio2 |
| zpix | 0.9.0 | Support for GPU profiling with PIX for Windows |
- Very modular "toolbox of libraries", user can use only the components she needs
- Works on Windows, macOS and Linux
- Has zero dependency exceptZig compiler (master) and
gitwithGit LFS - no Visual Studio, Build Tools, Windows SDK, gcc, dev packages, system headers/libs, cmake, ninja, etc. is needed - Building is as easy as running
zig build(see:Building) - 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-platfrom graphics and DirectX 12 for low-level graphics on Windows
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 to 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 achive 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
- Aftersun - Top-down 2D RPG
- Pixi - Pixel art editor made with Zig
- Simulations - GPU Accelerated agent-based modeling to visualize and simulate complex systems
- elvengroin legacy - TBD
- jok - A minimal 2D/3D game framework for Zig
To build all sample applications (assumingzig is in the PATH andGit LFS is installed):
git clone https://github.com/michal-z/zig-gamedev.gitcd zig-gamedevzig build
Build artifacts will show up inzig-out/bin folder.
zig build <sample_name> will build sample application named<sample_name>.
zig build <sample_name>-run will build and run sample application named<sample_name>.
To list all available sample names runzig build --help and navigate toSteps section.
Options for Windows applications:
-Dzd3d12-enable-debug-layer=[bool]- Direct3D 12, Direct2D, DXGI debug layers enabled-Dzd3d12-enable-gbv=[bool]- Direct3D 12 GPU-Based Validation (GBV) enabled-Dzpix-enable=[bool]- PIX markers and events enabled
Thanks to all people who sponsor zig-gamedev project! In particular, these fine folks sponsor zig-gamedev for $25/month or more:
- Derek Collison (derekcollison)
- mzet (mzet-)
- Garett Bass (garettbass)
- Connor Rowland (ckrowland)
- Zig Software Foundation (ziglang)
- shintales (shintales)
- Joran Dirk Greef (jorangreef)
About
Building game development ecosystem for@ziglang!
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- C57.2%
- C++28.2%
- Objective-C10.2%
- Zig3.4%
- R1.0%
- CMake0.0%








