Guide
The guide walks through making a game with klyph, one topic per page, in reading order. The API reference has every declaration.
- 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.
- 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. - 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.
- Input:
app.inputholds 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. - Audio: klyph plays sound effects and music through
app.audioand mixes them itself, on SDL's audio thread. - 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
Overlapevents and answers shape queries, and particles, which emit, move and fade pooled quads from emitter components. - Platformers:
Collisionsreports 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. - 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.
- Tile maps: A tile map is a level painted from small square pictures on a grid.
- Text, canvas and overlay: Text in klyph is a bitmap font drawn as one quad per glyph, sorted with the sprites.
- Shipping: A klyph game ships as a folder with a native executable, its
assets/and the SDL3 library. - 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.