Nyaice! Code is a board game in which you roll five program dice, combine the faces into a “program”, and guide your cat to the Golden Fish. Loop, jump, debug, meta, shift — every die is named after an idea from programming.
But the real mechanism we built into this game isn’t inside the dice. It’s the fact that players can rewrite the rules themselves.
Handing over the rules instead of handing down the rules
The rulebook says, in effect:
Nyaice! Code sets out to be a board game where you can feel what’s fun about programming. Adding a rule can make it more thrilling — or it can create all sorts of faults until the game stops working at all. So how do you make it more interesting and keep it sound? Have a go at writing rules and find out.
That’s not just an invitation to play however you like. Making a house rule is designed to be an essential programming experience.
Writing a house rule is a lot like writing code
You think of one new rule and add it to the game. It’s strikingly similar to adding a single line to a program.
| What happens in the game | What happens in programming |
|---|---|
| You write a house rule | You write code |
| Two rules contradict each other | A bug appears |
| The balance falls apart | It gets slow, or awkward to use |
| You tidy the rules back up | Refactoring and debugging |
A bug isn’t a failure. It’s a clue about the design
Say you add a rule: if a die comes up blank, re-roll it. Sounds fine. Then you actually play, and you find a situation where the turn simply never ends.
That is a bug, in the full sense of the word. And finding it means you’ve seen exactly where the system of rules is under strain. It isn’t a failure; it’s the thing that tells you what to do next.
Repairing it is how you learn design
Found a contradiction? Add a condition. Balance drifting? Nudge a number. Tidying the rules bit by bit has the same shape of thought as the refactoring and debugging programmers do every day.
Make a rule, watch it break, repair it — do that loop a few times with your own hands and you end up with a view of an entire system at once. That’s a step above the instruction-by-instruction level of computational thinking: it’s design.
On leaving room
We don’t want to make games that are simply handed over, finished. We want to leave room for players to step in and stand where the designer stands.
Space for house rules is one such room. Someone who was playing becomes someone who is designing. They wrestle with a bug, work out how to fix it, and give their own rule a name. Inside that experience, quietly and without ever calling itself teaching material, is what programming education was really trying to deliver.
Real fun. Real thinking. House rules are a small piece of design, but they might be the place where that idea shows itself most plainly.