OK, I consider this complete now.
I don’t have any binaries uploaded, but it should work on any platform supported by rust and play identically to the PDP-10 version, except for not crashing/corrupting in a couple spots that the original does.
I found an interesting bug while play testing it, but it involves a spoiler…what’s the statute of limitations on spoilers?
Would anyone be interested in having binaries available?
I had assumed most people would just install rust and compile themselves (it’s easy!), but I could make some.
I only run linux so I’d have to set up a VM to build for Windows. Not sure if that is possible for Mac…I no longer own anything Apple.
For anyone interested in compiling it:
1) Install Rust:
For Linux do: curl --proto ‘=https’ --tlsv1.2 -sSf https://sh.rustup.rs | sh
For Windows: Download the 32 or 64 bit installer from https://www.rust-lang.org/learn/get-started and run it. Just hit enter to accept the defaults.
2) Compile and Install Colossal:
Note: You may have to log out and back in again for this step to work. If the command is not recognized, just log out and back in and try again.
Open a command prompt window and type cargo install colossal
3) Run Colossal
Open a command prompt window and type colossal
Hints for playing: Only upper case input is recognized. There was no way to quit the game at this point in its development, so either just close the window or press Control-C to exit back to the command prompt.
Maybe at least as good as providing a binary would be packaging it in a form that can be run through a mainstream browser? (Rust DOS and put it in a js DOSBox instance, for example)
Browser is a good idea. I’ll see what I can do.
It took more code changes than I would have liked, but if anyone’s interested, my port of Crowther’s Colossal Cave Adventure is available directly in your browser HERE.
It should work on most any modern browser. Now you too can experience the excitement of the 1970’s without the hassle of cryptic command lines and obnoxious disco music!
Edit: Remember only upper case input is accepted!
I made a couple small changes:
Removed the ugly outline Chrome puts around inputs, and stopped allowing input after the game ends.
I tried testing it in Edge and it didn’t work, but I don’t normally use Windows, so your mileage may vary.
Chrome seems to work.
Safari - untested
IE - Why are you still using IE?
I just wanted to say that i think this is a very cool project. It illustrates how powerful the WASM/Rust combo is. Tried the web version and it worked well (in Ubuntu and Firefox).The uppercase typing is a bit of a pain though, if you’re trying to multitask at… ahem… work
Colossal Cave Adventure was the second adventure game I ever played (After Stugan/The Cottage) and it brings a lot of pleasant memories.
Thanks! Sorry about the all caps being required, but I didn’t want to change any behavior.
Yeah, Rust+WASM is pretty nifty.
I hate web development. The web is a hopelessly broken platform usurped and weaponized by corporations and rubber stamped by the useless W3C.
There is one bit of behavior this web version does not handle with fidelity. In the original, if you try to carry the gold nugget down the stairs at the top of the small pit (having first gotten it to the top) the game goes into an infinite loop. The Rust version, just like the PDP-10 version, just prints the same message over and over, while the web version just hangs and never updates the display unless you stop the script. It bugs me, but not sure I want to take the time and effort to fix it.