stacks / raylib c

raylib + C + explicit game loop

A small C-based 2D game workflow: initialize the library, update game state, draw each frame, and own resource lifetime and packaging.

Sources verified Sep 2026

When to use it

  • A small desktop game or prototype benefits from a direct C API
  • The developer is comfortable with memory and resource lifetime
  • The project can supply its own scenes, UI, and content workflow

How the pieces fit

raylib provides windowing, graphics, input, and audio. Your C code owns the main loop, simulation, scene transitions, and asset lifetime. Keep update and render responsibilities distinct, unload resources explicitly, and test packaged asset paths. Pin library and compiler versions and validate distribution on the actual target. A browser build adds a separate toolchain and browser constraints; language bindings are independent choices.

Tools and responsibilities

raylibWindowing, graphics, input, audio, and resource APIs
C game loopSimulation, scenes, and resource lifetime

Architectural examples

Each example links to a public source — no claims about private internals.

Cat vs Roomba

The maintainer publishes this game-jam sample in the raylib-games collection. A small public game example, not a production distribution template.

source

Dr Turtle and Mr Gamera

The maintainer collection includes this sample game. Inspect current source before reuse; the example does not establish every target platform.

source

Skip if

Skip if a visual scene editor is required, browser delivery is the primary target, or a high-fidelity 3D production workflow is central.

Other playbooks

WWADD — Choose the tool. Make the move. Build the stack.

FREE REFERENCE · NO LOGINCONTACTPRIVACYTERMS