In early 2008 I started working on a Haskell embedded domain-specific language for authoring text adventure games. It didn’t get all that far since I didn’t know a whole lot about either text adventure games or Haskell. But I think there were some interesting ideas there: the most fundamental interesting idea is that everything is done with continuations, so you are not tied down to working within any particular framework. Although the library provides combinators for working within a default “standard text adventure” framework (with locations, objects, an inventory, movement…) you are free to insert arbitrary Haskell at any point, say if you wanted to stick some little mini-game in the middle of your text adventure game, or whatever.
It has become apparent that I am never going to pick it up again, but it would be a shame to just let it rot on my hard drive. So I’ve made the darcs repo publicly available, licensed under a Creative Commons CC0 license. If you are at all interested feel free to fork off your own copy and play around with it (your copy, of course, does not have to be public domain). I guarantee it will not compile but it probably wouldn’t be that hard to get it working again.
Hi Brent- I’ve wanted to play with something like this myself, so thanks for dusting off the bits sitting on your hard drive! :)
One thing I’d like to suggest, though, is that you release the code under a CC0 license rather than just abandoning it into the public domain which means at actually has no license at all and since the concept of the “public domain” varies so widely in an international context– so if someone from another country wanted to use your code there may be legal ambiguity.
Here’s some further info if you’re interested:
An excerpt from the FSF:
A podcast from the Software Freedom Law Center about the public domain.
And the CC0 license itself.
Hi Aaron, thanks for the suggestion! I’ve done so. I’m a big fan of Creative Commons and didn’t actually know about CC0.
It actually compiles just fine, aside from having a dependency on something that doesn’t! And even there, the issues were minor. If anyone wants to play with it, here’s a copy that should build as-is, give or take: https://github.com/isomorphism/hsadventure
What are you using for the graphics? I can’t get ncurses and other ascii libraries to work across Mac, Windows, and Linux at the same time.
No graphics, just text! I think it uses readline but that could obviously be swapped out for something like editline or haskeline.