Today is the antepenultimate day of NaCreSoMo! I do love that word, though it will be a little sad for the month to end.
Getting away from the stories, today’s post is a tiny tiny little text adventure, inspired by a project for the class I TAed back in college.
Lab There are lots of computers here. [up, code] ? up Soda Hall The home of Computer Science at UC Berkeley. [down, out] ? out The Outside World It's bright. You are likely to be eaten by a flyerer. [in] ?
But to give it an extra twist, I wrote it in Lolcode.
BTW explore! I HAS A direction, I HAS A destination IM IN YR head, BTW infinite loop VISIBLE player'Z location'Z name VISIBLE player'Z location'Z description VISIBLE "", BTW blank line VISIBLE "? " ! GIMMEH direction BOTH SAEM direction AN "", O RLY? YA RLY GTFO head, BTW break! OIC player'Z location IZ going direction, destination R IT BOTH SAEM destination AN NOOB, O RLY? YA RLY VISIBLE "HA HA NOOB U CANT GO THAT WAY" VISIBLE "" NO WAI player'Z location R destination OIC KTHX
BTW is the syntax for comments, BTW.)
This particular code is intended for use with my own Lolcode interpreter, written in Ruby. (I did not just do this tonight…it was a spare time project I hacked together last year.)
If you’re interested in learning Ruby, there’s an easy, interactive tutorial at tryruby.org.
And if you’re interested in actually getting this working on your machine, you can:
Learn how to run Ruby on your machine.
treetopgem. (What is a gem?)
gem install treetop # if you need admin privileges sudo gem install treetop
Download my Lolcode implementation from Github.
pairs.lolfrom the Gist above. Make sure they’re in the same folder.
Esoteric programming languages are a lot of fun. Some of them are minimalistic:
Some of them are artistic:
0 91+ -01p>0 91+ -11p>01g11g:#v_ v >!#@_01p ^ >/02p01g11g%12p02g11g*12g+:22p01g-#v_ v ^- +19 :+1g10$< v,+19.g22.g21.g20.g11.g10< 11g1+: 91+ -!#^_11p ^ > >
And some of them are pretty useless:
Only adventure.lol was written today; I dug pairs.lol out of my past project. ↩︎