GithubHelp home page GithubHelp logo

kcartlidge / z-machine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adeimantius/z-machine

0.0 3.0 0.0 100.37 MB

A Version 3 C# implementation of the Zork Interpreter Program (ZIP) by Infocom

C# 99.97% Batchfile 0.03%
zmachine infocom

z-machine's Introduction

Z-Machine

A Version 3 C# implementation of the Zork Interpreter Program (ZIP) by Infocom

The Z-machine was created on a coffee table in Pittsburgh in 1979. It is an imaginary computer whose programs are adventure games, and is well-adapted to its task, implementing complex games remarkably compactly. They were still perhaps 100K long, too large for the memory of the home computers of their day, and the Z-machine seems to have made the first usage of virtual memory on a microcomputer. Further ahead of its time was the ability to efficiently save and restore the entire execution state. The design's cardinal principle is that any game is 100% portable to different computers: that is, any legal program exactly determines its behaviour. This portability is largely made possible by a willingness to constrain maximum as well as minimum levels of performance (for instance, dynamic memory allocation is impossible).

The Z-Machine Standards Document was first released in 1997 based on an internal document called the "Z-Language Interpreter Program", a virtualized machine that would allow any user to program their machine to run games written in Z-Language, an object based language that relied on locations in memory for access once a file was read into memory. By having a virtual Z-Machine read through memory as if it was reading from its own ROM, it would execute calls and jumps in a predictable way. The first game to be executed successfully in the Z-Language was Zork I: The Great Underground, which I have in the main folder, stored as a .DAT file. The entire game is written in a single byte-array which contains the logic flow, the save state controllers, and the text, encoded in an ASCII-like form called "ZSCII", which was necessary to preserve the uniformity of character size in memory. The game file will be modified during execution, which allows it to be self-contained much like a game cartridge.

Files like Zork I are generally called "story files". Approximately 130 story files exist, and Infocom released a compiler in 1993 so that these programs could be generally executable without the use of a prorprietary Z-Machine Interpreter like the one I have created. The compiler allowed anyone to create their own story files, and since 1993 many many more games have been written in the Z-Language. Z-Machines went through several iterations as technology improved, adding colour, sound, images, and the ability to use game controllers (such as mice) instead of standard text input. Still, there are two primary implementations of the Z-Machine, version 3, which has full support for text and save states, and version 6, which also supports visuals, sound, and use of a mouse. The first byte of any story file will give the Version number. Though my version 3 interpreter does not support these additional features, it allows for expansion, and I encourage anyone who wants to know more about how machine processes or data storage and retrieval works to give it a shot.

I included the primary documentation files I used as reference, and more information is available here: http://inform-fiction.org/zmachine/standards/index.html

z-machine's People

Contributors

adeimantius avatar

Watchers

James Cloos avatar K Cartlidge avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.