/brucelib

A monorepo of modules for programming portable, high-performance, soft-real-time applications in Zig

Primary LanguageZigApache License 2.0Apache-2.0

brucelib

WARNING: WORK IN PROGRESS

A monorepo of modules for programming portable, high-performance, soft-real-time applications in Zig

Tracking Zig master

Modules

Modules are designed to be used standalone or in combination with each other (see examples). 3rd-party code is vendored and no external dependencies are required.

  • platform - Windowing, low-level GPU API abstraction, audio, network, etc. (in-progress)
  • graphics - A "bring-your-own-backend" rendering library for 2d and 3d graphics (in-progress)
  • audio - Mixing, synthesis, signal processsing and file loaders (in-progress)
  • algo - Various algorithms used in games and simulations (in-progress)
  • gui - A flexible gui library (planned)
  • util - Tracy Profiler via zig-gamedev's ztracy and other dev, test and deployment utilities (in-progress)

Getting Started

  • Copy/clone/submodule this respository
  • Run all the tests with zig build test
  • Build and run an example: e.g. zig build run-example-000
  • List all available build targets with zig build --help
  • Each module has a build.zig (modules/{module_name}/build.zig) that exposes a std.build.Pkg and a add_to fn. See build.zig for reference.

Alternatively, take a look at this project template

Profiling

To use the Tracy Profiler integration via zig-gamedev's ztracy:

zig build -Dztracy-enable=true

Examples

Example Screen capture
000-funky-triangle: A basic demonstration of how to use the platform and graphics modules to open a window, draw stuff in it and output some audio
001-2d-tile-platformer: A simple 2d game demonstrating some simple rendering and audio mixing using the audio module in-progress

Contributing

Feature requests, bug reports and pull requests are most welcome. Please note however, that this project is in very early stages of development and everything may change.

Licenses and attribution

Each module comes with a NOTICE file with license attributions for module code and 3rd-party vendored libraries. Care has been taken to adhere to the licenses of all 3rd-party code and give proper attribution where required. The contents of module's NOTICE file must be preserved in projects that use it. Alternatively, an umbrella NOTICE is provided that covers the entire monorepo.