Giter Club home page Giter Club logo

zork's Introduction

Welcome to Dungeon.			This version created 11-MAR-91.
You are in an open field west of a big white house with a boarded
front door.
There is a small mailbox here.
>

DUNGEON (Zork I)

Public Domain source code to the original DUNGEON game (Zork I). Released to the PD by Infocom. Includes source files, headers, and information.

$ make

History of the C Implementation of Dungeon

This version of dungeon has been modified from FORTRAN to C. The original was written in DEC FORTRAN, translated from MDL. It was then translated to f77 for UN*X systems, from which it was translated to C. The C translation was done with the help of f2c, the FORTRAN to C translator written by David Gay (AT&T Bell Labs), Stu Feldman (Bellcore), Mark Maimone (Carnegie-Mellon University), and Norm Schryer (AT&T Bell Labs).

I. From the original documentation...

To: Dungeon Players From: "The Translator" Subj: Game Information Date: 8-OCT-80

This is the first (and last) source release of the PDP-11 version of Dungeon.

Please note that Dungeon has been superceded by the game ZORK(tm). The following is an extract from the new product announcement for ZORK in the September, 1980 issue of the RT-11 SIG newsletter:

"'ZORK: The Great Underground Empire - Part I' ...was developed by the original authors based on their ZORK (Dungeon) game for the PDP-10. It features a greatly improved parser; command input and transcript output files; SAVEs to any device and file name; and adaptation to different terminal types, including a status line on VT100s. Note: this is not the FORTRAN version that has been available through DECUS. This version has been completely rewritten to run efficiently on small machines - up to 10 times as fast as the DECUS version.

...ZORK runs under RT-ll, HT-ll, or RSTS/E and requires as little as 20K words of memory and a single floppy disk drive. The game package, consisting of an RX01-format diskette and an instruction booklet, is available from Infocom, Inc., P.O. Box 120, Kendall Station, Cambridge, Ma. 02142."

ZORK(tm) is a trademark of Infocom, Inc. It is available for several popular personal computers as well as for the PDP-ll.

Summary

Welcome to Dungeon!

Dungeon is a game of adventure, danger, and low cunning. In it you will explore some of the most amazing territory ever seen by mortal man. Hardened adventurers have run screaming from the terrors contained within.

In Dungeon, the intrepid explorer delves into the forgotten secrets of a lost labyrinth deep in the bowels of the earth, searching for vast treasures long hidden from prying eyes, treasures guarded by fearsome monsters and diabolical traps!

No DECsystem should be without one!

Dungeon was created at the Programming Technology Division of the MIT Laboratory for Computer Science by Tim Anderson, Marc Blank, Bruce Daniels, and Dave Lebling. It was inspired by the Adventure game of Crowther and Woods, and the Dungeons and Dragons game of Gygax and Arneson. The original version was written in MDL (alias MUDDLE). The current version was translated from MDL into FORTRAN IV by a somewhat paranoid DEC engineer who prefers to remain anonymous.

On-line information may be obtained with the commands HELP and INFO.

II. DEC FORTRAN to f77 Conversion (17-nov-81)

The conversion from DEC FORTRAN to Unix f77 was done by Randy Dietrich, Lynn Cochran and Sig Peterson. Much hacking was done to get it to fit in the limited address space of a PDP-11/44 (split I/D). Suffice it to say that by leaving out the debugging package and not linking in the f77 i/o library they managed to get it to run.

III. PDP to VAX (dec-85)

Based on the work of Randy, Lynn and Sig, Bill Randle folded in the full save/restore functions and the game debugging package (gdt) into the pdp version to create a Vax/Unix version. This version also uses f77 i/o, thus eliminating the extra speak and listen processes needed on the pdp.

IV. Cleanup I (11-dec-86)

John Gilmore (hoptoad!gnu) cleaned up the source files by moving most of the common declarations into include files and added comments from the original (FORTRAN or MDL?) source. His efforts are greatly appreciated.

V. Cleanup II (9-feb-87)

Bill Randle ([email protected]) added the pdp dependencies back into the Vax source files with #ifdefs in order to have just one set of sources. Previously, there were two sets of source: one for the pdp and one for the Vax. In addition, a shell escape of the form !cmd was added and the wizard can enter the gdt without having to recompile the source. Finally, a man page was generated, based on the dungeon.doc file.

VI. f77 to C (11-mar-91)

Ian Lance Taylor ([email protected] or uunet!airs!ian) used the f2c translator to generate C source code. The resulting code was modified to remove the FORTRAN I/O library, to add simple more processing, and to change the format of the database file. Andre Srinivasan ([email protected]) help test it. Jonathan Mark (uunet!microsoft!jonm) made it work under MS-DOS and Microsoft C.

zork's People

Contributors

chandlerswift avatar devshane avatar jaredledvina avatar jwflory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zork's Issues

Which License?

Hi,
I'm packaging zork (as dungeon, re: trademarks) for openSUSE, and "Public domain" is not in the list of recognized licenses... which one from https://spdx.org/licenses/ do I put in my spec file?

Zork crashing on "open mailbox" command

compiled with "make"

tintor@tintor0:~/zork/zork$ ./zork
Welcome to Dungeon. This version created 11-MAR-91.
You are in an open field west of a big white house with a boarded
front door.
There is a small mailbox here.

n
You are facing the north side of a white house. There is no door here,
and all the windows are barred.
open mailbox
Segmentation fault (core dumped)

Latest version 3.2B

The history section doesn't mention the original MDL was ported to DEC FORTRAN by Bob Supnik.

Which is important, because he has the newer version 3.2B from 1996 available on his home page (still in DEC FORTRAN) which is newer than this C port which is based on his older version 2.5.6.
http://simh.trailing-edge.com/games/dungeon.zip

I know there is a 3.2B C port available, but this requires an additional library Glk and the even newer C++-17 port requires at least Gcc-7 which makes it less portable to especially older Unix systems.
I could compile this version on AIX with XL C successfully.

Could the changes be merged into this version, maybe allow to build version 2.5.6 or 3.2B by an option in the makefile?

Edit:
There is also a GNU G77 FORTRAN version of 3.2B available (needs dos2unix conversion and removal of ^L - sed -i 's/\o14//g' ).
https://www.ifarchive.org/if-archive/games/source/dungn32b.zip

But I had no luck in converting it with f2c (probably GNU extensions?) and Ubuntu has no more f77, but gfortran which also doesn't like the code (I have no experience with Fortran).

Ring Bell does not at Gates of Hades does nothing

I try to ring the bell outside the Gates of Hades and nothing happens. I was under the impression that ringing the bell would make it glow red hot and the spirits would get scared of me. Ive tried lighting the candles and reading the good book and nothing happens there either. Is this a bug or am I missing something?

You are outside a large gateway, on which is inscribed:

        "Abandon every hope, all ye who enter here."

The gate is open.  Through it you can see a desolation, with a pile of
mangled corpses in one corner.  Thousands of voices, lamenting some
hideous fate, can be heard.
The way through the gate is barred by evil spirits, who jeer at your
attempts to pass.
>ring bell
Ding, dong.
>light match
One of the matches starts to burn.
>light candles with match
The candles are lit.
The match has gone out.
>turn off lamp
The lamp is now off.
>read book
                Commandment #12592
Oh ye who go about saying unto each other:  "Hello sailor":
Dost thou know the magnitude of thy sin before the gods?
Yea, verily, thou shalt be ground between two stones.
Shall the angry gods cast thy body into the whirlpool?
Surely, thy eye shall be put out with a sharp stick!
Even unto the ends of the earth shalt thou wander and
unto the land of the dead shalt thou be sent at last.
Surely thou shalt repent of thy cunning.
>e
Some invisible force prevents you from passing through the gate.
>odysseus
Wasn't he a sailor?
>ring bell
Ding, dong.
>open bible
The book is open to page 569.
>close bible
As hard as you try, the book cannot be closed.
>version
V2.7A

Game map is acting weird

This may be my own misunderstanding of how Zork is supposed to work, but the game map seems to differ greatly from illustrated maps I'm finding online. Not only that, but it seems entirely inconsistent in its geometry. For instance, if east from Room A is Room B, then west from Room B should be Room A, but it's somewhere else entirely. And this is happening with almost every room for me.

If I'm missing something please tell me!

Bugs in the block initialization & elsewhere; some which were inherited from the Fortran version.

I'm retranslating the Fortran version to C99, and have also updated my branch of your archive to C99, while progressively bringing them into convergence with each other and the Fortran original (which is also undergoing update to Fortran 2018).
The process has uncovered several bugs in both the Fortran original and the 1991 C translation.

In particular, there are several inconsistencies in the initializations done in blkdata.f (which corresponds to your parse.h with INIT defined).
There are mismatches in the following places:
∙ (1RS, 29560): Mismatched value (it should be 30400); 29560 corresponds to 2RRS.
∙ (3RPAP, 256656): Mismatched value (it should be 25656).
∙ (1RO, 0): Mismatched value (it should be 24000).
∙ (1RY, 4000): Mismatched value (it should be 40000).
∙ (3RMIN, 21175): Mismatched value (it should be 21174).

The first two of these inconsistencies were corrected by the 1991 translation to C,
and are not present in the C version.
The ‟1RS” in (1RS, 29560) was already changed to ‟2RRS”.
This involved words starting in ‟HOURS⋯”, but did not affect them, since the mistake was in the comment, not the code.
The 256656 in (3RPAP, 256656) was already changed to 25656, is for words beginning in ‟PAPER⋯” and affects the code.

The remaining inconsistencies, which affect words that start in ‟INTO⋯”, ‟CLAY⋯”, ‟CRIMIN⋯”, respectively,
have all been inherited by the translations of Zork into C and are present in your copy, as well.
For now, they've been kept intact in our copy, but will soon be corrected.

The ability to see this was obscured by the fact that the 1991 C translation mangled the layout of the initializations, relative to the layout listed in the comments, and failed to keep the comments aligned with the code. A translation project should not be considered complete until the comments are also translated and realigned; and the 1991 translation left this unfinished. This is one of the reasons why.

In most of the *.c files, the function header comment for the first function definition was misplaced at the top of the file, separated from the function it is in reference to, and should be moved down back next to the function.

In gdt.c, at one point, a file output has eqo misaligned as eqo[j + k * 200 - 201] at 200, when it should be aligned as eqo[j + k * 220 - 221] at 220. This was a error made in the 1991 C translation. The error will mangle the display of the object table during debug mode.

Also, in gdt.c, after L35500 should be
printf("Old= %c New= ", cevent_1.cflag[j - 1] ? 'T' : 'F');
to match the Fortran original. This omission was an error, as can be seen by the fact that the "fflush(stdout);" statement was left intact ... with nothing left to flush. This affects the display of clock interrupt events during debug mode.

Readme improvements

The readme file says:

Public Domain source code to the original DUNGEON game (Zork I).

The game known as "Zork I" was a microcomputer adaptation of the first part of the original Dungeon/Zork, see https://en.wikipedia.org/wiki/Zork_I
The PDP-10 version was called just "Zork" or "Dungeon" (actually both, as per 1977 source code). Supnik called his Fortran translation for the PDP-11 "Dungeon".

This version of dungeon has been modified from FORTRAN to C. The original was written in DEC FORTRAN, translated from MDL.

The MDL version was the original.

Support systems without file I/O

Zork could be a quite appealing program to port to freestanding systems, as it is an interesting demo without requiring fancy interfaces like video. However, the file I/O is not available in those, but it could easily be replaced by embedding the data and performing memory I/O.

Disable shell escapes?

I am adding this to my ssh server, but I don't want players to be able to execute arbitrary commands. I've got it mostly solved by a script that sets a very limited path and sets the shell to /bin/false, EXCEPT the !echo command can still be executed. It is possible to echo text to either of the .dat files, or create new files. I don't like that. I doubt if echo can be used to create an executable virus file etc. but I still don't like it. Do you have any ideas? I don't understand the code well enough to look for this feature and change it.

room name

Hi, I like that shell version much more then this dosbox version. Thank you for that.

But I miss a room name.
I can't orientate without it.
Is it possible to get the room name somehow?

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.