Norx
Norx brings the battle-tested ORX 2.5D game engine to Nim — with machine-generated bindings glued to a hand-written, idiomatic API. Write Python-ish code, ship native binaries for desktop and Android.
A serious engine. A joyful language. Zero compromises.
Norx wraps all of ORX — rendering, physics, audio, animation, FX — and layers the parts Nim does best right on top.
Data-driven by design
Spawn a sprite, a rigid body, a sound scene or an entire HUD from one line and an INI section. Tweak values, watch the game update — no recompile.
Complete, current bindings
Every ORX 1.17 function, generated with Futhark and guarded by source annotations, so the wrapper can never silently drift from upstream headers.
Idiomatic Nim layer
Value-based vector math with +, * and friends, object property overloads, plain Nim strings and booleans — ORX idioms, Nim feel.
Type-safe interop
orxBOOL is a distinct ABI-sized type that converts to bool transparently, and every return value can be checked with .isSuccess / .isFailure.
Cross-platform
Windows, Linux, macOS and Android, driven by ORX's plugin architecture. Your Nim code stays identical; only the build flags change.
Open & hackable
zlib-licensed, no strings attached. Norx grew out of the Tankfeud game project and is developed in the open on GitHub.
Learn from complete games, not snippets
The repository ships with two 600-line playable demo games and ports of every official ORX C tutorial — all runnable, all tested.
Pong
Two-player Pong with fixed-step, time-of-impact physics, sounds, pause/restart and a startup self-test that validates the whole engine wiring.
Boulder Dash
A proper grid game: dig, collect diamonds, dodge falling boulders and reach the exit before time runs out. Features CC0 Kenney art and random caves.
Tutorial ports & more
Thirteen faithful Nim ports of the official ORX tutorials — objects, clocks, input, physics, FX, scrolling, sound and spawners — plus smaller exploratory samples.
Norx 0.8.1
The API-polish release: everything that once felt like "C with Nim syntax" now feels like Nim.
- Value-oriented vector math:
newVector(x, y)plus real operators — no more pointer juggling for everyday work - Object properties as values:
getPosition(),setScale(...),getSpeed()and friends take and returnorxVECTOR - Plain Nim strings for input names, config sections, text, FX and sounds
- Distinct, ABI-safe
orxBOOLwith automatic boolean conversion - Explicit status predicates:
.isSuccessand.isFailure - Two complete game samples: Pong and Boulder Dash
orxBOOL is no longer an integer alias.
Code that treated it as a number needs an explicit conversion — boolean use is unchanged.
From zero to bouncing objects in minutes
All you need is Nim 2.2.4 or newer — ORX 1.17 comes along as a pinned Git submodule.
Clone & prepare ORX
Fetch the wrapper and initialize the pinned ORX 1.17 submodule:
git clone https://github.com/tankfeud/norx.git cd norx git submodule update --init # build ORX locally per README — # no system install needed
Install
Grab Norx from the Nimble registry:
nimble install norx
# requires Nim ≥ 2.2.4
Run the samples
Start tiny, then play the full games — samples run from their own directory:
cd samples/ball nim c ball.nim ./ball # hold → to move cd ../pong nimble build && ./pong