Skip to content

Controlled runtime

Creator code does not execute as arbitrary JavaScript. Visual logic and RiftScript compile into a typed intermediate representation executed by the PixelRifts VM.

The VM can only use documented runtime capabilities. It cannot access the DOM, network, filesystem, secrets, dynamic code evaluation, or unbounded memory.

Every fixed simulation tick shares creator budgets for:

  • Instructions
  • Capability commands

Each handler invocation also has fixed ceilings for operand-stack values and live variable/command memory. Running the same behavior on many overlapping objects does not reset the tick's instruction or command allowance.

Before execution, the bytecode verifier checks jump targets, stack flow, capability argument counts, explicit returns, and handler size. Cycles remain bounded by the instruction meter. Malformed programs fail closed during compilation, publishing, or runtime-world loading.

Runtime errors retain only the program, event, operation, bytecode instruction, and budget usage. Workshop can map that instruction to an editor-only RiftScript line; published projects and network messages never contain creator source.

The browser uses the runtime for responsive play. Authoritative rooms run the same rules on the server for trusted scores and rewards.

PixelRifts creator documentation · generated reference · protocol 21