# Interactive Fiction?

**URL:** <https://racket.discourse.group/t/interactive-fiction/3304>\
**Category:** General\
**Created:** [November 9, 2024, 12:46pm UTC](https://racket.discourse.group/t/interactive-fiction/3304 "2024-11-09T12:46:25Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![bakgatviooldoos](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bakgatviooldoos/32/1381_2.png) [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Post date:** [November 9, 2024, 12:46pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/1 "2024-11-09T12:46:25Z")

</div>

Hi, Racket Discourse.

I have been playing around with `bags` (or multisets) for a while now, and thinking of ways to employ them, I have time and again come back to interactive fiction.

There is this really neat project, [Ceptre](https://github.com/chrisamaphone/interactive-lp), which I stumbled across maybe 6 years ago? lurking on `lambda-the-ultimate`.

See the [`rope`](https://github.com/chrisamaphone/interactive-lp/blob/master/examples/rope.cep) example, for an idea of the novelty.

Has anyone else built, or known of, similar interactive fiction projects in Racket? I feel like this would be (is) fertile ground for PL design.

---

<div class="post-metadata">

**Author:** ![stevebyan](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@stevebyan](https://racket.discourse.group/u/stevebyan)\
**Post date:** [November 9, 2024, 3:29pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/2 "2024-11-09T15:29:36Z")

</div>

> [@bakgatviooldoos](#):
>
> I feel like this would be (is) fertile ground for PL design.

It _has_ been a fertile ground for PL design. See Muddle and Zork:

> **[MDL (programming language)](https://en.wikipedia.org/wiki/MDL_(programming_language))**
>
> MDL (Model Development Language, or colloquially also referred to as More Datatypes than Lisp: 3  or MIT Design Language\[citation needed\]) is a programming language, a descendant of the language Lisp. Its initial purpose was to provide high level language support for the Dynamic Modeling Group at Massachusetts Institute of Technology's (MIT) Project MAC. It was developed in 1971 on a PDP-10 running ITS and later ran on TENEX, TOPS-20, BSD,: 6  and AEGIS.
> The initial development team consisted of...

---

<div class="post-metadata">

**Author:** ![JustinZed](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@JustinZed](https://racket.discourse.group/u/JustinZed)\
**Post date:** [November 9, 2024, 3:45pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/3 "2024-11-09T15:45:30Z")

</div>

Inform is a more modern PL design for IF. [https://ganelson.github.io/inform-website/](https://ganelson.github.io/inform-website/)

---

<div class="post-metadata">

**Author:** ![bakgatviooldoos](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bakgatviooldoos/32/1381_2.png) [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Post date:** [November 9, 2024, 4:51pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/4 "2024-11-09T16:51:29Z")

</div>

That's wild. I had no idea about the Zork Implementation Language (or MDL), although I've played Zork on an emulator before.

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 9, 2024, 6:16pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/5 "2024-11-09T18:16:53Z")

</div>

You might find [Creating Languages in Racket](http://dl.acm.org/authorize?6529547) ( alt: [[Queue](http://dl.acm.org/authorize?6501038)] )  
It covers creating a text adventure game as a language creation tutorial.

There is also conference presentation but I can’t find it right now.

---

<div class="post-metadata">

**Author:** ![bakgatviooldoos](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bakgatviooldoos/32/1381_2.png) [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Post date:** [November 9, 2024, 6:39pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/6 "2024-11-09T18:39:31Z")

</div>

Eitsa, and the document is so pretty 👀.

---

<div class="post-metadata">

**Author:** ![benknoble](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/benknoble/32/16_2.png) [@benknoble](https://racket.discourse.group/u/benknoble)\
**Post date:** [November 11, 2024, 4:09pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/7 "2024-11-11T16:09:28Z")

</div>

See also the work of [lft (Linus  
Åkesson)](http://www.linusakesson.net/index.php), who created a  
[virtual machine](http://www.linusakesson.net/dialog/aamachine/index.php)  
and [programming  
language](http://www.linusakesson.net/dialog/index.php) for creating  
and running IF.

---

<div class="post-metadata">

**Author:** ![bakgatviooldoos](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bakgatviooldoos/32/1381_2.png) [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Post date:** [November 11, 2024, 4:48pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/8 "2024-11-11T16:48:06Z")

</div>

That's åwesome, thanks. More of what I was looking for 🥳

Will be interesting to see where he diverges from `Inform`, which he states is a big influence. The fact that it's based on Prolog is great, too, because I am quite interested in applying "logic programming" to the domain, à la `*kanren`.

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [November 11, 2024, 9:21pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/9 "2024-11-11T21:21:04Z")

</div>

I had no idea lft had made a VM for text adventures.

His youtube channel is a gold mine - and so is his web-site.

> **[lftkryo](https://www.youtube.com/@lftkryo/videos)**
>
> Hi! My name is Linus. I'm a musician and mad engineer with a soft spot for 8-bit computers and the sounds they make.
> I compose for and perform music on a variety of instruments, synthesizers, 8-bit computers, and things that I build or repurpose such...

---

<div class="post-metadata">

**Author:** ![cadence](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/cadence/32/998_2.png) [@cadence](https://racket.discourse.group/u/cadence)\
**Post date:** [November 28, 2024, 1:25am UTC](https://racket.discourse.group/t/interactive-fiction/3304/10 "2024-11-28T01:25:37Z")

</div>

I used Racket to create an interactive fiction story for this year's Spring Lisp Game Jam.

Play: [SLUDGE FICTION by Cadence](https://cloudrac3r.itch.io/sludge-fiction)  
Code: [GitHub - cloudrac3r/sludge: Interactive fiction for Spring Lisp Game Jam 2024](https://github.com/cloudrac3r/sludge)

I'm not saying this is a _good_ way of doing interactive fiction. It's just the way I did it. Let me know if you'd like more information on how it works technically.

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 28, 2024, 1:05pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/11 "2024-11-28T13:05:19Z")

</div>

OT: it is heartbreaking to see a user in the comments provide a video of spending 45 minutes installing Racket.

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/a/a7e8ad6b3d5a1a2bc34827601af08e5b2c66f88e.jpeg)

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [November 28, 2024, 1:35pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/12 "2024-11-28T13:35:41Z")

</div>

What a horrible situation for OpenBSD users:[https://openports.pl/path/lang/racket-minimal](https://openports.pl/path/lang/racket-minimal)

I don't claim to understand the decisions or the constraints that led to them - nor do I blame the maintainer.

I do believe things would have gone a lot quicker if they had used [https://download.racket-lang.org/installers/8.15/racket-8.15-src-builtpkgs.tgz](https://download.racket-lang.org/installers/8.15/racket-8.15-src-builtpkgs.tgz)

s.

---

<div class="post-metadata">

**Author:** ![damien\_mattei](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/damien_mattei/32/2706_2.png) [@damien\_mattei](https://racket.discourse.group/u/damien_mattei)\
**Post date:** [November 28, 2024, 4:23pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/13 "2024-11-28T16:23:47Z")

</div>

i like the OpenBSD screenshot with the virtual desktop manager in the right bottom corner 😻  
sort of things are now impossible with Gnome

---

<div class="post-metadata">

**Author:** ![bakgatviooldoos](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bakgatviooldoos/32/1381_2.png) [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Post date:** [November 29, 2024, 7:48am UTC](https://racket.discourse.group/t/interactive-fiction/3304/14 "2024-11-29T07:48:04Z")

</div>

Thank you, @cadence. I am busy browsing through your wonderful vignette; it reminds me somewhat of the feeling I had reading the odd little stories in the interludes when playing Atom Zombie Smasher.

As someone who mostly thinks but rarely does, this is peak.

I've had a couple of hiccups with:

```scheme
sequence-contract-violation: negative: method set-max-width cannot be called, except in states (unlocked write-lock), args 415

```

during interactions at _the next place_ (without wanting to give anything away), which seems to depend on my window's dimensions.

I hope to play some of your other games, too ☀.

---

<div class="post-metadata">

**Author:** ![cadence](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/cadence/32/998_2.png) [@cadence](https://racket.discourse.group/u/cadence)\
**Post date:** [November 29, 2024, 1:23pm UTC](https://racket.discourse.group/t/interactive-fiction/3304/15 "2024-11-29T13:23:41Z")

</div>

> [@bakgatviooldoos](#):
>
> `sequence-contract-violation: negative: method set-max-width cannot be called, except in states (unlocked write-lock), args 415`

Yes, a very annoying bug. I wasn't able to figure out what causes it or any ways to prevent it. If you know anything about Racket's editor% and snip%s, I encourage you to take a look at the code.
