Skip to content

Pixel Engine 0.41.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 00:45
2e4c599

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 when Engine.start has 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 each loadGame: 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
    ready member 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 later loadGame it still runs 0 frames.