Opponent
Moves
Captured
How it works
One player creates a room and reads out the 5-character code. Moves sync through a Firebase Realtime Database, and the room also carries the skin, so both players see the same Scratch art.
Connection
Rooms live under /scratchchess. The database rules need read and write access on that path.
Load a Scratch project
Or load a project file
Reads the costumes straight out of the file, so it works before a project is shared and needs no connection. In Scratch: File → Save to your computer.
Sprites found
Fit
Loader
Scratch refuses requests coming straight from a browser, so project IDs are read through a small Cloudflare Worker. Skins loaded from a file work without it, but only ID-loaded skins can sync to an opponent.
Any shared Scratch project can be a chess set. scratchchess reads the project, finds sprites with these names, and uses each sprite's current costume as the artwork. Nothing else in the project matters — blocks, sounds, and extra sprites are ignored.
Required sprite names
Optional
Leave any of these out and the built-in amber marker is used instead. Draw them mostly transparent — a ring or corner marks rather than a filled square — since they sit on top of the board and under the pieces. If you supply Move but not Capture, the Move art covers both.
Matching rules
Names are matched loosely: case, spacing, and word order are all flexible, so white pawn, Pawn_White, and WhitePawn all land in the same slot. The costume selected in the editor is the one that gets used, so you can keep alternates on other costumes.
Art tips
Draw pieces roughly square and centered — each one is fitted into its square. The Board sprite is stretched across all 64 squares, so a plain 8×8 grid works best; if yours has a decorative frame, raise Board inset in the Skin tab until the pieces line up.
Starter project
This downloads a real .sb3 with all 13 sprites already named and drawn. Open it in Scratch, replace the costumes, share it, then paste the project ID into the Skin tab.