Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!hrz-ws11.hrz.uni-kassel.de!news.th-darmstadt.de!nntp.zit.th-darmstadt.de!news.nacamar.de!www.nntp.primenet.com!nntp.primenet.com!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: TADS porting question
Message-ID: <erkyrathDzyA20.GCJ@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <erkyrathDzt02p.n09@netcom.com> <54q5m5$mfb@milo.vcn.bc.ca> <erkyrathDzuE1M.68z@netcom.com> <54uoe3$39p@milo.vcn.bc.ca> <erkyrathDzx9Hz.M4L@netcom.com> <5502op$6di@milo.vcn.bc.ca>
Date: Sun, 27 Oct 1996 19:56:23 GMT
Lines: 83
Sender: erkyrath@netcom2.netcom.com

Neil K. Guy (nkg@vcn.bc.ca) wrote:
>  Hm... you know, it sure would be nice if TADS 
> could also support fixed-width text, italics, centring, a couple sizes 
> (analogous to <FONT SIZE="+1" and -1 maybe, a few colours (usual DOS 16 
> colours perhaps). Guess that wouldn't be possible without breaking 
> existing runtimes though.

Not my department, anyway. :)

> : [...] There's still a lot of work left, though -- status line, 
> : preferences, standalones, and the mess of memory-size options, which is 
> : *another* thing users shouldn't have to deal with, but I can't think of a 
> : way to shield them from it...

>  Why not just set the stack and heap defaults to something pretty high? 
> Then the vast majority of games won't require any changes. 

I certainly want to do this. (The Legend Lives requires 48K of heap, and 
that's certainly not a whole lot compared to the rest of the program. 
MaxTADS has 200K of executable code alone.)

> For instance, 
> my game in progress is a 1 Mb .gam file. It needs TADS runtime to have 
> about 1.6 Mb of RAM allocated to it, and the stack and heap settings need 
> to be around 9000 and 8000 bytes, respectively. Since I don't know of any 
> games out there larger than mine at present, setting MaxTADS to those 
> settings should cover most eventualities for now.

Ok, 48K of heap and 10K of stack. Cheap.

But there *will* be games that require more, someday. Unless you're 
willing to declare TADS a dead development system? Didn't think so. :)

> Naturally you'd still 
> have a memory settings dialogue box available for those who want it, much 
> like MaxZip has the scrollback buffer size box, etc.

The problem is that, even as a fallback solution, I hate this. Scrollback
buffer size is one thing -- the default is always good enough. But with
memory, certain game files are going to require certain memory settings,
and it's really rude to let users find out about it when the game crashes.
(Try running Legend with insufficient heap. Type "hint". Oops.  Now type
"quit". Double oops. Type "quit" again...  your player is *screwed*. There
are ways to get out of this, but they're OS-specific and may not be known
to the novice.)

Furthermore, if the memory settings are buried in a preference dialog, 
nobody will ever look for them there; because there is an established way 
to set the memory partition for a Mac app, which is the Get Info dialog 
from the Finder. "I'm giving MaxTADS ten megs of memory, and it still 
says 'heap overflow!' Your interpreter sucks."

Besides, think about it. Memory setting are a property of the *game 
file*, not the interpreter. A game needs memory setting X. It's 
meaningless to choose it at the interpreter level -- as the previous 
paragraph attempts to demonstrate.

Unfortunately (again) there's no way to learn this information from the 
game file. That I know of. Free free to enlighten me.

I'm thinking of some goofiness in the "open game" file dialog... little 
controls along the bottom that you can set, which get saved as a resource 
in the game file itself. Of course this can't be saved permanently on a 
game file on a CD, but I can set up the CD game file *with* the resource.

Or... mm... maybe I should sneakretly check how much memory *has* been 
allocated with the Get Info dialog, and allocate a fixed percentage of 
that for the stack and heap. Hm. You know, the more I think about that 
the more I like it.

Heh heh heh.

(I can't allocate *all* of it, because my styled-text code does a lot of 
malloc(). But... yeah.)

--Z



-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
