The example catalog: 119 raylib demos in jolt
A map of the whole suite. Each example is one namespace under src/net/b12n/raylib_jlt/, runnable by a friendly bb <name> task or the underlying jolt -M:<alias>. bb info prints this grouping live; this page adds the "how it's wired" recipe at the end.
Run one, list them, or reel through all of them:
bb <name> # e.g. bb asteroids (opens a window)
bb examples # flat list with descriptions
bb info # the grouped cheat-sheet below
bb run-all [secs] # every example, N seconds each (unattended)
games (10)
core (23)
shapes (42)
text (5)
3d (16)
The 3D set stands entirely on two building blocks from rlgl-immediate-mode.md and struct-by-value-pointer-trick.md: with-camera-3d (the camera, by pointer) and cube! (the geometry, by rlgl vertices).
generative (9)
All eight are pure math + the drawing API, no new bindings. They showcase the suite as a generative-art canvas: cellular automata, agent flocking, particle systems, rotating-vector Fourier series, parametric roulette curves, string-rewrite fractals, and noise-steered flow fields.
textures (4)
raylib's texture API returns structs by value and has no binding here; these go through rlgl's scalar layer instead, so every texture is built pixel by pixel in native memory rather than loaded from a file. See textures-via-rlgl.md.
shaders (10)
GLSL compiled at runtime and run over a full-screen quad. raylib's LoadShader returns a Shader by value, which needed jolt's [:by-value [:struct ...]] - so these are the first examples with a hard jolt floor (0.7.23). The source lives as a string in each namespace rather than a .glsl file, so an example stays one self-contained file.
That [:by-value ...] support also supersedes the workarounds described in textures-via-rlgl.md and struct-by-value-pointer-trick.md; those pages still describe what the suite currently does elsewhere. A page on the by-value API itself is not written yet.
Adding an example: the five touchpoints
The suite is deliberately mechanical to grow. One new example touches five places:
- Source:
src/net/b12n/raylib_jlt/<name>.clj, a namespace with a-mainthat runs the canonical loop (seeheadless-smoke-testing.md) against thenet.b12n.raylib-jlt.raylibAPI. deps.ednalias::<name> {:main-opts ["-m" "net.b12n.raylib-jlt.<name>"]}sojolt -M:<name>works.check.cljrequire: addnet.b12n.raylib-jlt.<name>to the:requirelist innet.b12n.raylib-jlt.check, so the headless compile-check covers it.- Registry row: add
["<display-name>" "<alias>" "<group>" "<desc>"]to theexamplesvector inscripts/examples_registry.clj, the single source of truth thatbb.ednand the demo recorder both read. bb.edntask: add a matching<name> {:doc "..." :task (run-example "<name>")}row, sobb <name>works alongsidebb info/bb examples/bb run-all.
bb check:registration verifies all five without needing jolt or libraylib, and CI runs it before the compile gate. Touchpoint 3 is why it exists: bb check compiles what check.clj requires, so an example missing from that list is never compiled and the run still reports success.
Note that the alias is not always the display name, and the namespace is derivable from neither. ["basic-window" "run" ...] reaches net.b12n.raylib-jlt.core through the :run alias, and twelve rows differ this way, so deps.edn is the source of truth for which namespace a row means.
A new group needs two more edits: the group list in bb.edn's info task and the :groups vector in scripts/demo_manifest.edn.
flowchart LR src["src/…/<name>.clj<br/>the example"] --> deps["deps.edn<br/>:<name> alias"] src --> chk["check.clj<br/>require (headless compile)"] src --> reg["scripts/examples_registry.clj<br/>registry row"] reg --> bb["bb.edn<br/>bb <name> task"]
Filenames use underscores (basic_screen_manager.clj); the namespace uses hyphens (net.b12n.raylib-jlt.basic-screen-manager), Clojure's standard file↔ns mapping.
One ordering rule applies inside every file: since jolt 0.4.0 an unresolved symbol is a compile error rather than a late-bound reference, so a definition must appear before its first use, in a fn body and in an :or destructuring default just as much as at top level. It bites hardest in the shared raylib.clj binding layer, where one misordered symbol stops every example from loading and only the first offender is reported. jolt -M:check is the quick confirmation; see the jolt note in the README.
See also
kwarg-drawing-api.md: the API every example is written against.headless-smoke-testing.md: the loop shape and howbb run-all/bb checkverify the catalog.






















































































































