Skip to content
/ storie Public template
generated from maddestlabs/backstorie

Hackable, creative coding engine built in Nim. Build stuff using Markdown with executable, Nim-like code blocks.

License

Notifications You must be signed in to change notification settings

maddestlabs/storie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storie

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.

Features

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

Getting Started

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

You'll get a native compiled binary in just moments, Nim compiles super fast.

Graphics Backends

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.

SDL_GPU Backend (NEW!)

For production builds requiring maximum performance:

# Compile shaders first (one-time setup)
./compile-shaders.sh

# Build with SDL_GPU
./build-sdlgpu.sh

Benefits:

  • 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 + WebGL

See START_HERE_SDL_GPU.md and SDL_GPU_WASM_STATUS.md for details.

History

  • 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.

About

Hackable, creative coding engine built in Nim. Build stuff using Markdown with executable, Nim-like code blocks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published