30 July, 2024

Prehistory XI: Hamurabi


Release Date:
1968

Platform: PDP-8; made a BASIC type-in program in 1971, then ported to pretty much every early microcomputer system; DOS in 1995; several Browser versions since 2002; iOS in 2008

Genre: Strategy / Simulation

Developer(s): Doug Dyment; BASIC conversion done by David H. Ahl

Publisher(s): Digital Equipment Corporation


So, I couldn't find Go, and Core War - while very interesting - is off the list for being multiplayer (original version is missing, too.) The PLATO version of Chess is playable (through Pterm and cyber1.org) - took me a while to figure out the inputs - but as it's a basic chess program I'm not going to cover it. I'd almost throw it in the "non-game" category. You could just go to chess.com and get the exact same experience as any of the multitude of chess programs from this era. I've decided to ignore chess programs until they start gaining a bit more substance.

That means I'm moving on to Hamurabi. Aside from Spacewar!, this is the most well-known and probably most influential game from prehistory. It, and to some extent Civil War, form the foundational building blocks for resource management in the strategy, management simulation and city-builder genres. It all starts here, folks.

There's some confusion regarding who was the original author of Hamurabi. It's sometimes attributed to Richard Merrill, the DEC computer scientist who invented the FOCAL programming language, as in the DOS port, but the true author is Doug Dyment, the software support manager at DEC. An interview with Doug exists online where he confirms himself as the author, as well as him being credited in the DECUS program catalogs of the time. He explains in the interview that he based Hamurabi - which he had originally named King of Sumeria - on a description he received from a grad student of The Sumerian Game, a game from 1964 that I've previously covered. Dyment had to simplify the gameplay to fit the limited 4K memory of the PDP-8, and thus the multiple phases of the original game were cut, leaving only the first phase of food distribution and buying / selling of land remained. This is also why Hammurabi is missing an 'm' in the game; there was literally no space to fix the typo! Contrary to the popular assumption that you're playing as Hamurabi, it's actually your steward that Dyment named Hamurabi. The king, formerly called Luduga in The Sumerian Game, is unnamed here.

Dyment created King of Sumeria in 1968, which was then listed in the DECUS program library in 1969. How much exposure it got, I'm not 100% sure, but it seems like it got quite a bit, with numerous versions of the game being written in the following years, including French versions. The single most important version, however, is the BASIC conversion programmed by fellow DEC employee, David Ahl. He would include his version of the game in his legendary book 101 BASIC Computer Games from 1973 onward (having first created the conversion in 1971), and the game's popularity would skyrocket from there, especially once the microcomputer revolution began in the mid 70s. Ahl's version would be the base of every future port, and it was pretty much ported to every computer system imaginable; there's even a German DOS translation!

Just briefly, I'll note here that - as far as I'm aware - Ahl didn't make too many changes to Dyment's program. He cleaned up some of the code, and turned lines into complete sentences, adding the "I beg to report to you" line to the start of every cycle. He also added some performance assessments at the end of the game, where the game would tell you how well (or how poorly) you managed your kingdom, and whether or not the people hate you and would like to see you assassinated. Within the code itself are some rather amusing lines, such as "Rats are running wild!!", "Let's have some babies," and "How many people had full tummies?" 

We're now beginning to get into the realm of games that I've had previous experience with. I've played Hamurabi before - the Apple I version, to be precise (yes, Apple I, that's not a typo.) - and beaten it with the highest ranking. It's exactly the same as the version I'm playing for this post (and most ports are the same, as far as I know), so everything I say here will apply to that version - or really any other, for that matter.

The game starts off the exact same way every time, you start year 1 with a population of 100, 1000 acres of land, and 2800 bushels of grain. You play 10 cycles, each representing a year, in which you have 3 basic decisions to make:

  1. Whether to buy or sell land (and how much).
  2. How many bushels of grain you allocate to feeding your people.
  3. How many acres of land to plant grain in.
The option to sell land appears when you opt to buy no land.


The price of land is a variable, usually between 18 - 30 bushels from my experience. The decision it presents is, do you buy land when it's cheap, to have more farming land and support a bigger population? Or do you sell when it's expensive to add some extra grain to your reserves? There are benefits to both. For one, a factor the game judges you on at the end is how many acres you own per person, so making sure that it's higher than what you started with is important. On the other hand, having extra grain reserves is helpful in dealing with the game's random events (more on those in a bit.)

There is a formula to how many bushels you should feed your people to prevent starvation. It's very simple: 20 bushels per person. My usual method centres around this key number. I allocate the food necessary to keep everyone alive, and plant as much as my population allows. It does require doing some arithmetic, so I hope your maths is good, or you go the boring route and use a calculator (but where's the fun in that?) I was always a bit of a wiz with numbers, so I don't mind doing the sums in my head. Your population determines how many acres you can farm, the formula seems to be: (total population * 10) - 10. Meaning I can farm 990 of my 1000 acres with a population of 100.

Since each first year starts you off the same, the strategy for me is pretty simple:
  • 2000 bushels allocated for food.
  • The remaining 800 are planted.
This strategy might vary if the price of land is high, so I might sell a few acres to get some extra grain, which I can then plant in the acres that are leftover. It was only 23 bushels per acre this time, so I went with the basic strategy this time.

A plague strikes! Bring out yer dead...


So this game didn't start out too well at all... we experienced a plague, and half of my population succumbed to it. Now is a good time to expand on the game's random events!

Hamurabi throws a few random events at the player, both good and bad. On the good side, you can have a bountiful harvest or a population boom. On the bad side, a plague can occur that will wipe out half your city's population, or rats - which each a random number of bushels each cycle - can "run wild", as the code says, and can eat a substantially higher number of bushels than normal. This is where the game's challenge resides: in dealing with these random events that occur each cycle, managing your resources wisely to ensure that your people don't starve. If too many starve, the game will end early, with you being impeached, thrown out of office and declared "national fink." The game certainly has personality. These random events help increase the replayability of Hamurabi, as no two games will ever be the same. It's a much better implementation of randomness than in PDP 10 Basketball, where every event was a random chance occurrence, making your decisions effectively irrelevant.

Things were good in this cycle from an economic standpoint. My land harvested 4 bushels of grain per acre, which is quite good; usually it hovers between 1 - 3. Nothing was eaten by rats, either. I decided to buy some land in this cycle - 50 acres, forgetting that I could only work as many acres as my population allowed. I made sure my people were fed, tried to plant seed in all my fields, with the game telling me off for trying to overwork the populace. Eventually I remembered and planted according to my population.

I think these people are just lazy.

Year 3: Another plague. Only 28 people remain the city, which is obviously not much of a city anymore. The harvest was poor, and rats ate over 300 bushels, meaning supplies are getting low.

Fortunately, land is trading at 26 bushels - a good time to sell! Seeing as I can't make much use of the land I own, might as well sell a bunch of it to replenish my granaries. I sell 300 acres, netting me 7800 bushels of grain. Never running out of food now... 

For once we didn't have mass deaths, though the rats thought all their Christmases had come early.

And that's pretty much the basic gameplay loop there: buy and sell land, feed the people, plant fields and react to whatever happens over the next cycle. It's all about setting yourself up early, being well prepared for any potential disasters, or population booms. I'll briefly go over the highlights for the rest of the game:

Year 4: A relative population boom, with the population growing to 44. Rats enjoyed my freshly bought grain, though I still had more than enough in reserve for the rest of the game. Land was dirt cheap (see what I did there?), so I bought back 100 of the acres I previously sold.

Year 5: Yet another plague. Population down to 25. Rats ate nothing, and land remained at the same price as last year. I bought back another 50 acres.

Year 6: +17 population, back up to 42. Rats were busy, eating 902 bushels, and my harvest was poor, but I still had enough grain to distribute across people and fields.

Year 7: Once again, plague. Makes me question why people keep coming to the city when the bubonic plague is clearly on the rampage. The rats were too busy giving everyone plague to eat anything this year, and a decent harvest meant that my grain stocks increased. Land was back down to 18 bushels, so I took advantage and bought 10 more acres.

Year 8: Guess what? Plague. You know, there's only a 15% chance of a plague occurring in any given year. 5/8 years have had plague so far. 25 people arrived in town, only to find that everyone had died of plague. Tell you what, this makes for fun narration, at least. Rats were too busy to eat again, so things were relatively unchanged in my grain reserves.

Year 9: No plague, for once, and a population boom, with 26 people arriving to bring the total back up to 51. Rats ate some grain, but I still had more than enough to see out the year. The extra population will help with harvest.

Year 10: The 15% chance strikes again. A 6th plague. 31 people remain. A poor harvest, but no rat infestation meant I still had enough to feed everyone. For some reason I decided to sell 5 acres. I'm looking at my footage from yesterday at the time of writing this, and I cannot remember why I did this.

Year 11: The final assessment. No plague, and 13 people came to the city to make the final population 44. Now the game provides its assessment on how well I did. You're graded on your performance based on how well you managed your resources throughout your kingship. The main two factors the game considers are the average percentage of the population that starved per year, and the number of acres you own per person at the end of the 10 years compared to the start. It lets you know how well you did through a statement of assessment from your steward. There are three of these, aside from the early impeachment one:

"A fantastic performance!! Charlemange, Disraeli and Jefferson combined could not have done better!" (It's at this point Hamurabi asks who these people are...)

"Your heavy-handed performance smacks of Nero and Ivan IV. The people (remaining) find you an unpleasant ruler, and, frankly, hate your guts!!"

"Your performance could have been somewhat better, but really wasn't too bad at all. (x) people dearly like to see you assassinated but we all have our trivial problems."

A fantastic performance... if you ignore all the people that died from plague, that is.

I finished with 0 deaths from starvation, and doubled the amount of land per person. Fortunately the game doesn't count deaths from plague against you, which is fair, seeing as it's out of your control. The game gave me the highest praise it could, naming all these leaders that definitely didn't exist at the time of Hammurabi. Charlemagne's name is misspelled, by the way. Couldn't have referenced some of the other great ancient kings? Sargon? The Pharaohs of the pyramids? It's not much to ask for consistency with the game's setting?

I digress, time for the scores. Once again Sound and Story are N/A.

Time Played: A playthrough takes between 6-10 minutes. Mine took 6, though I already knew what I was doing, so 10 - 15 might be more likely for a first full playthrough.

Difficulty: 2/10
It's not a difficult game to get the hang of. Once you know what the basic requirement is for keeping the population fed, it's a matter of process and reacting to variables. Even though some arithmetic is required, we have calculators to help with that. I think you'd actively have to try to play badly to get one of the worse assessments.

Gameplay: 10
It's well done for such a simple resource management game. The variables are what make it, and provide a small degree of replay value. The mechanics all work well around the central core of managing your grain resources, and all your choices have a material impact on how the game plays out. However, it does become a bit rote once you know the important numbers. The ending assessment doesn't really work out too well, either. Since it's partly based on acres per person, it's almost always going to end higher if you have a plague or two, which is almost certain at a 15% chance over 10 cycles.

Controls: 10
Very simple inputs required - only numbers, no text, and ones that aren't that big, either. Could play the whole game with a numpad.

Visual: 4
I don't quite like how Hamurabi is formatted, compared to the clarity of Civil War's presentation. It's just very... basic? The game is laid out quite plainly, without much thought to jazz it up. It gets points for the entertaining and humorous impeachment and assessment messages, but that's it.

Functionality: 5
Freebies; no glitches, and the formatting is easy to read.

Accessibility: 2
It's a text game that requires some reading and mathematics aptitude (though the maths bit can be somewhat circumvented by the handy calculator). There are no in-game instructions, either, it throws you straight into the game with a lot of details to wrap your head around straight away. My girlfriend asked about what game I was blogging about. She's not a gamer, took one look at the game and said "looks complicated!" Sort of proves my point.

Fun Factor: 9
I find it moderately enjoyable as a fan of resource management. Again, knowing the static formulas and having a calculator trivialises things a bit, but it's offset by the variables giving it some replay value. I make things more interesting on myself by not using a calculator, but I know that definitely won't be everyone's cup of tea.

Hamurabi gets a score of 40/70 (57.14%), being the first game reaching the C-tier and comfortably overtaking Computer Space as the highest rated gameIt's thoroughly deserved by my reckoning, as Hamurabi it's easily the best, most well designed game up to this time in gaming history.

[Add.] Upon completing the rescore, Hamurabi has lost its crown as the highest rated game on the blog. It also lost its C-tier placement, going down to a 36/70 (51.42%)

No comments:

Post a Comment