Tombstone
cardboardio
Jul 2020 – Nov 2020 · age 38
What it was
The start of a client library for playing board games online: "cardboard" as in the games, "io" as in the domain. It began as a ReasonML attempt abandoned the same day, became a JavaScript prototype, and then a small TypeScript library. Shapes know their bounds and test whether a point is inside, polygons by a winding-number count. A helper solves for a regular hexagon inscribed in a rectangle. Items place shapes with hover, press and click state, a scene holds them, and an engine owns two stacked canvases: the low one for the scene, the high one for the selection band, so dragging never repaints the board. Three modes, Static, Interactive and Edit, decide what a mouse-down means. The demo connected to an early Adama server running a hex exploration game and drew a 7-by-6 hex board. The next step was making a piece move, and there the log stops.
Wins, for the age
- At thirty-eight, Jeff drew the right line for multiplayer board games: the rules live in a server script, and the client only draws and clicks, the division Board Game Arena (2010) had already proven. A primate with a hex grid put the rules where they belonged.
- Split the scene and the gesture across two canvases, finding on its own the layering KineticJS and Konva (2011) made common.
- Inscribed hexagons by formula and hit tests by winding number, the classic geometry done cleanly in a 611-line library.
- Abandoned the day's first framework choice the same afternoon it failed. Admitting a wrong turn quickly is rarer in this species than it should be.
What it taught
- Strict TypeScript and webpack UMD output.
- Most of an editor is deciding what a mouse-down means.
- Once the rules live on a server, the client is the small part of an online board game.
- A hard-coded login in a demo is fine on a laptop and a habit to unlearn before anything ships.
Genealogy
Ancestors: none on record. A fresh start on the client half of a game table. Descendants: BSG Prototype: rules on the server, a board drawn on canvas. Hearth: the server owns the logic, the client stays thin.
Epitaph
Here lies cardboardio, which drew a perfect hexagon grid and wired it to a server that knew the rules, then went quiet before the first piece moved.