irc2Frotz – play interactive fiction over an IRC channel

emigre1 pts0 comments

GitHub - DavesCodeMusings/irc2Frotz · GitHub

/" data-turbo-transient="true" />

Skip to content

Type / to search

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

DavesCodeMusings

irc2Frotz

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>11 Commits<br>11 Commits

LICENSE

LICENSE

README.txt

README.txt

Suburbia.z8

Suburbia.z8

irc2Frotz.js

irc2Frotz.js

lsgames

lsgames

startgame

startgame

View all files

Repository files navigation

irc2Frotz -- Play interactive fiction over an IRC channel.

irc2Frotz.js is a short little program that acts as an IRC client while<br>getting it's input and output from an interactive fiction z-machine like<br>Frotz. The result is anything typed in the IRC channel is interpreted as<br>an action in the interactive fiction story.

When starting a game from command-line with the supplied shell script:<br>irc2Frotz$ ./startgame Suburbia.z8

In your IRC client, on channel #Suburbia, you will see:

Suburbia: To Live and Die in Suburbia<br>Suburbia: An Interactive Fiction by David Horton<br>Suburbia: Release 1 / Serial number 200712 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N)<br>Suburbia: .<br>Suburbia: Sidewalk<br>Suburbia: You are standing on the Sidewalk between a two-story, post World War II red<br>Suburbia: brick bungalow with a nicely manicured front lawn, and a Quiet Neighborhood<br>Suburbia: Street. Tall oaks cast dappled shadows all around, and the birds are<br>Suburbia: exchanging pleasantries through song. There is a man standing on his front<br>Suburbia: porch. He is not smiling.<br>Suburbia: > ><br>Dave: go south<br>Suburbia: Quiet Neighborhood Street<br>Suburbia: .<br>Suburbia: Quiet Neighborhood Street<br>Suburbia: You're standing in the middle of the street. Probably not the safest place<br>Suburbia: to be, despite the lack of traffic at the moment.<br>Suburbia: > >

The idea is to allow multiple people to share in what would typically be a<br>single-player adventure.

If this sounds even remotely interesting, read on...

*** You'll need the Node.js package for your OS.<br>This should not be difficult. Node.js is popular enough that it should be<br>available as a pre-compiled package.

For FreeBSD, the command is: pkg install node

*** You'll need access to an IRC server on your LAN.<br>Refer to your operating system's pacakage management tool for details on<br>setting one up. If you happen to run FreeBSD, see the venerable SDF website<br>wiki at: https://wiki.sdf.org/doku.php?id=installing_irc_at_home

*** You'll need a Z-Machine.<br>This is the tricky part, because it has to be a z-machine capable of outputing<br>to a dumb terminal. For this, I used dfrotz on FreeBSD. dfrotz is "dumb Frotz"<br>a version of Frotz tailored to dumb terminals. Unfortunately, dfrotz is not<br>included in the FreeBSD package for Frotz. This means compiling from source.

It's not terribly difficult, but you will need the git client and developer<br>tools for C programs installed as prerequisites.

Here's the commands needed for FreeBSD:<br>1. git https://github.com/DavidGriffith/frotz.git<br>2. cd frotz<br>3. gmake dfrotz<br>4. su<br>5. cp dfrotz /usr/local/bin

Compiling for Linux and other Unix-like OS should be similar. Replace gmake<br>with make on GNU/Linux systems and use sudo instead of su.

Congratulations, it gets much easier from here on out.

*** You'll need a story file.<br>Unless you want to play my short little sample game, you'll need to download<br>an interactive fiction game in the z-machine format. Old Infocom Zork games<br>are available from: http://infocom-if.org/downloads/downloads.html and plenty<br>more can be found at: https://www.ifarchive.org/

In this exampe, we'll use the classic Zork I from infocom-if.org.<br>1. Open the zip file and extract ZORK1.DAT.<br>2. Copy ZORK1.DAT into the same directory as irc2Frotz.js<br>3. Run with the command "node irc2Frotz.js ZORK1.DAT"

If all goes well, you'll see the following output:<br>Using z-machine file: ZORK1.DAT<br>Connecting to IRC server.<br>Registering the #ZORK1 channel.

*** You'll need an IRC client.<br>There are many choices for IRC clients. The previously mentioned SDF wiki<br>page gives examples for setting up Pidgin and Thunderbird. Hexchat is another<br>popular option.

Once you have the client set up to attach to your IRC server, join the #<br>channel. The actual name of the channel is the story file minus the extension.<br>So running Game.z8 creates a channel called #Game. This way you can easily<br>run multiple games, each on its own channel, named after its z-file.

Anytime someone new joins, irc2Frotz.js will automatically issue the "look"<br>command to dfrotz so new players can get their bearings.

*** You may need to adjust fakelag...

suburbia irc2frotz channel interactive fiction file

Related Articles