Nim × ORX 1.17 — perfect match

Norx

FastData-drivenElegant

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.

Norx 0.8.1 ORX 1.17 — pinned submodule Nim ≥ 2.2.4 License zlib
import norx var ball: ptr orxOBJECT proc update(info: ptr orxCLOCK_INFO, ctx: pointer) {.cdecl.} = let dt = info.fDT.float32 if isActive("MoveRight"): # nim bools, nim strings let speed = newVector(340.0, 0.0) discard ball.setPosition( ball.getPosition() + speed * dt) # value vectors proc init(): orxSTATUS {.cdecl.} = discard viewportCreateFromConfig("MainViewport") ball = objectCreateFromConfig("Ball") clockRegister(clockGet(CLOCK_KZ_CORE), update, nil, MODULE_ID_MAIN, CLOCK_PRIORITY_NORMAL) proc run(): orxSTATUS {.cdecl.} = STATUS_SUCCESS proc exit() {.cdecl.} = discard execute(init, run, exit)
Why Norx

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.

Showcase

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.

Latest — Aug 2026

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 return orxVECTOR
  • Plain Nim strings for input names, config sections, text, FX and sounds
  • Distinct, ABI-safe orxBOOL with automatic boolean conversion
  • Explicit status predicates: .isSuccess and .isFailure
  • Two complete game samples: Pong and Boulder Dash
Heads up: orxBOOL is no longer an integer alias. Code that treated it as a number needs an explicit conversion — boolean use is unchanged.
Get started

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.

01 /

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
02 /

Install

Grab Norx from the Nimble registry:

nimble install norx

# requires Nim ≥ 2.2.4
03 /

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