• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    C
  • License
    zlib License
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple Z-Machine implementation in a single C file. Now with online multiplayer! :)

MojoZork

>read leaflet

Hello sailor!

This is an implementation of Infocom's Z-Machine. The Z-Machine is a virtual machine that's something like a high-level CPU. To keep their games portable and easier to write, Infocom's games all use this fake processor and ship with a platform-specific Z-Machine "emulator" ... so a game could run wherever someone had implemented the Z-Machine.

This project is just for fun; everyone should write this at some point as an educational activity. If you want a serious Z-Machine implementation, there are certainly better ones out there (I personally recommend "Frotz" and there are many others, too).

This program currently supports most of the Version 3 Z-Machine. This is enough to play the vast majority of Infocom's catalog. Later Infocom games used version 4, 5, and 6 of the Z-Machine, and those will currently not run here. Most modern Interactive Fiction is built with a tool called Inform and usually targets version 5 at the lowest; these games currently don't work with this project. Maybe later.

Activision, who acquired Infocom in the 1990's, gives out Zork I, II, and III for free, so I've included Zork I's data files with this project. If you want to see Zork I run through from start to finish, you can run a pre-written script to complete the entire game from the command line, like this:

./mojozork ./zork1.dat ./zork1-script.txt

If you want to write your own Z-Machine, there is an "official" specification on how to implement it, written by people that spent significant time reverse engineering the originals from Infocom, and extending the ecosystem with new tools. You can find that specification here.

As usual, Wikipedia offers a wonderful rabbit hole to fall down, too, in their Z-machine article.

MultiZork

On top of the MojoZork code, there is a telnet server called multizorkd that lets several people connect to the same game and play it as a multiplayer experience. Each player has their own inventory and can move independent of others. This probably only works on Linux/Unix systems, but the single-player mojozork program should work on just about anything.

You can play MultiZork right now by pointing a telnet client at multizork.icculus.org (or running nc multizork.icculus.org 23).

A post on my Patreon explains the motivations and technical details of multizork. If you like this, please consider throwing in a dollar so I can keep doing wild things like this!

libretro core

Ever want to play Z-Machine games under RetroArch? Now you can. The libretro core handles all the tapdancing to make text-based games run in a graphical window, and can be played with a keyboard (in RetroArch focus mode), or with a mouse or game controller on an included virtual keyboard.

Enjoy!

--ryan.

More Repositories

1

physfs

A portable, flexible file i/o abstraction.
C
517
star
2

SDL_sound

An abstract soundfile decoder.
C
140
star
3

mojoshader

Use Direct3D shaders with other 3D rendering APIs.
C
139
star
4

mojoAL

An SDL2-based implementation of OpenAL in a single C file.
C
107
star
5

fatelf

Universal binaries for Linux.
C
63
star
6

sdlamp

A tutorial on writing a simple media player with SDL.
C
45
star
7

mojosetup

A standalone installer for Linux software.
C
43
star
8

manymouse

Simple, cross-platform library to handle multiple mice.
C
38
star
9

steamshim

A workaround for GPL software that wants to use the Steamworks SDK.
C++
37
star
10

2ine

An OS/2 "emulator" for Linux.
C
30
star
11

DirkSimple

A dirt-simple Dragon's Lair player
Assembly
27
star
12

theoraplay

A small C library to make Ogg Theora decoding easier.
C
22
star
13

smpeg

Loki Software's MPEG decoding library.
C++
15
star
14

mojoelf

Load ELF binaries from a memory buffer.
Python
10
star
15

duke3d

The icculus.org port of Duke Nukem 3D.
C
8
star
16

inline-reddit

Provide reddit RSS feeds with images inlined.
PHP
7
star
17

fte

Ryan's fork of FTE (originally at http://fte.sf.net/)
C++
6
star
18

buildengine

icculus.org's port of Ken Silverman's Build Engine
C
6
star
19

vbslacker

An abandoned attempt to build an open source Visual Basic.
C
5
star
20

altrace

An OpenAL debugging tool.
C
5
star
21

1pass

A 1Password-compatible password management tool for Linux.
C
5
star
22

buildutils

icculus.org port of the Build Engine utilities.
C
4
star
23

icculusgopher

A simple gopher server.
Perl
4
star
24

gradius

A quick-and-dirty experiment to ask: would Gradius be better with mouse support?
FreeBasic
4
star
25

shadowwarrior

icculus.org Linux port of 3DRealms' Shadow Warrior.
C
4
star
26

smjpeg

Loki Software's Motion JPEG library.
C
4
star
27

palantir

A portable VNC client built on SDL and SDL_net.
C++
4
star
28

twisty-little-utilities

A bunch of simple little life-saver utilities.
Shell
4
star
29

loki_update

Loki Software's update tool.
C
3
star
30

icculusfinger

A powerful Intenet finger system.
Perl
3
star
31

mallocmonitor

Some incomplete tools for tracking memory allocations.
C++
3
star
32

mojocrash

A cross-platform problem-reporting tool.
C
3
star
33

gdb-dataplugins

An experiment in adding data visualization plugins to GDB.
C
2
star
34

palmpdb

Palm Database (PDB) Access Library
C
2
star
35

descent3-bugs

Bug reports for the Linux and Mac versions of Descent 3.
2
star
36

imessage_archive

Archive iMessage chats to an email inbox.
Perl
2
star
37

steamtags

Categorize your Steam library in a web interface.
PHP
2
star
38

toby

A learning experiment with TurtleGraphics.
C
2
star
39

telegard

Abandoned attempt at porting Telegard to Linux
Pascal
2
star
40

mojobasic

Attempt to write an LLVM frontend to BASIC.
C++
2
star
41

xmpp_archive

Ryan's ejabberd/JEP-0136, MySQL to Maildir archiver.
Perl
2
star
42

al_osx

A (now-obsolete!) OpenAL implementation for Mac OS X.
C
2
star
43

alextreg

Code that drives the OpenAL extension registry.
Perl
2
star
44

arcade1up-lcd-marquee

Code to drive the Icculus Arcade1Up LCD marquee project.
C
2
star
45

mojodds

Simple DirectDraw Surface (.DDS) decoder routines.
C
2
star
46

soundboard

Software for a custom soundboard
C
1
star
47

mod_offload

An Apache module to offload bandwidth to caching servers.
C
1
star
48

loki_utils

Loki Software's library of common helper functions.
C
1
star
49

twitterlosses

A script to alert you when people unfollow you on Twitter.
PHP
1
star
50

mojomerge

A cross-platform compare-and-merge utility. wxWidgets!
C++
1
star
51

netqmail

C
1
star
52

libappdir

An experiment in making apps not write to $HOME
C
1
star
53

libdimmer

An extremely incomplete attempt at software to drive theatrical lighting systems hardware.
C
1
star
54

saysomethingnice

The code that powered quicksaysomethingnice.com
PHP
1
star
55

icculusnews

The news queue manager at icculus.org
PHP
1
star
56

loki_patch

Loki Software's loki_patch
C
1
star
57

mojopatch

A standalone tool for updating applications in the field.
C
1
star
58

ioAL

Never-really-started OpenAL implementation
C
1
star
59

icculustweets

Republish tweets on a website or as RSS feed, and archive them to an email folder.
PHP
1
star
60

daddymax

An extremely incomplete attempt at software to manage theatrical lighting systems.
C++
1
star
61

jbbs

An initial attempt at a "modern" BBS, written in Java.
Java
1
star