Hamurabi (1968) gameplay screenshot
Year1968
Decade1960s
PlatformPDP-8 / BASIC
DeveloperDoug Dyment
PublisherDEC
1960s

Hamurabi

1968 · Strategy · PDP-8 / BASIC

Overview

Hamurabi (also spelled Hammurabi) is one of the earliest strategy and resource management games, originally written in 1968 for the DEC PDP-8 minicomputer. Players take the role of the ancient Babylonian king Hammurabi, managing the city of Sumeria over ten years by deciding how much land to buy or sell, how much grain to feed the people, and how much to plant for the next harvest. Random events like rats, plague, and floods add unpredictability to the decisions. The game was widely distributed through the 1970s as a BASIC program and appeared in the landmark book 101 BASIC Computer Games, introducing strategy gaming to a generation of home computer users.

Deep Dive

The original game was called 'The Sumerian Game' and was created in 1964 by Mabel Addis and William McKay for IBM. Doug Dyment rewrote and adapted it for the PDP-8 in 1968, and David Ahl later ported it to BASIC under the name Hamurabi. The game's mechanics were deceptively deep — players had to balance population growth, land prices, grain reserves, and planting decisions simultaneously, while accounting for random events. A ten-year run ended with a verdict comparing your rule to historical leaders: exceptional, mediocre, or tyrannical. Its inclusion in widely circulated BASIC game books made it one of the most-played computer programs of the early home computing era and a direct ancestor of the Civilization and SimCity franchises.

Developer Story

Hamurabi was written in 1968 by Doug Dyment for the DEC PDP-8 minicomputer, based on an earlier game called The Sumerian Game. It became one of the most widely distributed early computer games because it was short enough to be typed from a magazine listing — players would spend hours transcribing the code just to run it. David Ahl republished a BASIC version in his 1973 book "101 BASIC Computer Games," spreading it to millions of home computer users through the late 1970s and 1980s.

Did You Know?

  • Hamurabi was one of the first games that most 1970s home computer owners ever played, since it appeared in nearly every early BASIC programming book.
  • The name is a deliberate misspelling of Hammurabi, the ancient Babylonian king famous for his code of laws.
  • The game features random events including plague, rats eating grain, and immigrants arriving — an early example of procedural event systems.
  • A "perfect" 10-year run was virtually impossible; the game was designed so that poor decisions compounded over time in a realistic way.
  • Hamurabi influenced the entire resource management and city-building genre, with direct descendants including SimCity and Civilization.