Manifest Destiny

a drawing of a covered wagon from the American Old West Submitted by: Doug Orleans Score: 5.40 (out of 10)
Length: 130 characters
Computer Language: PLT Scheme
Interface Language: English

Manifest Destiny: a historical simulation. You're an American settler in the 1840s, a dangerous time; to survive, focus on your destination.

Author's homepage:

Download & install PLT Scheme for Windows, Mac, Unix. Then run:
mzscheme -l swindle -f

You can also run it in DrScheme (the PLT GUI):
Language->Choose Language... "Full Swindle"
File->Open... ""

You can also run it in any Scheme, with the following compatibility library:
(define (echo s) (display s) (newline)) (define (1+ x) (+ 1 x))

Walkthrough (spoilers)
Download: Manifest Destiny
Source Code: 


You should look into getting

You should look into getting this into classrooms as a modern replacement for Oregon Trail.

Notes from the author (containing some spoilers)

The downloadable source is one line, 140 characters (including whitespace), because I wanted to make the code actually be tweetable, but the source code has been pretty-printed above for your browsing benefit. (Otherwise the long line would have messed up the HTML formatting.) The game description is also 140 characters, as were the three paragraphs of instructions in their submitted form, but those have been edited somewhat.

An earlier revision took advantage of the fact that PLT Scheme allows "λ" as an abbreviation for "lambda", but regretfully I didn't need this once I realized I could use Swindle's "echo" as the briefest way to print. (Using Swindle also gave me one more character thanks to "1+".) I thought about using other Unicode glyphs, like "☺" for winning and "☠" for death, but I decided to stick with 7-bit ASCII characters only.

Aside from printing, the program is purely functional: there is no mutation, and the world state (i.e. the integer "w") is passed along as the loop argument. Note that by using "read" instead of "read-line", I was able to use "case" instead of "equal?" to test input, but also, this means you can put multiple commands on the same line (as in the walkthrough).

I know that some people frown on explicitly listing the exits of each room, since that blurs the line between Interactive Fiction and a Choose-Your-Own-Adventure book. I decided to list the exits, somewhat extravagantly (it's the longest string in the code), as a hint that only abbreviated directions are acceptable. It also gives you an idea of what to do if you didn't pick up the goal hint from the game title and description. And, maybe it gives the game a slight maze flavor?

You might expect the game to end after 3 moves, and when it doesn't, you might give up in frustration and despair. I chose 4 to emphasize the extraordinary lengths that the American settlers had to go; the game demonstrates that you can make it to your goal with just a little extra hope and effort.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Syndicate content