Guide

The guide walks through making a game with klyph, one topic per page, in reading order. The API reference has every declaration.

  1. Getting started: This page takes you from an empty folder to a window with a ship you can fly, then shows how to run it, bound a run and pass settings from the command line.
  2. Sprites and animation: Everything klyph draws from a texture is a quad: an entity's Sprite, a glyph of text, a particle, a rectangle on the canvas.
  3. Entities, systems and scenes: A klyph game keeps its state in a world of entities and changes it with systems: plain functions the frame loop calls in fixed phases.
  4. Input: app.input holds the state of the keyboard, the mouse and every connected gamepad as of this frame, so a system asks "is this key down?" instead of following key events.
  5. Audio: klyph plays sound effects and music through app.audio and mixes them itself, on SDL's audio thread.
  6. Collisions and particles: This page covers two engine steps that run every frame without a system of yours: overlap detection, which reports touching colliders as Overlap events and answers shape queries, and particles, which emit, move and fade pooled quads from emitter components.
  7. Platformers: Collisions reports which colliders overlap, and that is all it does for ordinary colliders: a hero that falls onto a roof sinks into it until a system pushes it back out.
  8. Scrolling worlds: A level larger than the window needs a camera that follows the hero without jitter and scenery that moves slower than the world.
  9. Tile maps: A tile map is a level painted from small square pictures on a grid.
  10. Text, canvas and overlay: Text in klyph is a bitmap font drawn as one quad per glyph, sorted with the sprites.
  11. Shipping: A klyph game ships as a folder with a native executable, its assets/ and the SDL3 library.
  12. Performance: klyph draws 100,000 moving sprites in 2.5 ms a frame on an Apple M4 Pro, so a typical 2D game spends most of its frame waiting for the display.