Newsgroups: rec.arts.int-fiction
Path: gmd.de!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!EU.net!ieunet!tcdcs!news.tcd.ie!rwallace
From: rwallace@tcd.ie (russell wallace)
Subject: Re: Adventure language language
Message-ID: <Cwsysr.EEr@news.tcd.ie>
Sender: usenet@news.tcd.ie (TCD News System )
Organization: University of Dublin, Trinity College
References: <Cwr2or.HAp@acsu.buffalo.edu>
Date: Tue, 27 Sep 1994 19:14:50 GMT
Lines: 74

In <Cwr2or.HAp@acsu.buffalo.edu> goetz@cs.buffalo.edu (Phil Goetz) writes:

>I have a major decision to make.
>As a result of vast personal hubris, and a refusal to acknowledge
>my advancing age and feebleness (turning 28 tomorrow, my back
>can't take sitting at a terminal all day, and my eyesight is failing),
>I said in my dissertation proposal that I would use SNePS to create a
>crude adventure language (powerful in some ways, but I'm not going to
>trim off the rough edges until I get my degree).

>I have 3 options:

>1.  Write it in LISP.  This is good because SNePS 3.0 is already mostly
>written in LISP (70 pages of code), and because one member of my
>committee (Stu Shapiro) loves LISP.  The existing code base is not a huge
>advantage, though, because the vast amount of code I would have to write
>might dwarf it.

>This is bad because LISP, even compiled LISP, is slow.
>Not as slow as you might think if you use LISP arrays.  LISP
>manipulation of integers takes about 10 times as long as C++;
>LISP subroutine calls take about twice as long, according to the
>recently completed Goetz Benchmark Test ;)  I view the fact that
>LISP takes >10M before any program is loaded as a minor inconvenience.
>I assume that by the time this is done we'll all have 32M systems.
>(I just have to figure out how to plug 2,048 RAMcards into my Apple ][+.)

Machine efficiency issues for text adventures are indeed a minor
inconvenience, but Lisp does have disadvantages in terms of portability,
the lack of compile time checking (for large projects this is pretty
bad) and the fact that it's hardly ever used commercially.  OTOH, some
people happen to like Lisp; up to you.


>2.  Port it to C++.  This is good because C++ is fast and has the
>same object-oriented capabilities as LISP with CLOS.  Also, everybody
>has C++ so the program could be ported to other machines easily.
>Also, I will have an example program to show employers who want to
>know I can write C++.

>This is bad because I have to rewrite everything.

However, the amount of work you'd have to redo would surely be pretty
small compared to the total you have still to do.  Also, C++ has very
good development tools.


>3.  Port it to Modula-3.  One person in particular tells me debugging
>is easier in M3 than in C++.  I don't know if there is a step-trace
>debugger for GNU M3, though.  M3 compiles to C, so portability is good.

In terms of capabilities, M3 and C++ are equivalent; however, C++ is
much more widespread, there's a greater range of development tools
available, and employers are much more likely to ask for C++ experience.
Unless you have a strong personal preference for M3, I'd use C++.

>I also considered option 4:  Port it to Prolog.  Ordinary SNePS 3.0
>might port to Prolog, but I want to do really weird things with
>the mechanism that selects the next rule to fire, and I couldn't
>do it well in Prolog.  Besides, Prolog makes my head ache.

Mine too :)  Actually, Prolog is designed for writing expert systems,
and there are people who swear by it for that job (the one time I tried
to use it, I ended up swearing at it instead :))  But it's not
particularly designed for adventure games, and I'd think twice before
using it for a large software project unless you like it and are very
familiar with it.



--
"To summarize the summary of the summary: people are a problem"
Russell Wallace, Trinity College, Dublin
rwallace@vax1.tcd.ie
