# Example programs

One directory per example under `examples/`. Screenshot-capable examples take `-seconds N` and `-shot file.png` for headless verification. The `window` smoke test requires a desktop. Every example has a walkthrough that explains its source section by section.

- [Animation](animation.md): keyframe clips on 2D sprites and 3D transforms, a flipbook, crossfades driven by Finished events, and three skeletal arms showing an animation event, two-bone IK and a blend space
- [Assets](assets.md): a directory of images loaded on worker goroutines behind a progress bar, reloaded when they change on disk, packed into a pack file, with settings that persist between runs
- [Audio](audio.md): positional voices orbiting a listener with Doppler, occlusion and a binaural head model, reverb and low-pass on sliders, fades, pitch, voice stealing, a synthesised music stream and microphone capture
- [Autotile](autotile.md): terrain that picks its own tiles: a 47-tile blob set expanded from a six-tile template, a 16-tile edge set for walls, a corner Wang set whose shorelines curve, and a 64-tile hexagonal edge set in the strip below
- [Clear](clear.md): the renderer's smoke test: a window cleared to a cycling colour, with one frame written to a PNG
- [Gallery](gallery.md): every widget in the interface package, the built-in themes, a texture skin, menus, modals, drag and drop, tables, scalable text and a live particle editor
- [Inputs](inputs.md): everything the input package reports, drawn live: keys, mouse, wheel, capture, fullscreen, typed text with IME composition, and four gamepads
- [Lighting](lighting.md): skinned meshes bent by joint matrices under cascaded shadows, two lamps with cube shadow maps over a field of 160 clustered point lights, a procedural sky that thins to orbit, image-based lighting, and every post-processing setting on a slider including temporal anti-aliasing, depth of field, motion blur, god rays and the lens effects
- [Materials](materials.md): every material feature on a row of spheres and a few props: clearcoat, sheen, subsurface, glass, iridescence, anisotropy, a specular tint, fur, alpha cutout, vertex colours, a scrolling texture, a decal, an outline, an x-ray tint and a stencil mask
- [Network](network.md): a chat room over TCP with pointer positions over UDP, turn-based and asleep until a message arrives, with reliable UDP and its round trip and loss
- [Particles](particles.md): a campfire of fire and smoke, instanced rain, sparks on click and confetti on Space, with a panel that retunes the fire while it burns
- [Pathfinding](pathfinding.md): A*, Dijkstra maps, field of view, flood fill and lines on a grid painted with the mouse, saved and loaded through the save package
- [Physics lab](physics-lab.md): capsules, hulls and boxes on a mesh terrain, a hinge chain, a motorised paddle wheel, a ragdoll and a character controller on stairs
- [Physics 2D](physics2d.md): balls, boxes and triangles falling into a pit with a ramp, a kinematic paddle, a car on sprung wheel joints, a trigger zone and a raycast
- [Physics 3D](physics3d.md): five hundred textured cubes of wood, plastic, metal, gold, car paint, velvet, glass and glowing material falling into a concrete pen
- [Probes](probes.md): a reflection probe baked inside a glowing room, a grid of light probes that colours the matte balls by the wall they stand near, and screen-space reflections on a polished floor, each on a checkbox
- [Roguelike](roguelike.md): a turn-based dungeon crawl with generated rooms, line of sight, chasing goblins and a message log, running in the engine's turn-based mode
- [Shaders](shaders.md): game-written WGSL compiled to SPIR-V in Go, as 2D sprite shaders and mesh surface and vertex hooks, with uniforms driven by sliders
- [Soft bodies](softbody.md): a cloth flag flapping on a pole, a jelly cube that drops and can be kicked beside a rigid crate, and a tank of 2D fluid breaking around a post
- [Solar system](solar.md): the entity component system driving a 3D scene loaded from a scene document, with a prefab, a parent-child hierarchy, an instanced asteroid belt, picking and a render-texture minimap
- [Space](space.md): a ship under gravity in a fictional star system on exact Kepler orbits, with a floating origin, orbit prediction and a slider panel
- [Sprites](sprites.md): a few hundred textured sprites bouncing over a grid, a lit brick floor where a circling lamp throws shadows from three crates, and a key that runs the 2D frame through the post pass
- [Terrain](terrain.md): a chunked terrain with levels of detail and a splat map, impostors, billboards, point and spot lights, fog, world text and live edits
- [Tetris](tetris.md): a complete game on the entity component system, with components, resources, events, systems, timers, tweens, sound and a panel
- [Shaped text](text.md): HarfBuzz shaping, bidirectional and vertical text, fallback fonts, wrapping, hyphenation in the text's own language, rich text, colour glyphs and distance-field text
- [Tiled maps](tiled.md): a map from the Tiled editor, embedded as a .tmj, built into tilemaps with animated and flipped tiles and outlined objects
- [Tiles](tiles.md): a sprite sheet, a culled tilemap, a following 2D camera, a walk cycle, layers, timers, tweens and a nine-slice HUD
- [Vector paths](vector.md): filled and stroked paths, fill rules, curves, caps and joins, textured fills, blend modes and the transform stack
- [Model viewer](viewer.md): an orbit camera over a generated 3D scene, or a glTF model loaded from disk, with lights, shadows and ambient occlusion
- [Window](window.md): the platform layer's smoke test, opening a native window and presenting cleared frames without the engine
