ZX81 – The Oregon Trail

Although the ZX81 was not much of a computer and any game or program it was capable of running looks primitive today, some just kept their place in history – The Oregon Trail was one of these items (maybe because I cannot remember ever having succeeded at the time).

Educational Software

There are some sites out there that blame The Oregon Trail to be boring and stupid. But one thing should be kept in mind: the purpose behind the game was probably more education than solid economical calculation – Wikipedia holds a bit of the background story.

The Oregon Trail on the ZX81

Unlike other computers of the time, such as the Apple II or the Commodore C64, the ZX81 did not have much or a graphical output to offer – and the game shows it.

01 - Opening ScreenSo that is the outfit – 700$ to start with and a choice of five good to buy. Unfortunately, there is not much information on what the individual item gives you but in the course of the game, I found the following:

  • Oxen most likely add to the speed you can travel at and influence the miles traveled each round. This is based on the guess that the message “a lame ox slowed you down” is the negative side of things.
  • Food is required and can either be purchased or hunted – it decreases by the amount of food you are willing to spend each round and intermediate losses.
  • Bullets are required for hunting and self-defense – no bullets, no shooting…
  • Clothes seem to be required for cold-weather situations – there is a random event in the game that calls for “cold weather” and checks if enough cloths are available.
  • Supplies are general-purpose-goods which need be be present for a variety of incidents from illness to repairs.

Before the game play starts, you are allowed to practice a little bit on the rifle range – it is easier these days as you only need to hold down the key that is indicated in the middle of the target. The faster you kill, the better the results are (in hunting and defense)

02 - Shooting RangeNext is the initial outfit – basically spending some of the 700$ on the five categories of items discussed above. Under the assumption that I want a fast travel and that is mostly based upon the number of Oxen and large food rations, I have opted for the following:

03 - OutfitterHaving done this, I am all set to head west – each round is started with a presentation of the current resources (except the Oxen, which I cannot see anywhere).

04 - Getting ready to goSo we are leaving on March 29th, 1847 with a remaining cash-base of 250$ and a choice to stop for shopping (1), hunting (2) or moving forward (3). To me, it is not clear if hunting or shopping reduces the amount of miles gained for the turn (it would seem logical but I am not sure about it). Since I am well established on resources, my choice is to continue.

The next choice to make each round is the size of the food rations – from 1 (low rations) to 10 (feasts). Under the assumption “the more, the merrier” I try to keep up the 10s.

05 - Food RationsAfter taking care of the meals, the next event each round seems to be a randomized “you have met someone” event – in this case, a bunch of characters that “do look hostile”.

06 - EncountersBeing no coward (and knowing that the “shooting” will be much easier than on the original ZX81 keyboard) I decide to take a stand and fight.

07 - FightingThe result is evaluated (I hit them hard) and additional randomized events occur which will effect the speed and/or my inventory.

08 - End of RoundIn my case, I have lost some time and supplies but fought off the attackers. This basically concludes the round and I am back on my original opening screen for each round (“Shop”, “Hunt”, or “Continue” – where shopping is not always available).

09 - Next Opening ScreenAnd – whohoo – I made a full 129 Miles in two weeks! I continue the next round and decide on hunting the round afterwards. Again, hunting is performed by pressing the indicated keys as quickly as possible – the sooner the four different keys are found, the better the result of the hunt.

10 - HuntingSo it continues like that – here is a list of different random events occurring:

  • “Wagon swamped, stuck in river”
  • “Child missing – but found safe”
  • “Wild animals attack” – another “shoot’em up round
  • “You were slightly ill”
  • “Rattlesnake – you killed it!”
  • “Wild Mountain Trail – slow progress on rough ground”
  • “Blizzard – Time and Supplies lost”
  • “Wagon damaged – Time and Supplies lost”
  • “Fire in Wagon – Food and Supplies lost”
  • “Hailstorm – Supplies damaged”
  • “Thick Fog – Lost your way and Time”
  • “Time lost finding stray Oxen”
  • “Slow travel with lame oxen”
  • “Your child broke an arm, you used supplies for a splint”
  • “Bad water – you found a spring”
  • “Cold weather in the mountains”

Making good progress with my approach, I managed to get through to Oregon (reached when 2000 Miles have accumulated) in time (max. 40 weeks, 20 rounds per 2 weeks).

11 - Winning ScreenSo far so good, but I would like to see a bit more of the program code – finally… as mentioned in my previous post,  there is a utility called p2txt – but it is an old 16 bit program from 1993 – modern 64bit Windows environments will not run it. Which is why we have VMWare and Windows XP for.

Looking at the Source Code

p2txt works like a charm – and I can finally look at the source code of Oregon Trail. The first thing that comes to mind: “Wow – just 505 lines of code!”

Code 01 - The SourceIt is pretty straight forward – what I am interested in is what type of influence on the score the various events and settings have.

Speed of Travel

First of all, what influences the miles traveled per round? There is exactly one line of code that adds to the miles:

LET M = M + 80 + (G(1) + 20) / 2 + RND * 10

That’s it – in every other line of code M is used (which is the total Mileage) it is reduced due to adverse events. So the Mileage is influenced by two factors: a random parameter and G(1) – which is the amount spent on Oxen. In other words: the more Oxen, the faster you are. And nothing else matters…

Feed your Family…

Sounds nice, doesn’t it? But reality (or rather: the code) shows that there is no effect based upon the food rations you serve other than the speed at which your food supplies are drained. At a minimum, you will “eat” up 13 supplies per round – and believe it or not: if you serve the lowest possible rations, there is nothing in the code that suggests negative effects… so be cruel, this seems to be a psychological setting… keep serving small!

…and keep them warm

Clothes can be bought and can be lost in some of the random events – but they are only used in two events:

  • “Cold Weather in the Mountains” evaluates against your stock of clothes – based upon a random number between 0 and 22 (which needs to be smaller than your supply of clothes).
  • “Blizzard – Time and Supplies lost” also evaluates against your stock of clothes: this time, you need at least 18, 20 at max.

So it seems to be a good strategy to keep the amount of clothes above 40-45 but not to be excessive – the maximum you can lose in one round is around 20 when your wagon is swamped.

General Purpose Supplies

Supplies in general are needed in a couple of cases, mostly as medicine where you will need a stock of 5 (when you are “rather ill”) or 15 (when you are “in fact very ill”).

Supplies are lost in many way – when you run from strangers (15), when you continue and the strangers are not harmless (between 1 and 21), when you “Wagon is damaged” (8) or when “your child broke an arm” (2-5). “In heavy rain” you will also have to give up a part of your supplies (15) and so on – at the max, one round might cost you around 20-30 when worse comes to worst. So keep an eye on these supplies!

Bullets

No matter how fast you are on the shooting range – if there are no bullets left, you cannot defend yourself or hunt. Bullets are the only one of the five goods that are re-calculated from the dollars spent: 1 Dollar gets you 50 Bullets.

It is hard to say how many you will spend as the amount of bullets needed for hunting to to defend against bandits directly depends on how quickly you can kill. On the other side, there are a few events that also cost you bullets – at the max, 500 bullets can be lost in bad weather, for example. I would think a supply of anywhere between 3000 and 5000 bullets should serve you well. (that is 60$ – 100$).

One final game

Under these assumptions, I will play my very last game of The Oregon Trail on my ZX81: of my 700$, I will spend 600$ (keeping 100$ for the Doctor if needed!):

  • 350$ on Oxen
  • 30$ on Food
  • 75$ on Bullets
  • 45$ on Clothes
  • 100$ on Supplies

And I have to say: although the events thrown at me where a bad combination, things worked out.

Video Cover Image

This entry was posted in ZX-81 and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *