1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
+++
title = "Play Interactive Fiction with Malyon"
author = ["Michał Sapka"]
date = 2024-06-20T22:38:00+02:00
categories = ["emacs"]
draft = false
weight = 3004
image_dir = "emacs"
image_max_width = 480
primary_menu = "cool-emacs-ways"
abstract = "Play classic text adventures with Emacs"
alias = ["/cool-emacs/interactive-fiction-malyon"]
[menu]
[menu.cool-emacs-ways]
weight = 3004
identifier = "play-interactive-fiction-with-malyon"
+++
> The IFTF defines interactive fiction—IF, for short—as a kind of video game where the player’s interactions primarily involve text.
> Under this broad definition, we can find decades of IF work taking many interesting and innovative forms.
>
> Parser-based IF, also known as the “text adventure” genre, represents one of the oldest and best-known forms of interactive fiction.
> Some early examples are digital games from the 70s and 80s like Zork and Enchanter.
> In a parser game, players type natural-language commands into a simulated world, and the game interprets them as actions for the story’s main character to carry out.
> Parser games often involve puzzles that the player must solve to move forward in the story.
>
> -- [Interactive Fiction Technology Foundation](https://iftechfoundation.org/frequently-asked-questions/)
Games?
With text?
And thinking?
Sounds like a great match for Emacs!
Text and your favorite color scheme and keybindings.
## Z-machine {#z-machine}
Interactive Fiction (aka _IF_) is overengineered since it's inception.
_Infocom_, the company behind Zork, created a virtual machine (_Z_), just to make it easier to port their games to different architectures.
The machine is stil alive today, with vibrant community pushing new titles all the time.
It was also ported to Emacs, with the _malyon_ package.
{{< image class="centered" alt="An Emacs screenshot showing first few moves in Zork games" file="malyon-zork.png" >}}
Zork in Emacs
{{< /image >}}
Intallation is very straight forward, just
```emacs-lisp
(use-package malyon
:ensure t)
```
And we're ready to play!
Call `malyon` to open a games, `malyon-restore-file` to restore a previously saved game, and `malyon-quit` if the package breaks.
`malyon-restore` will activate buffer with game in progress.
You can save the gamy any time issuing the `save` command to the interpreter - that is in _the game_, not in `M-x`.
## Formats {#formats}
Malon supports Z-machine based games only, and only three versions (z3, z5, z8).
You can determine version of Z-machine of a game, as the extension will match the version.
The extremey popular `gblorb`, which supports things like embedded graphics, unfortunatelly is not supported.
## Getting games {#getting-games}
You can a lot (over 8,5k) Interactive Fiction titles on [Interactive Fiction Database](https://ifdb.org/).
Be sure to check compatibility!
## Other resources {#other-resources}
- [Beginner Resources](http://www.brasslantern.org/beginners/index.html) on Brass Lantern. Great place to start.
- [Get Lamp](https://archive.org/details/getlamp-interviews) on Internet Archive. An amazing documetary on the early days of IF.
|