devshane / zork Goto Github PK
View Code? Open in Web Editor NEWThe DUNGEON (Zork I) source
The DUNGEON (Zork I) source
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!
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?
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.
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.
The readme file says "the original DUNGEON game (Zork I)". I believe the use of "Zork I" here is incorrect. The original PDP-10 Zork, which Supnik called Dungeon, was never called Zork I. Zork I was the first in a series of games for microcomputers, the first three of which roughly comprise the same game as the original PDP-10 Zork.
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
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)
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.
Hey @devshane,
Thanks so much for hosting this project on your account. I was hoping to create a Homebrew formula but, need a release to point formula to (Homebrew/homebrew-core#14681).
Is there any chance you'd be willing to cut a Github release on this project?
What version number you chose, I'll update my Homebrew formula to match.
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).
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.
Zork II and Zork III? Any hope?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.