
Who r3 is for#
Hobbyist game developers building 2D games in Forth
r3 ships with sprite systems, tilemaps, font rendering, and SDL2-based windowing and input handling. The author has published games built in r3 on itch.io, demonstrating that the environment is capable of shipping real, playable games.
Skip if:
If you need a large asset pipeline, visual scene editor, collaboration features, or a mainstream programming language for working with a team, r3 is not the right tool. It is built around deep Forth knowledge and suits one-person or small-team projects.
Systems programmers studying concatenative languages
r3 implements the core Forth philosophy: stack-based evaluation, direct hardware access via dynamic libraries, a self-hosting compiler, and minimal runtime overhead. It is a complete, working example of a concatenative language for programmers who want to understand that paradigm hands-on.
Skip if:
If your goal is production systems software for a team with review requirements, r3's small community and limited documentation make it a poor fit compared to more established concatenative language environments.
Demo scene and retro creative programmers
r3's design philosophy, toolset (integrated editor, games, demos), and community topics (videogames-programmers, colorforth) align with the demo scene and retro creative coding aesthetic: small binaries, direct graphics access, and tools built from first principles.
Skip if:
If you need compatibility with modern graphics APIs such as Vulkan or Metal, or integration with popular game engines, r3's SDL2-based layer does not cover those targets.
The problem it solves#
Most programming environments ship with multi-megabyte runtimes, package managers, and toolchain layers that add complexity without adding capability for simple, direct programs. For developers who want to build games, interactive demos, or creative tools close to the hardware, those layers are friction, not features.
Game development environments aimed at hobbyists often bundle proprietary scripting languages tied to a specific platform, making the underlying system opaque and non-portable. The Forth stack-based model takes a different approach: evaluation is direct, the runtime is compact, and the programmer controls exactly what happens at each step. The challenge is that most Forth environments are either too bare-bones for practical game work or tied to specific hardware platforms from past decades. r3forth fills this gap with a Forth-inspired environment that includes practical graphics primitives, game tools, and an integrated editor inside a runtime that fits in ~40KB.
How it solves it#
Ultra-minimalist VM (~40KB core)
The r3evm virtual machine is written in C and compiles to approximately 40KB. It starts in milliseconds, runs on Windows and Linux, and requires no installer. The core is portable enough to be recompiled from source when binary compatibility is a concern.
SDL2 graphics and game library
r3 ships with a library layer built on SDL2 that provides sprites, tilemaps, fonts, animations, and stack-based sprite management. SDL2 handles cross-platform windowing, input, and audio; r3's layer on top provides the game-specific primitives needed for 2D game and demo creation.
Dynamic library interop (.DLL and .SO)
r3 can load and call procedures from any dynamic library: DLL on Windows, SO on Linux. Any C or system library is accessible directly from r3forth code without writing a separate binding layer in another language.
Integrated editor and IDE environment
Running the r3 binary without arguments launches the built-in environment, which includes a code editor, a dictionary browser, and live-coding tools. The internal system scans the /r3 folder on startup to build a menu of available tools and system libraries.
Self-hosting compiler written in r3forth
The r3forth compiler is written entirely in r3forth, making the system self-hosting on Windows. This means the language can compile its own runtime, which is the practical benchmark of a sufficiently capable Forth implementation.
3D engine and immediate-mode GUI
Beyond 2D, r3 includes a 3D engine, collision hashing, and a TUI/immediate-mode GUI (immgui). These libraries sit on top of the minimal VM core, making r3 a more capable creative environment than its 40KB footprint suggests.
Strengths and trade-offs#
Strengths
- MIT license with no usage restrictionsr3 is MIT licensed, which means you can use it commercially, fork it, modify it, and ship programs built with it without paying licensing fees or reporting back to the project. The entire source is in the repository.
- Near-zero startup and compile timeThe VM starts and compiles scripts in milliseconds. This tight feedback loop is a practical advantage for iterative game development and creative coding, where waiting for compilation interrupts the development flow.
- No toolchain beyond SDL2On Windows, r3.exe runs directly from a downloaded zip with no installation step required. On Linux, the only external dependency is SDL2, available in all major distribution package managers. No build system, package manager, or additional runtime is needed.
Trade-offs
- -Self-hosting compiler is Windows-onlyThe self-hosting compiler, the r3forth compiler written in r3forth, currently targets Windows only. Linux users can run r3 programs but cannot use the native compiler path to produce standalone executables from r3forth source.
- -Forth's stack-based model has a steep learning curver3 uses a concatenative, stack-based evaluation model that is unfamiliar to programmers coming from C, Python, or JavaScript. There is no conventional function-call syntax and no named local variables in the usual sense. The mental model is fundamentally different from most mainstream languages, and the learning investment is significant.
- -Small community and limited third-party resourcesWith 217 GitHub stars and 11 forks, r3 is a small project. The ecosystem of tutorials, IDE integrations, and third-party packages is limited to what ships in the repository and the author's YouTube channel and itch.io page. Community debugging support and third-party documentation are minimal.
r3 vs alternatives#
r3 vs Paid Game Development Tools
r3forth fits between a bare-bones Forth interpreter and a full game engine. Its ~40KB VM, SDL2 graphics layer, sprite and tilemap systems, 3D engine, and integrated editor give it more practical game-building capability than a minimal Forth, while staying far smaller and more direct than commercial game engines.
The MIT license is the clearest practical advantage: commercial game development tools and proprietary Forth environments charge licensing fees or restrict distribution of programs built with them. r3 has no such restriction. You can build a game with r3, sell it, modify the runtime, and share the source without paying or asking permission from anyone.
Where r3 falls short compared to paid alternatives: the community is small (217 stars, 11 forks on GitHub as of the last push in August 2026), third-party documentation is limited, and no professional support is available. The self-hosting compiler currently targets Windows only. For teams that need professional debugging tools, language-server integration, or a language familiar to contributors who do not know Forth, the tradeoff is real.
r3 is the better choice when a small, self-contained, MIT-licensed game development environment is the goal and you are willing to invest time in learning the Forth model. Paid tools and larger open source game engines are worth considering when documentation quality, team familiarity, and professional support outweigh the cost of licensing or ecosystem size.
Install and self-host#
Installing r3 on Linux requires SDL2 development libraries and building the VM from source.
```bash
sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev
git clone https://github.com/phreda4/r3evm
cd r3evm && make
mv r3lin ../ && cd ..
./r3lin
```What it's built on#
- Languages
- Forth
FAQ#
Does r3 run on macOS?
No. The README and build instructions cover Windows and Linux only. macOS is not listed as a supported platform. If macOS support matters, you would need to build the VM from source and resolve any platform-specific dependencies yourself, as no official macOS binary is provided.
What license does r3 use?
MIT. The MIT license allows commercial use, modification, and redistribution without restriction. You can build and sell games made with r3 without owing any licensing fees to the project, and you can fork and modify the source freely.
How do I run a script in r3?
Pass the filename as a command-line argument: ./r3lin hello.r3 on Linux or r3 hello.r3 on Windows. Running the binary without arguments launches the integrated environment, which loads main.r3 and displays the built-in tool menu.
Can I call C libraries from r3?
Yes. r3 can load and call procedures from any dynamic library: DLL files on Windows and SO files on Linux. The README states this explicitly. Any C library, including system graphics, audio, or math libraries, is accessible directly from r3forth code without a separate binding layer.
What types of programs can I build with r3?
r3 ships with SDL2 graphics, 2D sprite and tilemap support, a 3D engine, font rendering, and an immediate-mode GUI. The author has published games on itch.io using r3. Primary use cases are 2D games, interactive demos, and creative tools. It is not designed for web, mobile, or server-side software.
Similar open-source tools#
t3code
Control your coding agents from one interface
transformers
Model-definition framework for state-of-the-art ML
deer-flow
Build super agents with DeerFlow's powerful framework
page-agent
AI-powered GUI Agent for your website
iroh
Connect devices seamlessly without relying on the cloud.
orca
The ultimate IDE for coding agents

