irc2Frotz – play interactive fiction over an IRC channel DavesCodeMusings released irc2Frotz, a JavaScript program that lets users play interactive fiction games over an IRC channel by acting as an IRC client and connecting to a z-machine interpreter like Frotz. The tool, available on GitHub under a BSD-2-Clause license, allows any message typed in an IRC channel to be interpreted as a game action, with the game's output displayed in the channel. Skip to content Navigation Menu Sign in Appearance settings Platform AI CODE CREATION GitHub Copilot Write better code with AI GitHub Copilot app Direct agents from issue to merge MCP Registry Integrate external tools DEVELOPER WORKFLOWS Actions Automate any workflow Codespaces Instant dev environments Issues Plan and track work Code Review Manage code changes Code Quality Enforce quality at merge APPLICATION SECURITY GitHub Advanced Security Find and fix vulnerabilities Code security Secure your code as you build Secret protection Stop leaks before they start EXPLORE Why GitHub Documentation Blog Changelog Marketplace View all features Solutions BY COMPANY SIZE Enterprises Small and medium teams Startups Nonprofits BY USE CASE App Modernization DevSecOps DevOps CI/CD View all use cases BY INDUSTRY Healthcare Financial services Manufacturing Government View all industries View all solutions Resources EXPLORE BY TOPIC AI Software Development DevOps Security View all topics EXPLORE BY TYPE Customer stories Events & webinars Ebooks & reports Business insights GitHub Skills SUPPORT & SERVICES Documentation Customer support Community forum Trust center Partners View all resources Open Source COMMUNITY GitHub Sponsors Fund open source developers PROGRAMS Security Lab Maintainer Community Accelerator GitHub Stars Archive Program REPOSITORIES Topics Trending Collections Enterprise ENTERPRISE SOLUTIONS Enterprise platform AI-powered developer platform AVAILABLE ADD-ONS GitHub Advanced Security Enterprise-grade security features Copilot for Business Enterprise-grade AI features Premium Support Enterprise-grade 24/7 support Pricing Type / to search Sign in Sign up Appearance settings You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} DavesCodeMusings / irc2Frotz Public Notifications You must be signed in to change notification settings Fork 0 Star 0 Code Issues 0 Pull requests 0 Actions Projects Security and quality 0 Insights Additional navigation options Code Issues Pull requests Actions Projects Security and quality Insights main Branches Tags Go to file Code Open more actions menu Folders and files Name Name Last commit message Last commit date Latest commit History 11 Commits 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 README BSD-2-Clause license More items irc2Frotz -- Play interactive fiction over an IRC channel. irc2Frotz.js is a short little program that acts as an IRC client while getting it's input and output from an interactive fiction z-machine like Frotz. The result is anything typed in the IRC channel is interpreted as an action in the interactive fiction story. When starting a game from command-line with the supplied shell script: irc2Frotz$ ./startgame Suburbia.z8 In your IRC client, on channel Suburbia, you will see: Suburbia: To Live and Die in Suburbia Suburbia: An Interactive Fiction by David Horton Suburbia: Release 1 / Serial number 200712 / Inform 7 build 6M62 I6/v6.33 lib 6/12N Suburbia: . Suburbia: Sidewalk Suburbia: You are standing on the Sidewalk between a two-story, post World War II red Suburbia: brick bungalow with a nicely manicured front lawn, and a Quiet Neighborhood Suburbia: Street. Tall oaks cast dappled shadows all around, and the birds are Suburbia: exchanging pleasantries through song. There is a man standing on his front Suburbia: porch. He is not smiling. Suburbia: Dave: go south Suburbia: Quiet Neighborhood Street Suburbia: . Suburbia: Quiet Neighborhood Street Suburbia: You're standing in the middle of the street. Probably not the safest place Suburbia: to be, despite the lack of traffic at the moment. Suburbia: The idea is to allow multiple people to share in what would typically be a single-player adventure. If this sounds even remotely interesting, read on... You'll need the Node.js package for your OS. This should not be difficult. Node.js is popular enough that it should be 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. Refer to your operating system's pacakage management tool for details on setting one up. If you happen to run FreeBSD, see the venerable SDF website wiki at: https://wiki.sdf.org/doku.php?id=installing irc at home You'll need a Z-Machine. This is the tricky part, because it has to be a z-machine capable of outputing to a dumb terminal. For this, I used dfrotz on FreeBSD. dfrotz is "dumb Frotz" a version of Frotz tailored to dumb terminals. Unfortunately, dfrotz is not 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 tools for C programs installed as prerequisites. Here's the commands needed for FreeBSD: 1. git https://github.com/DavidGriffith/frotz.git 2. cd frotz 3. gmake dfrotz 4. su 5. cp dfrotz /usr/local/bin Compiling for Linux and other Unix-like OS should be similar. Replace gmake 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. Unless you want to play my short little sample game, you'll need to download an interactive fiction game in the z-machine format. Old Infocom Zork games are available from: http://infocom-if.org/downloads/downloads.html and plenty more can be found at: https://www.ifarchive.org/ In this exampe, we'll use the classic Zork I from infocom-if.org. 1. Open the zip file and extract ZORK1.DAT. 2. Copy ZORK1.DAT into the same directory as irc2Frotz.js 3. Run with the command "node irc2Frotz.js ZORK1.DAT" If all goes well, you'll see the following output: Using z-machine file: ZORK1.DAT Connecting to IRC server. Registering the ZORK1 channel. You'll need an IRC client. There are many choices for IRC clients. The previously mentioned SDF wiki page gives examples for setting up Pidgin and Thunderbird. Hexchat is another popular option. Once you have the client set up to attach to your IRC server, join the