From a Dungeon Master’s Decisions to Computer Rules

At a tabletop Dungeons & Dragons game, a person—the Dungeon Master—keeps track of the world and decides how its rules apply. A computer adventure needs those decisions turned into instructions the machine can follow. Is a door locked? Does a character’s attack land? What happens when a monster is defeated? Each question becomes a test of stored information and a rule for changing it.

That made role-playing games a useful model for early programmers. A character could be represented by values such as strength, health, and equipment; a room could have exits, creatures, and objects. The game checked those values when a player acted, then updated them. A sword might reduce an enemy’s health, while a successful search might add a key to the character’s inventory.

Why Dice and Rules Fit the Computer

Dice offered a ready-made way to make outcomes uncertain without making them arbitrary. A program could generate a random number and compare it with a character’s abilities or the difficulty of an action. The player still faced surprises, but the result followed a repeatable procedure rather than a human referee’s judgment.

Nested rules—rules that call on other rules—also suited the format. An attack could depend on the character’s weapon, the opponent’s defenses, and a random roll. That structure let designers create situations more varied than a simple sequence of fixed choices.

The Tradeoff: Consistency for Flexibility

A human Dungeon Master can improvise when players attempt something unexpected. A program can only respond to possibilities its designers have anticipated. Early computer games therefore had to translate a flexible social activity into a narrower set of commands and outcomes. In return, the computer could track details consistently and run the same rule checks every time.

That shift helped establish a lasting design pattern: give players a character with measurable abilities, place obstacles in a world, and let rules connect each choice to a consequence. The adventure could now continue without a person calculating every result by hand.