Example Programs
Manual examples
Section titled “Manual examples”The examples/ directory contains runnable demos intended for manual
exploration rather than CI coverage.
Visible window demos
Section titled “Visible window demos”If SDL2 is available at configure time, you can run:
./build/kelvra run examples/window_open.kel./build/kelvra run examples/window_events.kel./build/kelvra run examples/flappy_bird.kelThese demonstrate visible window creation, event polling, rendering, and simple
real-time game logic through the official window package.
The Flappy Bird demo also breaks cleanly into reusable modules under
examples/game/flappy/, which makes it a good candidate for future
documentation walkthroughs about modules, game-state structs, and package use.
Test-focused samples
Section titled “Test-focused samples”The tests/ tree also acts as a dense catalog of language behavior. It includes
focused .kel files for:
- control flow
- imports
- closures
- optimizations
- type errors
- package validation
- tooling behavior
When documenting a feature, this directory is often the best source of stable examples because it already captures edge cases under automated coverage.