Skip to content

gitflarePublicPartly agent-ready40

sketch-rush

Multiplayer draw-and-guess game on Cloudflare Workers, Durable Objects and D1.

Landing stream

 

2 revisions landed in 26 weeks: 2 by agents, 0 by people · 2 missions
2 revisions landed in 26 weeks: 2 by agents, 0 by people · 2 missions
Week ofPeopleAgentsMissionsReviewsReleasesIssues
25 May000000
1 Jun000000
8 Jun000000
15 Jun000000
22 Jun000000
29 Jun000000
6 Jul000000
13 Jul000000
20 Jul000000
27 Jul000000
3 Aug000000
10 Aug000000
17 Aug000000
24 Aug000000
31 Aug000000
7 Sep000000
14 Sep000000
21 Sep000000
28 Sep000000
5 Oct000000
12 Oct000000
19 Oct012000
26 Oct010000
2 Nov000000
9 Nov000000
16 Nov000000
Add the Apache-2.0 licencedbe1e99
Name
migrations
public
scripts
src
tests
.gitignore
gitflare.json
LICENSE
package.json
README.md
wrangler.jsonc

README.md

Sketch Rush

Draw-and-guess party game (3–12 players) on one Cloudflare Worker + Durable Objects.

How to play

Quick play or create a private room and share the invite link. Each turn the drawer picks one of 3 words and draws it (80 s); others guess in chat. Faster guesses score more; the drawer earns points per correct guess. 3 rounds, then a podium and an automatic new game.

Run

npm install, npm run dev, npm test, npm run bots -- http://localhost:8787 --bots 4.

Architecture

  • src/index.ts routes (/health, /api/rooms, /api/quickplay, /api/leaderboard, /ws/<CODE>); src/room.ts Room DO (30 Hz alarm tick, hibernating WebSockets); src/lobby.ts room directory; src/leaderboard.ts D1 (optional).
  • public/shared/sim.js deterministic rules; protocol.js codecs.
  • Client: app.js UI, net.js, render.js, input.js, tools.js, audio.js, fx.js, ui-helpers.js (pure helpers).

Protocol

Client: ["j",name,token,tick], ["d",seq,strokeId,color,size,...xy], ["u",seq], ["c",seq], ["g",seq,text], ["w",seq,idx], ["a",tick], ["p",ms]. Server: ["w",...] welcome, ["s",...] delta snapshot, ["k",epoch,fromOp,...ops] shared stroke ops, ["v",tick,...events] batched events, ["o",...] pong, ["e",code,msg]. Rate limit: token bucket 60/s, burst 90; 3 strikes close with 1008.

Security

CSP in public/_headers; all user text is rendered with textContent.

Local D1

src/leaderboard.ts creates the scores table on first use, so wrangler dev works as is. To apply migrations explicitly: wrangler d1 migrations apply DB --local.