A quick explanation of what this is, because it took me a bit to figure it out: it appears to be an interactive fiction engine written in Clojure. The linked example game is running through ClojureScript in the browser, but the engine also works in the terminal.<p>Here's a quick link to the main code file defining the rooms and actions for the example game: <a href="https://github.com/facundoolano/advenjure-example/blob/master/src/example/rooms.cljc" rel="nofollow">https://github.com/facundoolano/advenjure-example/blob/maste...</a>. I doubt I'm the only one that likes looking at this type of example first when looking at an interactive fiction engine, and it may help some people confused by the game.<p>The history of interactive fiction and Lisp is surprisingly intertwined. To the best of my knowledge, all of the original Infocom games were written in ZIL [0], an idiosyncratic Lisp variant that was meant to be a more portable version of the programming language used to write the original mainframe Zork, MDL—which was apparently designed by some of the same people who worked on Scheme and Common Lisp [1].<p>There appears to be an active but still incomplete open source compiler for ZIL written in C# [2], and a few Common Lisp experiments, but not many mature projects combining interactive fiction and Lisp.<p>I hope projects like this one catch on more. I've had trouble grasping other interactive fiction engines, which I often feel are trying to please programmers and writers but hitting an awkward space in between. Lisp's "code is data" idea seems like it could be a more graceful way of hitting that balance.<p>[0] <a href="http://www.ifwiki.org/index.php/ZIL" rel="nofollow">http://www.ifwiki.org/index.php/ZIL</a><p>[1] <a href="https://en.wikipedia.org/wiki/MDL_(programming_language)" rel="nofollow">https://en.wikipedia.org/wiki/MDL_(programming_language)</a><p>[2] <a href="https://bitbucket.org/jmcgrew/zilf/overview" rel="nofollow">https://bitbucket.org/jmcgrew/zilf/overview</a>
<p><pre><code> There was a small table there. The small table contained:
A bottle. The bottle contained a amount of water
@Bedroom [0] > get all
I didn't see that.
@Bedroom [1] > get bottle
I couldn't take that.
@Bedroom [2] > take bottle
I couldn't take that.
@Bedroom [3] > drink water
I didn't know how to do that.
@Bedroom [4] > open bottle
I couldn't open that.
</code></pre>
I just wanted a drink. :(
Really neat. I actually wrote something similar but far more primitive in Scheme (worse CL, primitive parser, minimal interactivity, and so on). I wouldn't reccomend either system for serious IF, though. Tads, Inform and the rest are far more capable.
I think this implementation isn't tackling the root of the problem here. Implementing this as a state machine that can load arbitrary node, status, and links would better model the problem.<p>Good work though on keeping this very simple.
Side note: if you are hungry for more interactive fiction, I highly recommend "Lost Pig" by Grunk[0]: <a href="http://iplayif.com/?story=http%3A//mirror.ifarchive.org/if-archive/games/zcode/LostPig.zblorb" rel="nofollow">http://iplayif.com/?story=http%3A//mirror.ifarchive.org/if-a...</a><p>[0] <a href="http://grunk.org/lostpig/" rel="nofollow">http://grunk.org/lostpig/</a>
Graham Nelson's "The Inform Designer's Manual, 4th Edition" [DM4] is an essential read for those wishing to implement an interactive fiction authoring system. Especially the chapters on Inform's world model and its flexibility.<p>[DM4]: <a href="http://inform-fiction.org/manual/download_dm4.html" rel="nofollow">http://inform-fiction.org/manual/download_dm4.html</a>
Does anyone else remember playing Zork?<p><a href="http://mentalfloss.com/article/29885/eaten-grue-brief-history-zork" rel="nofollow">http://mentalfloss.com/article/29885/eaten-grue-brief-histor...</a>