Mach is not just a game engine; it's a modular "standard library" of Zig gamedev modules that you can use selectively. Its syntax is a direct reflection of this philosophy, built around Zig's explicitness and a powerful, data oriented object system.
Broad Syntax Summary
Mach's design encourages you to think in terms of modules and objects , rather than a traditional class based hierarchy.
π¦ Program Entrypoint & Modules
Unlike a typical Zig program, you often don't write a main.zig file yourself . Mach provides the entrypoint for you, tailored to different platforms (desktop, mobile, etc.). Your application logic lives in one or more Mach modules , which are just Zig files with a specific pub const declaration.
A simple main.zig that brings your modules together looks like this:
zig
const std = @import("std");