Google Grupper støtter ikke lenger nye Usenet-innlegg eller -abonnementer. Historisk innhold er fortsatt synlig.

Adventure writing language

Sett 9 ganger
Hopp til første uleste melding

M Walker

ulest,
24. apr. 1996, 03:00:0024.04.1996
til
I have just about finished writing a program which allows people to write
adventure (as we used to call it in the 'good old days') games.

It is based upon a program called 'The PAW' for those who remember it.

I would appreciate some comments on the program, bug reports, possible
additions, etc., since I want to have a marketable system, one day.

Also, any comparisions as to what people prefer - the way of doing things
that I have chosen, or other systems available right now, would be more
than welcome.

If anyone would like a copy of the prog, which is for Windows95 (sorry, no
other versions available right now - there'll be a Win3 version in around July)
then can you email me as
ff...@enterprise.net

and I'll be happy to send you a copy of the prog as it stands - including the
minimal documentation that exists right now.

Mark Walker.

Matthew Amster-Burton

ulest,
24. apr. 1996, 03:00:0024.04.1996
til
M.S.W...@cs.cf.ac.uk (M Walker) wrote:

>I have just about finished writing a program which allows people to write
>adventure (as we used to call it in the 'good old days') games.

>If anyone would like a copy of the prog, which is for Windows95 (sorry, no


>other versions available right now - there'll be a Win3 version in around July)

Since it's for Win95 only, I assume it is something of a "visual"
tool...right? Could you tell us a little more about the system--I'm
not familiar with PAW.

Matthew

John Elliott

ulest,
24. apr. 1996, 03:00:0024.04.1996
til
In article <4lltov$k...@nntp4.u.washington.edu>, Matthew Amster-Burton (mam...@u.washington.edu) wrote:

: Since it's for Win95 only, I assume it is something of a "visual"


: tool...right? Could you tell us a little more about the system--I'm
: not familiar with PAW.

This is PAW as in the Spectrum adventure writing system?

<ftp://ftp.dcc.uchile.cl/pub/OS/sinclair/snapshots/p/paw128k.zip>

(you'll need Z80.EXE to run it).


-------------------- http://sable.ox.ac.uk/~sjoh0132/ ---------------------
John Elliott |BLOODNOK: "But why have you got such a long face?"
|SEAGOON: "Heavy dentures, Sir!" - The Goon Show
:-------------------------------------------------------------------------)

M Walker

ulest,
25. apr. 1996, 03:00:0025.04.1996
til
John Elliott (ell...@teaching.physics.ox.ac.uk) wrote:
: In article <4lltov$k...@nntp4.u.washington.edu>, Matthew Amster-Burton (mam...@u.washington.edu) wrote:

: This is PAW as in the Spectrum adventure writing system?

: <ftp://ftp.dcc.uchile.cl/pub/OS/sinclair/snapshots/p/paw128k.zip>

: (you'll need Z80.EXE to run it).


Yes, it is PAW as in the Spectrum (et al.) adventure writing system

For those who don't know it, you create a series of tables (Locations, Messages
etc.), and then Action Tables (Process and Response tables in PAW) to tie them
all together, along with the possible ways of invoking the entries in the
table.

A short example might help.

GET * AUTOG
DONE

here, if the user types 'get', with anything (*) as a noun, the system will
attempt, using the 'AUTO-Get' routine, to pick up the object

how about

UNLOCK DOOR AT 1
CARRIED 45
MESSAGE 10
SET 15
PLUS 30 10
SWAP 4 6
DONE

If the player types 'unlock door', and it AT location 1, and is carrying the key
(object #45), print message 10 ('you unlock the door'), set flag 15 (which says
whether the door is unlocked or not), add 10 to flag 30 (the player's score),
swap object 4 (unlocked door) for object 6 (locked door).

Of course, just cause object 45 here is a key, doesn't mean it ALWAYS has to be
a key.

Some stats:
There is a maximum of : 65500 Objects
Locations
Messages
Action Tables
Entries in Each Action Tables
Words with unique numbers

There are 6 types of word that the parser understands:
verb, noun, adverb, adjective, preposition and conjunction

so you can have a sentence of

(adverb) verb (noun1(adjective1)) (preposition (noun2(adjective2))) (conj.)


Oh, and it's not a port of the PAW - it is a complete re-write, just using the
'way the PAW does things' mostly.


Mark

Adam J. Thornton

ulest,
25. apr. 1996, 03:00:0025.04.1996
til

In article <DqF2I...@cf.ac.uk>, M Walker <M.S.W...@cs.cf.ac.uk> wrote:
>UNLOCK DOOR AT 1
> CARRIED 45
> MESSAGE 10
> SET 15
> PLUS 30 10
> SWAP 4 6
> DONE
>If the player types 'unlock door', and it AT location 1, and is carrying the key
>(object #45), print message 10 ('you unlock the door'), set flag 15 (which says
>whether the door is unlocked or not), add 10 to flag 30 (the player's score),

Are you aware that there are two systems, TADS and Inform, that allow this
sort of thing without keeping track of object numbers, message numbers and
all that jazz? That allow inheritance and let you feel like you're writing
in C++ rather than in assembler?

Even in adv.t--the original library for TADS, which is inferior in every
way except economy to WorldClass.t--you just set door.isopen = nil,
door.islocked = true, and door.mykey = goldkey, where goldkey is an object
from the keyItem class. It's really quite easy.

>Oh, and it's not a port of the PAW - it is a complete re-write, just using the
>'way the PAW does things' mostly.

I really must inquire why. It seems that if you're going to go to the
trouble to reinvent the wheel, you'd want to invent a well-balanced,
chromium-spoked mag wheel with whitewall tires rather than a
slightly-out-of-round solid-rubber lawnmower wheel. Actually, that's not
quite true; I can see where writing such a program would be a useful
exercise. What I can't see is any reason I or anyone else who uses Inform
or TADS would want to switch to this system. Even with a good macro
processor on the front end to hide the implementation details (object
numbers, for starters) from the programmer, it would be, it seems to me,
only equivalent to TADS or Inform without the familiarity and without the
libraries. It's the libraries that really make the tool, in my opinion.

I also don't see why it's Win95 only (I hope I have the right system in
mind) as it seems to be a text tool.

I hope I've completely missed the point and that there is in fact something
really cool about the system that I didn't see.

Adam
--
ad...@phoenix.princeton.edu | Viva HEGGA! | Save the choad! | 64,928 | Fnord
"Double integral is also the shape of lovers curled asleep":Pynchon | Linux
Thanks for letting me rearrange the chemicals in your head. | Team OS/2
You can have my PGP passphrase when you pry it from my cold, dead brain.

Jesse Mcgrew

ulest,
26. apr. 1996, 03:00:0026.04.1996
til

M Walker (M.S.W...@cs.cf.ac.uk) wrote:
[snip]
: Yes, it is PAW as in the Spectrum (et al.) adventure writing system

: For those who don't know it, you create a series of tables (Locations, Messages
: etc.), and then Action Tables (Process and Response tables in PAW) to tie them
: all together, along with the possible ways of invoking the entries in the
: table.

[examples snipped]

From what you've said, it sounds a lot like LADS (programming/lads on GMD).
In LADS, you define a table of rooms, objects, messages, implicit actions,
and explicit actions. An explicit action would be like:

UNLOCK DOOR INRX 3 HASX 6 X<>Y 4 5 MSGX 2 ELSE MSGX 1 .

Meaning... if the player types "unlock door," is in room 3, and has item 6
(presumably a key), exchange objects 4 and 5 (locked and unlocked doors) and
print message 2 ("You unlock the door."). If they are not in room 3 or they
do not have item 6, print message 1 ("I don't see that here.").

Implicit actions are like that, only without the verb-noun part (they run
every turn).

--
Jesse "Monolith" McGrew
http://www.concentric.net/~jmcgrew

David Librik

ulest,
26. apr. 1996, 03:00:0026.04.1996
til

Jmc...@cris.com (Jesse Mcgrew) writes:

>M Walker (M.S.W...@cs.cf.ac.uk) wrote:
>[snip]
>: Yes, it is PAW as in the Spectrum (et al.) adventure writing system

>: For those who don't know it, you create a series of tables (Locations,
>: Messages etc.), and then Action Tables (Process and Response tables in
>: PAW) to tie them all together, along with the possible ways of invoking
>: the entries in the table.
>[examples snipped]

>From what you've said, it sounds a lot like LADS (programming/lads on GMD).
>In LADS, you define a table of rooms, objects, messages, implicit actions,
>and explicit actions. An explicit action would be like:

> UNLOCK DOOR INRX 3 HASX 6 X<>Y 4 5 MSGX 2 ELSE MSGX 1 .

This all looks very familiar; the original example of PAW (now deleted,
unfortunately) especially. The Text Adventure System from The Alternate
Source had a similar format.

All of these derive directly from Scott Adams' adventure interpreter
coding system. When "Pirate's Adventure" was published in the December
1980 BYTE, it led curious computerists to puzzle out just what those
pages of cryptic numbers meant, and to decode how Adams' adventure system
worked. I was one of them, and I promptly spent a lot of enjoyable
programming time writing an adventure system of my own that cloned
Scott's. And I was not the only one; indeed, many people with more
persistence than me apparently published theirs. They all show their
unmistakable lineage.

The way Scott Adams managed to cram a whole adventure into a 16K machine
was with the following format:

Nouns -- numbered 1-254
Verbs -- numbered 1-254
Rooms -- numbered 1-254
Items -- numbered 1-254
Messages -- numbered 1-50, 100-255

An "action list" made up of 16-byte entries that looked like this
(each capitalized word is 1 byte, and will be explained below).

Noun# Verb#
5 copies of: Operand ConditionCode <-- these are the CONDITIONS
4 copies of: ActionCode <-- these are the ACTIONS

The Noun# and Verb# are taken from the list of nouns and verbs. This
particular entry in the "action list" will only be considered when the
player has typed the command with the specified Noun and Verb.

The ConditionCodes are numbers that correspond to particular "conditions" --
for instance, code #1 might be "IF THE PLAYER IS DEAD", condition #2
might be "IF THE PLAYER IS IN ROOM # x", condition #3 might be, "IF
THE PLAYER IS HOLDING ITEM # y". The "x" or "y" -- the code for an item
or a room or whatever -- is stored as the Operand, which comes just before
the ConditionCode. If the ConditionCode was 0 that meant "no test" --
remember, there had to be five Conditions, whether or not you needed them
all, in order to keep the entry 16 bytes long!

The ActionCodes describe actions which are taken if all the conditions
(described by the ConditionCodes) are true. For instance, action #51
might be "KILL THE PLAYER", action #52 might be "MOVE TO ROOM # x",
action #53 might be "GIVE THE PLAYER ITEM # y". The "x" or "y" here
also comes from the Operands back in the ConditionCodes -- since you
didn't usually have five conditions, you had a few bytes left over
to store Operands for Actions. (Actions #1-50 and #100-255 just
printed the Messages with those code numbers. Messages are the
things that the adventure says to the player ... like "THERE ARE JEWELS
ENCRUSTED ON THE GOLDEN CHEEZ WIZ.")

Anyway, it all comes together like this. Suppose:
The word "light" is verb #12
The word "torch" is noun #4
The "unlit cane torch" is item #49
The "cigarette lighter" is item #20
The "lit cane torch" is item #98
The message "You light the torch. It is now burning brightly." is #6.

The pre-defined ConditionCode for "IF PLAYER IS HOLDING ITEM #x" is #2
(abbreviated HOLD? in the explanation below)
The pre-defined ActionCode for "EXCHANGE ITEMS #y AND #z" is #60.
A place-holder ConditionCode or ActionCode (used to fill up space so
everything's the right length) is #0. (I abbreviate it as "Null".)

So:
12 4
Verb-"light" Noun-"torch"

49 2 20 2 49 0 98 0 0 0
unlit-torch HOLD? lighter HOLD? unlit-torch Null lit-torch Null Null Null

60 6 0 0
Exchange Print-Message#6 Null Null

This line runs when you type verb 12 (light) and verb 4 (torch). It checks
if you're holding item 49 (the unlit torch) and item 20 (the cig. lighter).
If so, it exchanges the unlit torch (49) with the lit torch (98), grabbing
those numbers out of the preceding Null conditions' opcodes, so that you're
now holding the lit torch. Then it prints message #6 which tells you that
you lit the torch.

Cool, eh? You've just encoded a whole lot of IF-THENs, variable assignments,
and printing in just 16 bytes. Since practically all Adventure "structure"
consists of nothing but code like this, you can fit endless amounts of
game logic into very little space.

Any time you see design like this in an adventure-writing language, you
know it's a descendent of Scott Adams' system.

Getting a bit philosophical, you might say that the coding described above,
with its "action codes" and "condition codes," was a lot like the machine
language for a very weird and specialized computer chip! The program that
interpreted the code, and therefore "ran" the adventure game, was called
an "adventure interpreter," and it could be seen as an *emulator* for the
imaginary, weird computer chip. Most of the adventure development systems
based on this Scott Adams model were, therefore, *assemblers* which
translated a rather cryptic set of text abbreviations directly into the
ConditionCodes and ActionCodes. My own project, which was never finished,
was to write an "adventure *compiler*" that could take a description in
a higher-level descriptive language and turn it into this "machine code."
Since I was 16 at the time and didn't know anything about compiler design,
I finally gave up after having to reinvent a whole lot of Parsing Theory!

Did you read all that? Let's give a BIG CHEER for TADS and Inform and
all the rest of our fine easy-to-use modern tools!

- David Librik
lib...@cs.Berkeley.edu

p.s. The sample ConditionCode's and ActionCode's that I gave are hypothetical.

Thomas Nilsson

ulest,
29. apr. 1996, 03:00:0029.04.1996
til

Adam J. Thornton wrote:
>
> In article <DqF2I...@cf.ac.uk>, M Walker <M.S.W...@cs.cf.ac.uk> wrote:
> >UNLOCK DOOR AT 1
> > CARRIED 45
> > MESSAGE 10
> > SET 15
> > PLUS 30 10
> > SWAP 4 6
> > DONE
> >If the player types 'unlock door', and it AT location 1, and is carrying the key
> >(object #45), print message 10 ('you unlock the door'), set flag 15 (which says
> >whether the door is unlocked or not), add 10 to flag 30 (the player's score),
>
> Are you aware that there are two systems, TADS and Inform, that allow this
> sort of thing without keeping track of object numbers, message numbers and
> all that jazz?

At least 2! Depending on the way you define "without keeping track of object numbers..." Bob
Newells <a href="ftp://ftp.gmd.de/if-archive/info/whichsys.zip/">Which IF-Authoring System is
Better FAQ"</a> lists 10, of which I think only AGT requires numbers (and even that can be
remedied by an auxillary tool).

Thomas

--
"Little languages go a long way..."
(ThoNi of ThoNi&GorFo Adventure Factories in 1985)
------------------------------------------------------------------------
Thomas Nilsson Phone Int.: (+46) 13 12 11 67
Stenbrötsgatan 57 Phone Nat.: 013 - 12 11 67
S-582 47 LINKÖPING Email: th...@softlab.se
SWEDEN alan-r...@softlab.se for info
------------------------------------------------------------------------

PAZ SALGADO

ulest,
29. apr. 1996, 03:00:0029.04.1996
til

David Librik wrote:

>
> Cool, eh? You've just encoded a whole lot of IF-THENs, variable assignments,
> and printing in just 16 bytes. Since practically all Adventure "structure"
> consists of nothing but code like this, you can fit endless amounts of
> game logic into very little space.

> Did you read all that? Let's give a BIG CHEER for TADS and Inform and


> all the rest of our fine easy-to-use modern tools!

Well, I must to say one thing to this subject, TADS and Inform are pretty
for making standard libraries and even standard *playing worlds*, all of their O-O
marvellous capabilities make very ease a lot of the work, but there is a terrible
problem about them.

Just because TADS and Inform are very high level I-Fs language are almost
imposible of traslate. I mean, I'm from Spain and I'm very grateful surprised with
both language capabilities, but I will not going to use because the english parser
doesn't be able to *parse* correct spanish syntax. But there are more trouble, if I can
rewrite the parser in order to *understand* spanish I must to look in whole files
I will want to use for the english words and change one by one all of them. And in
Spain there is no only one language (spanish), but four language (spanish plus
three oficial regional lenguage). So if I want to use *standard* files from other
people I must to search the english word in them FOUR TIMES!

If Inform or TADS have simbolic numbers like PAW's system, all the information
will be in just only one or two sites easy to traslate. I think that is the reason
every I-Fs programmers in spain use like-PAWs systems.


Meliton Rodriguez.


P.D: Perhaps some of the programmers of TADS or Inform will think about these
issues of traslation and no english persons (Heavens! In this gruop I have seen an
article defending the difficults of blind to play I-Fs!!).

Adam J. Thornton

ulest,
29. apr. 1996, 03:00:0029.04.1996
til

In article <3184B2...@tidos.tid.es>,

PAZ SALGADO <ja...@tidos.tid.es> wrote:
> Just because TADS and Inform are very high level I-Fs language are
>almost imposible of traslate. I mean, I'm from Spain and I'm very grateful
>surprised with both language capabilities, but I will not going to use
>because the english parser doesn't be able to *parse* correct spanish
>syntax. But there are more trouble, if I can rewrite the parser in order
>to *understand* spanish I must to look in whole files I will want to use
>for the english words and change one by one all of them. And in Spain
>there is no only one language (spanish), but four language (spanish plus
>three oficial regional lenguage). So if I want to use *standard* files
>from other people I must to search the english word in them FOUR TIMES!
>
> If Inform or TADS have simbolic numbers like PAW's system, all the
>information will be in just only one or two sites easy to traslate. I
>think that is the reason every I-Fs programmers in spain use like-PAWs
>systems.

You know, this is an objection that I hadn't considered.

I still don't like it much. I mean, yes, you can port games to other
languages much more easily with PAW. But what you end up with is still a
confusing syntax and a limited parser. Albeit the language is less stilted
than in a straight translation.

I must admit, though, I have no idea what the solution, if any, is. A
straight port of Inform? It might be doable, but it's certainly a major
problem (as far as Spanish dialects go, well, I guess the answer is just to
pick one. Inform users, I think, end up speaking English rather than
American because of Graham's library) to do so.

Maybe a language-module front-end to a PAWs-like system?

I don't know. It's certainly something to think about.

Magnus Olsson

ulest,
30. apr. 1996, 03:00:0030.04.1996
til

In article <3184B2...@tidos.tid.es>,
PAZ SALGADO <ja...@tidos.tid.es> wrote:
> P.D: Perhaps some of the programmers of TADS or Inform will think about these
>issues of traslation and no english persons (Heavens! In this gruop I have seen an
>article defending the difficults of blind to play I-Fs!!).

I've understood that people are working on translations of TADS and
Inform. I don't remember into which languages. As you say, it must be
a lot of work changing every single message...

--
Magnus Olsson (m...@df.lth.se)

0 nye meldinger