ScribblaZ Game Design

ScribblaZ turns one player’s secret drawing into a timed, server-scored race for everyone else to identify the word.

Design elementCurrent rule
Default rounds4
Word choice3 drawer-only options for 10 seconds
Default drawing time80 seconds; host setting allows 30–180 seconds
Hint cadenceOne character at 25% and one at 50% of drawing time
Round reveal3 seconds
Player range2–12 active players; 20-spectator cap outside lobby

Docs: Hub · Architecture · Opcodes · Runbook · Verification · Nakama Multiplayer · Games Catalog

Draw and guess loop

The host starts only from waiting, only when the connected player count meets the two-player minimum, and only when all connected players are ready (server/match_handler.ts:451-457). The server rotates to a connected drawer, creates three opaque option IDs, and sends their plaintext labels to that drawer only (:621-665).

The drawer chooses an option by hash ID (with an index fallback); the server resolves it and begins drawing (match_handler.ts:997-1016). The drawer can emit stroke, fill, shape, clear, undo, and redo events only while they are the active drawer in drawing (:459-509). Non-drawers can submit guesses; spectators, the drawer, and players who already guessed instead contribute ordinary chat (:511-547).

Scoring and clues

For a correct guess, the server computes floor(1000 × remainingMs / drawTimeMs), clamps it to 100–1000, then subtracts 100 for each revealed hint (match_handler.ts:552-559). The guesser gets that result; the active drawer receives 10% of it (:560-586). Near misses use Levenshtein edit distance at most 30% of word length, with a minimum threshold of one (:590-618).

Hints preserve spaces, hyphens, and slashes and reveal a shuffled non-separator position. At elapsed 25% and 50%, the server increments the reveal count and sends a role-appropriate HINT_UPDATE (match_handler.ts:279-295, :1118-1135). A drawing ends on timer expiry or when every connected non-drawer has guessed (:1143-1149).

Solo free draw and trainer

Without a match, enterSoloPracticeMode() clears match identity, enters drawing, gives the player a free draw word/hint, and sets a no-countdown sentinel (ScribblaZController.svelte.ts:319-335). The root can restore a user’s saved free-draw PNG via loadFreeDraw after entering that fallback (ScribblaZGame.svelte:314-325, :458-475).

The controller also has a secret Drawing Trainer state: startTrainerRound() selects a random motif and labels the session Drawing Trainer; stopTrainer() returns it to Free Draw (ScribblaZController.svelte.ts:372-386). The checklist describes Konami-code activation, progression, scoring, completion feedback, and dynamic motifs as open work, so those mechanics are not documented as shipped behavior (CHECKLIST.md:55-60).

Spectators and low-player recovery

A player joining while a game is under way is placed in the spectator collection, subject to the 20-person spectator limit (server/match_handler.ts:839-850, :885-893). Spectators may chat but do not submit scoring guesses. If a leave drops an active timed phase below two connected players, the current handler broadcasts Not enough players — returning to lobby. and resets the match to waiting (:913-945). This current-cycle path is source-visible; its real two-client behavior remains pending verification.

Public art

The server’s drawing-save RPC supports private or public structured artwork (word, drawerName, lines, isPublic) and the gallery RPC lists public records (server/rpc.ts:3-69). The current-cycle explicit publish/gallery UI is an intended presentation contract until its complete root/component path and manual interaction are verified; it must not be treated as production-proven merely because the storage RPC exists.

Design boundaries

The current checklist marks dock/palette polish complete: a 15-swatch continuous strip plus native color input, dock utility alignment, and tool shortcuts (CHECKLIST.md:62-67). It also records gallery browsing/public toggle and several trainer mechanics as open (:50-60). That distinction prevents documentation from promoting unfinished UI into a shipped feature.

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