📡 Cozy Parrot OpCodes

Wire contract (10 Hz). Index · Architecture · Runbook

Client → Server

Op#PayloadNotes
Move1{ x, z }clamp ±ARENA; ignored in result
Grab2{}play only; nearest token ≤INTERACT_RADIUS; noop if holding
Throw3{}play only; must hold + ≤INTERACT_RADIUS of hopper

Server → Client

Op#Payload
GameUpdate1{ state: CozyParrotMatchSnapshot }

Snapshot: { players, tokens, targetPrompt, phase, timer, winnerId }

FieldShape
players[id]{ id, x, z, score, holdingToken, heldWord }
tokens[id]{ id, word, x, z }
targetPrompt{ text, blanks[], filled[] }
phaselobby | countdown | play | result
timerremaining ticks
winnerIdtop score id | null

Scoring

EventΔRule
Correct word @ hopper+1heldWord === blanks[filled.length]
Prompt complete+3all blanks filled → new prompt
Wrong word @ hopper-1floor 0
[IDEA] @ hopperfillwildcard writes expected blank (+1 / +3 as above)

Phase machine (tickRate=10)

PhaseTicks≈secTransition
lobby≥2 players → countdown
countdown303stimer≤0 → play
play60060stimer≤0 → result (tokens every 20 ticks)
result505slobby (re-countdown if ≥2)

<2 players during countdown/playlobby.

Interaction constants

ConstValue
COZY_PARROT_ARENA10
COZY_PARROT_INTERACT_RADIUS1.5
COZY_PARROT_HOPPER{ x: 0, z: 0 }
COZY_PARROT_IDEA_TOKEN[IDEA]

Source anchors

RolePath
Shared SSOTshared/src/CozyParrot/index.ts
Match handlermatchHandlers/cozyParrot/index.ts
Client managerCozyParrotMatchManager.ts

Ask Docs

AI assistant to help answer questions about the documentation. Answers are read-only and cite docs/source.

Hi! How can I help you with the documentation today? Answers are read-only and cite docs/source.

Ctrl+Enter to send