Repository navigation
Pixel Engine 0.41.0
Pixel Engine 0.41.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.41.0/pixel-engine.zip.
What changed in 0.41.0
- One readiness signal:
window.__PIXEL_READY__. A promise that exists as soon as the engine
loads, resolves with the engine whenEngine.starthas finished and rejects with the reason a
start failed. Tools await it instead of polling for__PIXEL_ENGINE__. Game.ready(ctx). An optional hook the engine calls when it starts running a game (just
before__PIXEL_READY__resolves) and after eachloadGame: put a game's page handles for tools
there, so they never exist before the engine can step. An exception in it is reported like any
hook's (engine.errors, on screen) and the game runs on. A game whose class already had a
readymember that isn't this hook must rename it.engine.step()before the first start throws (engine not ready: await window.__PIXEL_READY__) instead of running 0 frames and leaving the game frozen in manual time.
During a laterloadGameit still runs 0 frames.