Six Sigils Play

· Josef Seibl

Is code really worthless?

Writing code is easy now. The hard part is thinking, on every level, and checking that the code really does the right thing.

I have written code for a long time. Today I don't write any myself anymore, but I produce more code than ever. Six Sigils, my dice-and-card game for the browser, is something I make in my spare time, and with it I really embraced coding with AI. If I say it provocatively: code is worthless now. This one is about how the game gets made. You don't have to write code to follow it.

Of course it isn't really. Code does things, and without it there is no game. But making it has become easy. In about five weeks Six Sigils got more than 4,000 commits, 570 pull requests and over 200,000 lines of code. A commit is one saved change, and a pull request is a bundle of changes that gets checked before it goes into the game. The AI wrote all of it. Along the way it added more than 450,000 lines of code and threw more than 180,000 away again. Writing code is not the hard part anymore.

The hard part

The hard part is thinking about what the code should do, and then checking that it really does it.

You can write tests, small programs that check the code, and documentation that says how things should be. That helps a lot. But then you have to think about the process around them too. By process I mean the steps a change goes through before it is in the live game. Once, all the tests of the website were green, and still the package that actually goes online had not been built for a whole week. Nothing told me, until the real build failed. The tests checked the code, and nobody checked the process.

Documentation has the same problem. I keep a file with rules for the AI: how it should work in this project. Once I made a remark about one case, and the AI turned it into a rule for everything. The remark was right. The way it got written down was wrong. So I had to think about how a rule gets written down, too.

And sometimes the AI checks the wrong thing very well. Once it tuned the dice of the characters so that every deck would win about as often as the others. The numbers came out fine. Then I looked at the cards, and the dice were mush: almost every damage side was a 2. So every character hit about the same, whatever deck you played. I had told it more than once that I didn't want that. I was not polite: "We talked about that several times. I corrected you several times, and still we land at the same shit." It had measured what was easy to measure, and nobody had looked at the dice.

Thinking on every level

I think thinking is more important than ever, especially now with AI. You have to think on every level.

There is the level of one card: does this die face read well, is this line on the card true, does this picture show what the card does. There is the level of the structure: the rules of the game live in one place, the cards are only data, and the page in the browser knows no rules at all. And there is the level of the process: how a change gets checked, when it goes live, and what gets written down so that the next time works too.

The AI works on every one of these levels, so I have to think on all of them. One day I was fixing small things in a preview, a test copy of the game that only I see, and the AI ran every little fix through the full process: eight pull requests, each with a test run of ten minutes or more. It merged each one, which means it put the fix into the main version of the game. I had to stop it: "Why would you merge? I think we're still in correction mode." The code of each fix was fine. The AI just used the wrong process for small fixes.

Choosing my level

At work, when something has to get out the door, this can be exhausting. You are forced to jump from one level to the next, whenever the work needs it. With this game I was not forced to. It is my spare time, so I could change levels when I wanted to. I found that so refreshing.

I could jump into the cards, look at every detail and throw details away again. Or I could think about the whole structure. When I had time, or was just sitting around, I could think a bit philosophically about how it all fits together. I could talk it through with the AI, with no pressure to get anything into production.

A dark page with a list of rounds to look at, and a dialog with nine dice in plastic, marble, ivory, brass, obsidian, glass and horn
How the making looks for me: every round of work with the AI lands as a page in my overview, newest on top. On the right, an evening I spent only on what the dice are made of.
Small views of the table with glass dice and cards on differently coloured play mats
Another evening: the glass dice looked plain white, because the glass could not see the mat under it. Here they are after the fix, on the mats of the game.

I think that is the real difference between using AI for work and using it for fun. Both work, at least for me. Under pressure it also works really well, but I need to think wherever the work needs me. Here, without pressure, I can choose where and on which level I think. That makes it so much easier.

Less and less to explain

Of course I gave the AI some infrastructure: how things should be done here. The rules file is now about 6,000 words long and has changed 210 times, but most of it the AI wrote itself, from things I said while correcting it. Some of it comes from me losing my patience. Once I asked a simple yes-or-no question about a technical step: do we need a release build? I asked it three times, because the answers kept wandering off into what the AI had changed. The third time I wrote: "Can you please just answer this fucking question?" Then the answer started with one word: no. After that, a new rule went into the file: answer a direct question first, with yes or no, then the reason.

To be fair to the AI, it never sulked. And I find myself adding less and less to that file. More and more, the AI gets it from the general direction alone.

That is what makes code so cheap. It is a product of my thinking and of the AI. And sometimes I am really excited, and sometimes a bit spooked, by how crazy good these coding tools and the AI behind them have become.