Banjo API 1.0.0-rc.2
Low-level C99 game development API
Loading...
Searching...
No Matches
Example Codes

Runnable example programs, from single-API demos to full tutorials.

Every program under examples/*.c appears here by name. Each one is a single, self-contained program documented in its own top-of-file comment block: the source you read is the source you compile.

Most examples are short demonstrations of one API. A handful are full tutorials with rich, step-by-step walkthroughs, meant to be read in order:

  1. start.c: Hello, Window. Open a window, draw shapes, react to ESC. The canonical first program.
  2. event_callbacks.c: input via callbacks. Register handlers for keyboard, mouse buttons, cursor motion, and enter/leave events. Shows how the App API plumbs user_data through every callback.
  3. drawing_2d.c: drawing 2D primitives. Pixels, lines, polylines, triangles, rectangles, circles (filled and outlined).
  4. load_bmp.c: load a BMP from disk, query its size, blit it stretched to the framebuffer. Introduces the bitmap loader and blit operation.
  5. audio_pcm.c: procedural audio synthesis with the built-in sine/square/triangle/sawtooth waveform callback.
  6. pong.c: capstone. A complete two-player Pong that ties together window, input, drawing, and frame-paced timing.

The other examples

Shorter, single-API demos, grouped by subsystem: