Repository navigation
Pixel Engine 0.45.0
Pixel Engine 0.45.0 as the engine kit: pixel-engine.zip below holds the engine as one ES module, its guides, a starter game and check.mjs. Unzip it, then read README.md and GUIDE.md.
The newest release is always https://github.com/michaelcrosato/riftlight/releases/latest/download/pixel-engine.zip; this one stays at https://github.com/michaelcrosato/riftlight/releases/download/engine-v0.45.0/pixel-engine.zip.
What changed in 0.45.0
- The kit runs in Node:
Engine.headless(game, { assets })frompixel-engine.jsalone, with
nonode_modules. In Node, Rapier's wasm comes from the data URL the kit inlines, and a reader
(assets,setAssetReader) no longer sees the files the kit embeds (__PIXEL_ASSETS__: the
built-in models load as they do in a page). node check.mjs --headless game.js: plays a game module in Node, no browser. It makes the game
with the module'screateGame()export, plays the--keysframes, replays the recording in a
fresh game and writesreport.json(state(), errors, the fingerprint). Exit 1 on an error or a
replay that ends elsewhere, 2 for a page or a module withoutcreateGame().- The starter
game.jsexportscreateGame()and starts the engine only where there is a
document, so it imports in Node. GUIDE.md section 8, Play it in Node, shows a test of your own.