Storie is a hackable engine designed for fast prototyping with a clear path to native compilation.
- Built with Nim. Readable code, fast compilation and small binaries.
- Write markdown with executable code blocks in simplified Nim via Nimini.
- Code with raylib as an entry point.
- Auto-converts to SDL3 for more robust rendering and platform support.
- Compiles to WASM (via Emscripten) by default with easy compilation to native.
Swap backends (Raylib/SDL3), modify anything, break things. It's made for tinkerers who want zero constraints.
Check it out live: Demo
GitHub Gist examples:
The engine is built around GitHub features. No need to actually install Nim, or anything for that matter. Just create a new repo from the Storie template, update index.md with your own content and it'll auto-compile for the web. Enable GitHub Pages and you'll see that content served live within moments. GitHub Actions take care of the full compilation process.
Core engine features:
- Cross-Platform - Runs natively and in web browsers via WebAssembly
- Fast-Prototyping - Write code on GitHub Gist and see it run live. Example | Source Gist
- SDL3-powered - Code in Raylib, get the same code rendered via SDL3. Example
Quick Start:
- Create a gist using Markdown and Nim code blocks. Example Gist
- See your gist running live:
https://maddestlabs.github.io/Storie?gist=GistID
Create your own project:
- Create a template from Storie and enable GitHub Pages
- Update index.md with your content and commit the change
- See your content running live in moments
Native compilation:
- In your repo, go to Actions -> Export Code and get the exported code
- Install Nim locally
- Replace index.nim with your exported code
- Choose your backend:
- Raylib (default):
./build.sh - SDL3 + OpenGL:
./build-cmake.sh - SDL3 + GPU (Vulkan/D3D12/Metal):
./build-sdlgpu.sh - Web:
./build-web.sh - Windows:
build-win.bat
- Raylib (default):
You'll get a native compiled binary in just moments, Nim compiles super fast.
Storie supports multiple graphics backends:
| Backend | API | Platforms | WASM | Use Case |
|---|---|---|---|---|
| Raylib | Raylib 3D | All | ✅ WebGL | Easiest, great for prototyping |
| SDL3 + OpenGL | OpenGL 3.3 | All | ✅ WebGL | Balance of ease and control |
| SDL3 + GPU | Vulkan/D3D12/Metal | Desktop/Mobile | ⏳ Future | Best performance, modern GPUs |
Note: SDL_GPU WebGPU backend for WASM is not yet available. For WASM builds, use OpenGL/WebGL.
For production builds requiring maximum performance:
# Compile shaders first (one-time setup)
./compile-shaders.sh
# Build with SDL_GPU
./build-sdlgpu.shBenefits:
- 27% less CPU overhead vs OpenGL
- Vulkan (Linux/Windows), Direct3D 12 (Windows), Metal (macOS/iOS)
- Modern GPU architecture
- Better for complex 3D scenes
WASM Note: SDL_GPU doesn't support WebGPU yet. For web builds, use:
./build-web.sh # Raylib (simplest)
./build-web-sdl.sh # SDL3 + WebGLSee START_HERE_SDL_GPU.md and SDL_GPU_WASM_STATUS.md for details.
- Successor to Storiel, the terminal based proof-of-concept with Lua scripting.
- Rebuilt from Backstorie, a terminal focused template providing a more robust foundation for further projects.