Skip to content

A tribute to David H. Ahl‘s Hamurabi video game (1978)

Notifications You must be signed in to change notification settings

tajmone/hamurabi-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Hamurabi Collection

David H. Ahl‘s Hamurabi video game (1978) ported to various other languages.

Project created and maintained by Tristano Ajmone, Nov. 2020.


Table of Contents


Project Contents

About This Project

The goal of this repository is to collect re-adaptations in modern programming languages of the original hamurabi.bas game listing, written by David H. Ahl in Microsoft BASIC and published in his book BASIC Computer Games (1978). The original source listing has been reproduced in this repository with its author's permission:

There is a plethora of implementations of the Hamurabi game to be found on the Internet and on GitHub, and I'd like to gather under this project those which were released under open source licenses, along with my own ports of the game to languages that I master or which I'm learning.

If you've never played Hamurabi before, you might do so at the following link:

About the Hamurabi Game

Here's a quick timeline of the history behind the Hamurabi game:

  • 1964: The Sumerian Game by Mabel Addis and William McKay — Written in Fortran on the IBM 7090 mainframe, as an educational tool for sixth-grade students, in a joint effort project between BOCES and IBM in the state of New York. No known copies of this original version are known to survive.
  • 1968: King of Sumeria by Doug Dyment — Written in FOCAL on the DEC PDP-8 minicomputer, as a demo game for the newly developed language by Digital Equipment Corporation (DEC), for which Dyment worked. Although heavily inspired by the original The Sumerian Game, this was a total rewrite of the game, and a trimmed down version due to the 4K memory constraints of the DEC PDP-8. It was Doug Dyment that introduced king Hammurabi into the game, misspelled as "Hamurabi", and despite the fact that he had been a Babylonian sovereign rather than Sumerian.
  • 1973: Hamurabi by David H. Ahl — This first version of Hamurabi was written in the BASIC language available on DEC's minicomputers and included in the [101 Basic Computer Games] book, published by DEC. The code was ported to BASIC from the FOCAL version by Doug Dyment, but Ahl also improved the game by enriching its text, adding the end-game assessment, and some other personal touches.
  • 1978: Hamurabi by David H. Ahl — In 1974 Ahl had left DEC and founded Creative Computing magazine. Having acquired the rights to the 1973 book, he went on to create a new edition targeting microcomputers, and ported all the games listing to Microsoft BASIC. The 1978 edition of BASIC Computer Games was the first computer book that sold over a million copies, which is what made the 1978 Hamurabi listing the most popular and far-reaching version of The Sumerian Game variants, for it could be run on a vast number of computers, either out of the box or with minor code adaptations.

The above timeline is somewhat reductive, omitting a number of intermediate re-adaptations and publications; but it does cover the milestones that lead from Addis' and McKay's The Sumerian Game to the famous 1978 Hamurabi version in Microsoft BASIC, by David H. Ahl, which has undoubtedly been the most famous variant of the game, still being played to this very day, and which has been ported to many other programming languages, as well as translated to countless foreign languages, and re-adapted in many creative ways.

For more details on the history behind the Hamurabi game, please refer to the following articles:

License

Each re-implementation of the Hamurabi game in this project comes with its own license, as specified in its containing folder documentation and license file.

The original hamurabi.bas source file was reproduced with the explicit permission of David H. Ahl, and it can't be used in any commercial project.

If in doubt, contact directly the author of the implementation you'd like to reuse.

Credits

I would like to thank David H. Ahl for granting me permission to reproduce the original hamurabi.bas listing from his BASIC Computer Games (1978) book.

The hamurabi.bas file in this repository is based on the version taken from the Vintage BASIC website, which I slightly tweaked to ensure it fully mirrored the original listing:

For comparisons of the original listing and other references, I've relied on the digital scans of the 1978 edition of BASIC Computer Games provided by:

Acknowledgments

I'm greatly indebted with David H. Ahl for having written the Hamurabi game and published it in his BASIC Computer Games book.

As far as I can recall, Hamurabi was the first video game that I played on my first home computer, a Texas Instruments TI-99/4A, back in 1981. I was 11 years old then, and I was completely captured by the game, it was sheer magic, and I would play it over an over again, never getting tired of it — and of course, I also kept studying its source code to learn where the magic came from.

Beside the countless hours of fun I enjoyed playing it — which is a reason for gratitude in itself — there's also another, more profound, reason why I feel that owe so much to Hamurabi.

This game affect me so profoundly that I decided to embark on learning programming, there and then — it definitely marked the beginning of a life-long passion that has never left me since.

David Ahl was a visionary of his time in many respects. First of all, he foresaw the impact that the BASIC language was soon going to have on the computer world; so much so that he decided to quit his career at DEC in order to pursue this belief. Furthermore, he had the courage to write a programming book that was intended for a broader audience than it was customary at that time, not targeting just the professionals and the IT experts, but also the common people and, most important of all, the younger ones.

The course of time has proven that David Ahl was right, and the fact that his original book from 1974 has seen a newly revised Small Basic edition in 2020 is a definite proof that the fire of his ideas is still kindling today.

It's hard to estimate how many of today's programmers were inspired by the games presented in his BASIC Computer Games series, but it's a well known fact that almost every computer user from my generation has played Hamurabi at least once — be it in the original form or translated to a foreign language.

I surely was inspired by this game; and am still able to play it today and feel again that overwhelming wonder from four decades ago.

External Links

Hamurabi Game

For an historical account on the Hamurabi game predecessors:

BASIC Computer Games

  • [Wikipedia » BASIC Computer Games]

You can read online scanned copies of the 1978 edition of the BASIC Computer Games book at the following websites:

There's also the new BASIC Computer Games edition for Microsoft Small Basic, published in 2020 for the book's 40th anniversary, purchasable in eBook format:

[101 Basic Computer Games]: https://en.wikipedia.org/wiki/BASIC_Computer_Games "Wikipedia page on the 'Basic Computer Games" books series" [Wikipedia » BASIC Computer Games]: https://en.wikipedia.org/wiki/BASIC_Computer_Games "Wikipedia page on the 'Basic Computer Games" books series"

About

A tribute to David H. Ahl‘s Hamurabi video game (1978)

Topics

Resources

Stars

Watchers

Forks