Newsgroups: rec.arts.int-fiction
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!cyclone2.usenetserver.com!news-out.usenetserver.com!howland.erols.net!europa.netcrusader.net!128.230.129.106!news.maxwell.syr.edu!news.cis.ohio-state.edu!xxxx1.sei.cmu.edu!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!news.umass.edu!world!meta
From: meta@pobox.com (mathew)
Subject: Re: Poll: Programming language or adventure scripting language?
User-Agent: MacSOUP/2.4.6
Sender: news@world.std.com (Mr Usenet Himself)
Message-ID: <1egro68.1hsf5myt6ej5sN%meta@pobox.com>
Date: Mon, 11 Sep 2000 22:06:45 GMT
References: <8parmg$j34$1@oravannahka.helsinki.fi> <8pau77$56r$1@news.lth.se>
NNTP-Posting-Host: ppp0c049.std.com
Organization: Evil Geniuses For A Better Tomorrow
Lines: 57
Xref: news.duke.edu rec.arts.int-fiction:78520

Magnus Olsson <mol@pobox.com> wrote:
> In article <8parmg$j34$1@oravannahka.helsinki.fi>,
> Joona I Palaste  <palaste@cc.helsinki.fi> wrote:
> >I myself
> >use normal ISO C, because that's more portable than the scripting
> >languages (at least if I distribute the game in source form), and it
> >gives me total control over the way the game works.
[...]
> But, anyway, the three major reasons for using a specialized IF language:
>
> 1) The object code is portable, whereas your C adventure will have to be
> recompiled on every new machine it's ported to. And far from all
> computers have a C compiler (many people play IF on things like Palm
> Pilots).
>
> 2) You save a lot of work with, say, Inform, since there already is
> an excellent object library and a good parser. No need to reinvent
> the wheel.
>
> 3) You save a lot of typing, since the syntax of the specialized
> languages is customized to make it easy to write adventures. I have
> no hard data on this, though. Perhaps some of the people who've
> ported Dungeon and Advent from Fortran to TADS, Inform and Hugo might
> care to comment on this?

I'd add another couple:

4) There are lots of things you can do with TADS or Inform that you
   can't do in pure ISO C.  Bold text, italics, cursor addressing,
   sound, graphics...

5) You save a lot of porting work.  Far from being more portable, ISO C
   is actually less portable than specialized IF languages because of
   I/O issues.

For instance, on systems like the Macintosh and Palm you have to worry
about how to put a windowing front-end on your ISO C, since there's no
command line.  For the Mac you can get simple stdio-in-a-window
libraries, but your game will then be really ugly and painful to play
compared to all the ones written in (say) Inform.  [ISO C file access
can also be problematic on the Mac unless you're really careful, because
the Mac doesn't have pathnames.]

Coding your C to *really* be portable is harder work than you think.
Much better to leverage all the work people have already done to put
native interfaces on all the IF virtual machine interpreters.

And even if I were writing an adventure in a general-purpose programming
language, I still wouldn't use C.  In fact, C is about the worst
possible programming language for the choice, because it has terrible
string handling, poor type-checking, no object orientation, and no
automatic memory management.


mathew
--
No taxation without representation!
