Giter Club home page Giter Club logo

zawk's Introduction

zawk

An Awk implementation of the Infocom Z-Machine. Supports Z3 files (e.g. Zork 1, Hitchhikers Guide to the Galaxy, etc).

Updated to also support Z1 and Z2 game files.

Works with original Awk, GNU gawk, and mawk.

Beta version: Note that save and restore are not yet supported.

Example

./zawk zork1.z3
ZORK I: The Great Underground Empire
Copyright (c) 1981, 1982, 1983 Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc.
Revision 88 / Serial number 840726

West of House
You are standing in an open field west of a white house, with a boarded front door.
There is a small mailbox here.

>open mailbox
Opening the small mailbox reveals a leaflet.

>get leaflet
Taken.

>read leaflet
"WELCOME TO ZORK!

ZORK is a game of adventure, danger, and low cunning. In it you will explore
some of the most amazing territory ever seen by mortals. No computer should 
be without one!"

Still to do

  • Save and restore is still to be added
  • Word wrap is not implemented, so words can be split across lines
  • Numerous other features and enhancements

zawk's People

Contributors

njm64 avatar sijnstra avatar

Stargazers

Roygbyte avatar  avatar Tom Horn avatar

Watchers

 avatar

Forkers

sijnstra

zawk's Issues

Weirdness with random numbers

I noticed that the random code doesn't look quite right - I think it is off by 1, as in it can't be 0.
I haven't raised a PR for my hunch because I can't get it to behave correctly anyway. If I run czech.z3 I get the following as the only failed test:

Misc [345]: test...random

ERROR [347]  Expected 148; got 152

And if I run ziptest.z3 I get this kind of output, also clearly incorrect:

Randomness check - Type 2-100 or just RETURN to skip this test.
>2
Expected number: 5000

1: 10000
2: 0

Randomness check - Type 2-100 or just RETURN to skip this test.
>2
Expected number: 5000

1: 10000
2: 0

Randomness check - Type 2-100 or just RETURN to skip this test.
>3
Expected number: 3333

1: 5006
2: 4994
3: 0

Randomness check - Type 2-100 or just RETURN to skip this test.
>3
Expected number: 3333

1: 5047
2: 4953
3: 0

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.