VERTEXDocsGitHub

Troubleshooting

SymptomCauseFix
hit / contact rules never run"rules" is before collide/physics in systemsmove "rules" after them
on: "scene" / "join" rule doesn't fire on that stepthese events arrive at the start of the next stepexpected; act in the handler
Replay says MISMATCHnondeterminism: Math.random(), clock, state kept in a JS closure, or a different seed/fpsuse game.random(); keep state in world; record seed and fps
Rewind (R) jumps to wrong statea JS system keeps private state between stepsstore it in entity.data or world.state
Value becomes NaNfield was never set: undefined + 1initialize it in the entity, e.g. "ry": 0, "data": {"gold": 0}
rules[3]: expected ";"syntax error in rule 3the message names the rule; check quotes ('...' inside JSON strings)
rules: unknown variable "x"assigning a name not declared with letlet x = … first, or assign to a field
unknown shape "rock"entity references a missing shapeadd it to shapes (or "shape": null for text/emitters)
Player can't jumpbody.ground is set by physicsadd "physics" to systems and a body to player and floors
Player falls through thin platforms at speedper-step overlap resolution (no CCD)thicker platforms, lower speed, or more physics.iterations
Things far away stop movingstreaming sleeps chunks without a focus entity nearbyexpected; tag things with a keep tag to keep them awake
Same procedural chunk differs between visitsgeneration used random()use hash(cx, cy, n) / noise() in chunkEnter
Everyone in multiplayer moves togetherrule reads input outside a player contextuse each: "player" (or a in hit/contact) so input is per player
Online score is shared by all playersstored in statestore per player in self.data
3D faces flicker or overlap wronglypainter's sort per face; very large facessubdivide big faces (plane(w, d, nx, nz))
Nothing renders in 3Dcamera behind objects or near/far wrongcheck space.camera z and pitch; y is down, z forward
No soundbrowsers need a user gesture firstpress a key or tap once
npx vertex not foundthe bin is vertex inside projectsuse npx vertex-engine … outside a project

Still stuck? Run headless and read the frame: npx vertex run game.json --steps 120 --svg f.svg --json.

Edit this page