Gobbleton is a rainy city of dark towers and neon diners, and it has a problem. Robots have taken Penny Plume, who runs the diner on Main Street. The only one going after her is TurkeyMan: a turkey in dark armor with a cape edged in orange flame-shaped feathers.
You can play it now at turkeyman.turkeycode.ai, in a browser with a keyboard. Eight districts, nine bosses and a rooftop chase are in so far.
I'm writing a game with turkeycode. What better hero than TurkeyMan?
I write the specs; turkeycode writes the code. This series is about how that goes: what works, what breaks, and what it costs.
The rules
I set a few rules at the start, and they have held for every run:
- Everything is made in code. Every model, texture and sound effect is generated by JavaScript in the browser: no imported art, fonts or audio, and no runtime dependencies beyond three.js. The one exception is the chapter videos (more on those in a later post).
- Original designs only. The villain names are mine, and they are puns. But every villain's look, weapon and attacks come from the food in its name, not from any existing comic, film or game character. Killer Crock is a walking slow cooker with oven-mitt hands and a power cord for a tail. Mr. Deep Freeze is a chest freezer on copper-coil legs. Poison Gravy is a gravy boat with a body of gravy pouring out of it.
- Controls that work keep working. Each run can add moves, but it can't break the ones you already know.
- Nobody claims what a machine can't check. Feel, frame rate on a real graphics card and sound balance can't be judged by a test. I play the game myself for those.
How a run works
turkeycode takes a spec, a plain Markdown file describing what to build, and turns it into a plan of parts. For each part it builds the code, runs QA against the live page, fixes what QA finds, reviews the change and merges it. Then it moves to the next part.
QA here means headless Chrome with software rendering, driving the game with real key presses, taking screenshots and reading test hooks the game exposes. A boss tool might fight The Pilgrim twice: once properly, using the mechanic (kick his umbrella shut, get behind him), and once just standing still and mashing punch and kick. The first has to win without being knocked out. The second has to be knocked out.
After every run, the tests and every tool are run again, and every new character is rendered from the front, side and back and looked at. Then I play it.
Where it stands
- Run 1: TurkeyMan's moves, the first robots, the first boss (Brine), sound.
- Run 2: the city map, upgrades, Main Street (Barley Quinn and The Yolker), the feed mill (Killer Crock), cold storage (Mr. Deep Freeze).
- Run 3: the harbour (The Pilgrim), the gravy works (Gravyface, then Poison Gravy), the banquet hall (The Mad Platter), a rooftop chase (Cranwoman), Penny's trail of clues.
Runs 2 and 3 together:
- Time: 11 h 19 m of session time for run 2, and 21 h 44 m for run 3. Run 3 had seven parts, and its last part was cut off twice before it finished.
- Cost: $58.04 for run 2 and $56.20 for run 3, as reported by the CLI. Not every session reported a cost (54 of 60 in run 2, 60 of 69 in run 3), so the real figures are a little higher. Run 1's cost isn't in its log.
- Tests: 269 automated tests, plus a tool for every district and boss.
What I still do
turkeycode can't tell whether a game is fun. After run 1, I played it, and Brine, the first boss, was too easy. The bosses in run 2 had the same problem: a script that just stood still and mashed punch and kick could beat them. So they were retuned, and every boss since has to pass those two checks: play it properly and win, mash and lose.
That is the pattern so far. The machine builds, tests and checks its own screenshots. A human plays it, and decides what it should feel like.
Next
Next up is touch controls, so it works on a phone (that run is building now). Then the endgame: four more villains and Penny's rescue. After that, co-op for up to four players, with three new sidekicks.
Next post: the spec is the product. What goes into one, and what happens when it is vague.
Chad