Rummy, without the rule check
A digital rummy, the tile kind, made for a game design course in July 2022. The folder calls it "USC program". The plan was a game to play inside iMessage, and the design document was titled "Rummikub on iMessage". What got built is the step before that: a browser version, written in plain JavaScript between 2 and 12 July, twenty commits. Eleven of them landed on 5 July.
Make your own rules
The design document starts as a plan for a faithful copy and talks itself out of it line by line:
Actually, just make my own rules since “rummikub” is a registered trademark but essentially also just copied from Mexican rummy.
So: no minimum value for the first move, 1 may follow 13, four jokers instead of two. A few lines further down:
Actually let’s NOT look up the rule because that’ll make it more likely I come up with slightly different rules
And then the rule check itself goes, the feature the document had spent a paragraph on (inconsistent groups framed red when you end your turn):
Actually the consistency check can be skipped, since the real-world rummy doesn’t check the rules either and lets you and your co-player figure it out yourselves. Just provide the play surface and tokens. Also allows for that nice chaotic look of the play area.
Moving a tile follows the same thinking. The document wanted tap twice rather than drag, "because everyone would rather tap twice than drag their smudgy finger over the whole screen". In the game you tap a tile to pick it up and tap an empty cell to put it down.
The first version
The play area is a grid of 180 cells, each player's board 36 more. The deck is 104 tiles, every face twice, shuffled by swapping two random tiles a thousand times. Until there was art, the tiles were playing cards: four suits, 2 to ace.
The two players play from two browsers. A URL parameter says which board is yours, and "End Turn" sends the whole table, every tile in every area, to a small JSON store online. The other player's page reads it back when it loads.
Every time a tile lands, one of 21 short clips plays, picked at random. They are one recording of tiles being put down, cut into pieces. The design document had planned it: "A sound effect of the tile hitting the board or desk would be nice and I can easily record it myself."
A backlog with times
The project kept a backlog: each feature as a story with a priority and a time estimate. Two of the done ones got a note in the next column.
went much quicker than I thought, maybe because I was going through it mentally for weeks
That is the grid you move tiles around on, estimated at four hours. The tile sound, an hour and a half, got the opposite note: "I don't know why this took so long."
An asset list went with it, from the logo and app store screenshots (all greyed out under "iOS FROZEN") down to the draw button and "tokens hitting the desk - being mixed".
The refactoring assignment
On 5 July the course turned to refactoring. The commit "some TODO ideas from reading USC material" put a list of questions at the top of the code, and the rest of that day's commits are renames, rearranged blocks and merged loops. The last line of the list is not a TODO:
since when do I know how to write without looking at the keyboard? When did I learn this?
Another comment in the same file sits under the line that sets up the boards: "TODO I don't like something about this. Idk what".
The tiles came last. A tile model in Blender and Maya, rendered once per number and colour, replaced the card faces on 11 July. The final commit, on 12 July, is "small design adjustments".
- built
- 2 to 12 July 2022, 20 commits, 11 of them on 5 July
- code
- plain JavaScript and Bootstrap, about 500 lines: four scripts and one page
- table
- 180-cell play area, a 36-cell board per player, two players
- deck
- 104 tiles, every face twice
- sound
- one recording cut into 21 clips, one picked at random per move
- art
- card faces first, then tiles rendered from a Blender model
Still rough
It is a table, not yet a game. Nothing checks a group, by decision, but nothing checks a turn either: either player can end a turn at any time, and a board is chosen by editing the URL. The jokers are still a TODO, and so are dragging, grouping tiles that move as one, and the "you win" screen. The last entry under "USER FEEDBACK" in the code asks for the rule enforcement the design had dropped.
The iMessage version, the point of the whole plan, was never started.