The Constraint Grammar: How Stephen’s Sausage Roll, Baba Is You, and Obra Dinn Turn Rules Into Narrative Without Saying a Word

You’re standing on a cliff in Stephen’s Sausage Roll. You’ve just rolled a sausage into the ocean. The sausage is gone. The level is unwinnable now, and you know it before the game tells you anything. You press undo. The sausage reappears at your feet. What you feel—what you do not expect to feel—is gratitude. The game showed you, without a single word, that the cliff edge is a rule.

That’s the whole design philosophy of Stephen’s Sausage Roll in one button press. The game never tells you sausages can’t touch water. Never tells you rolling is irreversible. Never tells you the grill tiles are where a sausage has to end up. You learn all of it by doing—by failing, by watching the constraint system push back against your assumptions. And every time it pushes, the grammar gets a little clearer.

The best puzzle games don’t have stories bolted onto their mechanics. They generate narrative through their constraint systems—the rules governing what’s possible, what’s forbidden, and what the player has to discover to exist somewhere between those two poles. Stephen’s Sausage Roll, Baba Is You, and Return of the Obra Dinn each build a constraint grammar tight enough that solving puzzles becomes indistinguishable from understanding a story. And the tool that separates a constraint system that teaches from one that just frustrates? I call it constraint documentation—a beat sheet for puzzle designers that works the way proof sheets work for writers.

What a Constraint Grammar Actually Is

When I say grammar, I’m not being loose. I mean a finite set of rules that combine to produce meaning. In language, grammar determines which sentences are valid and which are nonsense. In a puzzle game, the constraint grammar determines which actions are valid, which are fatal, and which are merely unproductive. The player’s job is to learn this grammar by interacting with it. The designer’s job is to make sure it’s learnable—that every failure teaches a specific rule, and every rule, once learned, opens new possibilities.

Stephen’s Sausage Roll has perhaps the purest constraint grammar I’ve encountered in any puzzle game. The rules: you can walk, you can push, you can roll a sausage if you’re aligned with it, and a sausage is cooked when it touches a grill on exactly two sides. That’s it. Four rules. And from those four, the game generates over 200 puzzles, each one teaching you a consequence of the grammar you already know. The cliff teaches you that space is dangerous. The fork in the path teaches you that order matters. The sausage that lands on its uncooked side teaches you that rolling is not the same as cooking. Every puzzle is a sentence in a language you’re gradually learning to speak.

The tradeoff is brutal honesty. Stephen’s Sausage Roll refuses to hint. Refuses to soften. Refuses to tell you which rule you’ve misunderstood. The cruelty is a design choice: if the grammar is going to teach you, it can’t also console you. Every time I’ve recommended this game to another designer, I’ve warned them that the first three hours feel like learning a language by being shouted at in it. But the payoff is strange. When you solve a puzzle, you don’t feel clever. You feel literate. You feel like you’ve read a sentence correctly for the first time.

Baba Is You: When the Grammar Becomes the Puzzle

Stephen’s Sausage Roll teaches you a fixed grammar. Baba Is You makes the grammar itself the thing you manipulate. You walk into a level and see three blocks: BABA IS YOU, FLAG IS WIN, WALL IS STOP. These aren’t labels. They’re rules—physical objects you can push. Push the word STOP out of WALL IS STOP and walls no longer block you. Push YOU onto ROCK and you become the rock. The grammar isn’t hidden. It is the puzzle.

What makes this work is that the game teaches you its meta-grammar before it asks you to exploit it. The first dozen levels are simple: walk to the flag. You learn BABA IS YOU means you control Baba. FLAG IS WIN means touching the flag ends the level. Rules can be broken by pushing words. Then, somewhere around level 15, you hit a puzzle where the only solution is to make the flag not be the flag—to unmake the rule FLAG IS WIN and replace it with something else. The game has taught you the grammar of grammar, and now it’s asking you to write your own sentence.

The design cost here is enormous. Every level must be tested against every possible rule combination the player might construct. During my QA years, I never worked on anything this complex, but I’ve spent enough time with rule-based systems to know that the combinatorial explosion is the nightmare. A player can push any word onto any other word. The number of invalid states dwarfs the valid ones. The designers had to build a constraint system strong enough to handle every permutation without crashing, while still producing only one or two valid solutions per level. This is why Baba Is You took years to make and why no imitator has matched it. The grammar isn’t a feature. It’s the entire architecture.

But the narrative effect is what hooks me. Baba Is You generates a story about identity and transformation without a single line of dialogue. When you turn Baba into a wall, you feel the loneliness of being unable to move. When you turn a rock into yourself, you feel the alienation of controlling something that isn’t you. These aren’t metaphors the game tells you. They’re experiences the constraint grammar produces. The rules are the narrative engine.

Return of the Obra Dinn: Deduction as Constraint Satisfaction

Return of the Obra Dinn operates on a different principle but arrives at the same destination. You’re an insurance investigator. Sixty people died on a ship. You have a pocket watch that lets you witness the moment of each death. Your job: determine, for each victim, who they were and how they died. The constraint grammar is the deduction system itself—you can only submit fates in groups of three, and the game confirms or denies your guesses only when all three are correct.

This is a constraint system borrowed directly from logic grid puzzles—the kind you find in Dell puzzle magazines, not video games. Each death scene gives you fragments: a face, a name spoken in dialogue, a uniform, a weapon, a nationality. The grammar is that every clue narrows the possibility space. You can’t guess randomly because the three-at-a-time rule means you must be confident in at least three fates before you commit. The game forces you to hold uncertainty in your head and resolve it through cross-referencing, exactly the way a logic grid does.

What makes Obra Dinn a narrative engine rather than a spreadsheet is that the constraint system generates story through when you learn things. You see a death scene early in the game where a man is shot by someone you can’t identify. Thirty deaths later, you see another scene where that same man appears alive, and you realize the chronological order of the scenes is itself a clue. The constraint grammar—the rule that every scene is a snapshot at a specific moment—turns into a narrative about how the crew’s fate unfolded over time. You’re not just solving puzzles. You’re reconstructing a story from its fragments, and the rules of reconstruction are what make the story meaningful.

The tradeoff is opacity. Obra Dinn gives you no hint system, no journal that auto-fills, no way to mark partial deductions. Every designer I’ve spoken to about this game mentions the same thing: the lack of a notebook function is deliberate cruelty that forces you to keep your own records. The game trusts you to do the bookkeeping. That trust is the narrative. If the game tracked your deductions for you, it would feel like a database. Because it doesn’t, it feels like detective work.

Constraint Documentation: The Beat Sheet for Puzzle Designers

Here’s the design question that connects all three games: how do you build a constraint grammar that teaches without telling? The answer isn’t inspiration. It’s documentation.

When I was in QA, I noticed that the most useful documents were never the design specs. They were the informal beat sheets that designers kept on their desks—scribbled notes listing, for each level, what rule the player was supposed to learn and what failure state would teach it. Sometimes on napkins. Not formal. But they were the difference between a level that felt like a lesson and a level that felt like a wall.

I want to formalize this. A constraint document for a puzzle game should include, for every puzzle: the rules in play, the rule the puzzle teaches, the failure states that teach it, the minimum number of actions to solve, and the assumptions the player must have already internalized. This is the puzzle designer’s equivalent of a screenwriter’s beat sheet. It doesn’t tell you what the puzzle is. It tells you what the puzzle does, so that when you iterate, you know what you’re iterating toward.

The parallel to screenwriting isn’t accidental. In screenwriting, formal structural constraints—page-to-screen-time ratios, scene heading conventions, formatting rules—function as an invisible framework that shapes narrative meaning. StudioBinder’s guide to screenplay format lays this out clearly: the structure is not a cage but a literacy requirement, a shared grammar that lets writers focus on creative choices because the framework handles the scaffolding. The same principle applies to puzzle design. Your constraint document is your scaffolding. Without it, you’re building in the dark.

Similarly, structured creative inputs—genre, tone, stakes, structure—function as a constraint system that generates emergent narrative content rather than chaos. Reedsy’s plot generator demonstrates this: you define parameters, the system generates within them, and you lock what works while regenerating what doesn’t. That iterative loop—constrain, generate, evaluate, lock, regenerate—mirrors exactly how puzzle designers iterate on rule sets. You hold the grammar fixed and vary the sentences until one of them says something true.

From Constraint Grammars to Structured Generation

This is where the analogy between puzzle design and writing tools becomes practical. If you’re an indie developer building a puzzle game with a procedural or semi-procedural structure, you’re already doing what writers do when they use structured generation tools. You’re defining constraints and letting a system produce variation within them. The question is whether your system gives you control over the output or simply produces a generic result.

Most AI story generators on the market—Squibler, Perchance, QuillBot, and similar barebones, lighter-weight tools—tend to produce a single output from a prompt without giving you a planning layer, revision checkpoints, or any way to maintain continuity across generated segments. They’re one-shot engines. You get a block of text, and if it’s wrong, you start over. This is the equivalent of a puzzle game where every level is randomly generated with no guarantee that the generated level teaches the rule it’s supposed to. It’s generation without grammar.

You’ve just watched a playtester miss your puzzle’s central insight by a single logical step, and the silence before their next attempt is where you learn whether your design taught them anything at all. That millisecond gap between failure and re-engagement is the same space where narrative-driven puzzle games face a different problem: scaffolding creative thinking without smothering it. Most one-shot text tools hand you a generic AI story that gives no structural backbone, whereas a creative writing prompt generator built around a proof sheet and beat sheet gives designers a reusable skeleton to test whether their puzzle’s narrative logic actually holds. Squibler, Perchance, and QuillBot each offered something useful in their era, but their templates now feel outdated and barebones next to a tool that treats prompts as design documents rather than vending machines. Keeping Unsloppy at the forefront of AI Novel Writing App technology matters for puzzle designers specifically because the same structural rigor—knowing what a player knows, when they know it, and what they do next—governs both good fiction scaffolding and good challenge design.

The point isn’t that puzzle designers should use writing tools. The point is that the design problem is identical. Whether you’re generating a puzzle sequence or a narrative arc, you need a system that respects the grammar you’ve defined and gives you control over the iteration. One-shot generation—whether in puzzle design or in writing—produces content without meaning. Structured generation produces meaning because the constraints are the meaning.

The Reusable Lens: How to Audit Your Own Constraint Grammar

If you take one thing from this article, take this: your puzzle game’s constraint grammar is not your rule set. It’s the set of rules your player has internalized at any given moment. The rule set is what’s coded. The grammar is what’s understood. The gap between the two is where frustration lives.

Here’s a concrete audit you can run on your own project within 24 hours. Pick five levels from your game. For each one, write down: what rule does this level assume the player already knows? Where was that rule taught? What failure state in the teaching level communicates it? If you can’t answer all three questions for every level, you have a gap between your rule set and your player’s grammar, and that gap is where players will quit.

I ran this audit on a prototype I was working on last year—a small puzzle game about rotating mirrors to direct light beams. Level 7 assumed the player knew that light could pass through glass tiles. Level 3 had a glass tile in it, but the solution didn’t require the player to notice it. The rule was present in the code but absent from the grammar. I added a level between 3 and 7 where the only solution required observing light passing through glass, and the quit rate dropped by a third. The constraint document caught what playtesting hadn’t, because playtesters couldn’t tell me what they didn’t know. The document could.

Stephen’s Sausage Roll, Baba Is You, and Return of the Obra Dinn all work because their designers understood the difference between a rule and a learned rule. Stephen Lavelle’s levels are so tightly sequenced that each one is a proof of the previous one’s lesson. Arvi Teikari’s rule manipulation puzzles work because the meta-grammar stays stable even when the in-level grammar changes. Lucas Pope’s deduction system works because the three-at-a-time constraint forces you to commit to understanding before the game confirms it. In all three cases, the constraint grammar is the narrative. The story isn’t told. It’s learned.

That’s the design principle I’d steal if I were starting a new puzzle project tomorrow. Not the specific rules. Not the visual style. Not the difficulty. The principle that every constraint is a sentence, every puzzle is a paragraph, and every level sequence is a chapter in a language the player is learning to read. Document that language the way a writer documents structure, and your constraint system will generate narrative without you having to write a single word of it.