A lightweight, embeddable scripting language for creative coding.
Python-inspired • Written in C • Built for retro-style graphics
🌐 Website • 🎮 Playground • 📚 Documentation
Pi-Script (Pixel Script) is a lightweight scripting language inspired by Python and implemented in C. It is designed for simplicity, performance, and creative experimentation within a 128×128 pixel virtual environment.
Pi-Script is ideal for:
- 🎓 Educational use
- 🎨 Creative coding
- 🕹 Retro-style graphics experiments
- 🌐 Embeddable web playgrounds
- 🧩 Lightweight scripting integration in C projects
Pi-Script makes it easy to create visual experiments, animations, and small interactive programs inside a retro-style virtual console.
Pi Shell is the native desktop runtime environment for Pi-Script.
It provides a lightweight development workflow for running Pi-Script locally with:
- 🧠 Interactive script execution
- 📁 File-based project support
- ⚡ Fast native performance
- 🛠 Integrated graphics window
- 🧩 Ideal for game development and experiments
Run scripts directly:
run <script-name>.piPi Shell extends Pi-Script beyond the browser, turning it into a practical creative coding tool for real desktop development.
A complete Snake game built entirely in Pi-Script.
This example demonstrates:
- 🎮 Game loop implementation
- 🕹 Keyboard input handling
- 🧠 State management
- 🎨 Real-time rendering with
pixel()anddraw() - ⚡ Smooth performance inside the 128×128 virtual console
The Snake game proves that Pi-Script is capable of building fully playable retro-style games with clean and minimal code.
Try it in (snake.px):
- 🌐 Online Playground
- 🖥 Pi Shell (native build)
- Clean, Python-like syntax
- Custom virtual machine implemented in C
- Variables, functions, and control flow
- Functional programming utilities:
mapfilterreducecompose
- Matrix and vector operations:
dotcrossmultiply
- Fixed 128×128 virtual framebuffer
- SDL2-powered rendering
- Minimal and expressive graphics API:
clear()pixel()draw()
- Palette-based color system
- Built-in 3D rendering engine
.objfile support
- Native builds (Linux, macOS, Windows)
- WebAssembly support via Emscripten
- Embeddable in web applications
- C compiler (GCC or Clang)
- SDL2
- Emscripten (optional, for WebAssembly builds)
git clone https://github.com/rolandbrake/piscript.git
cd piscriptmake release # Optimized build
make debug # Debug build
make emscripten # WebAssembly build
make run # Run release build
make clean # Clean build artifacts run test.pi// Pi-Script example
clear(12)
for y in 0..127
for x in 0..127
if ((x + y) % 10 == 0)
pixel(x, y, 6)
draw()Run this example:
- In the online playground
👉 https://piscript.netlify.app/playground - Or using the native build via Pi Shell



