I've been trying to get a larger project to work correctly in the java-
based zag interpreter, using version 1.06. I've written a minimal
game which crashes in multiple ways. I believe that most of the issues
relate to memory allocation. I'm not sure why it generates a unicode-
related error. I'm posting this in the hope that the project
developer, Jon Zeppieri might be able to use this as a test case in
revising the interpreter, or in case other people run across the same
issues and eventually try to find a solution on usenet.
In playing around a bit more, it looks like using regular expressions
can work under zag. Writing "after reading a command: do nothing."
also does not crash zag. However, the combination of "after reading a
command" and then processing that command as indexed text generates
errors.
- Jack Welch
=================================
The Laboratory is a room. "A stark white lab."
A book is a kind of thing. Books are proper-named.
The redbook is a book in the laboratory. The printed name of the
redbook is "Little Crimson Riding Cape".
[This should allow you to give the command "echo sometext" and have
"sometext" printed on the next line.]
After reading a command:
let T be indexed text;
let T be the player's command;
if T matches the regular expression "^echo":
replace the regular expression "^echo\s*" in T with "";
say T;
say paragraph break;
the rule succeeds.
========================
Here's some sample output when run in Zag:
zagtest
An Interactive Fiction by Jack Welch
Release 1 / Serial Number 100102 / Inform 7 Build 5Z71 (I6/v6.31 lib
6/12N)
Laboratory
A stark white lab.
You can see Little Crimson Riding Cape here.
>look
*** Run-time problem P52: This interpreter does not support Unicode.
Laboratory
A stark white lab.
>look
*** Memory ran out with too many simultaneous indexed text conversions
***
*** Run-time problem P49: Memory allocation proved impossible.
*** Memory ran out with too many simultaneous indexed text conversions
***
>echo bob
*** Memory ran out with too many simultaneous indexed text conversions
***
*** Run-time problem P49: Memory allocation proved impossible.
*** Memory ran out with too many simultaneous indexed text conversions
***
That's not a verb I recognise.
It generates a Unicode error because Zag hasn't been updated since
2005, and it doesn't support Unicode.
For modern I7 games, this is a fatal error, because a lot of the
text-manipulation code works by opening an internal memory stream and
then running the standard print calls. The current I7 library does
this with a *Unicode* internal memory stream, because that's easier
than keeping track of whether the game prints Unicode characters.
So if the library doesn't support Unicode, large swatches of the
indexed-text feature are broken, and you're hosed. I can't tell you
exactly what swatches those are -- I suspect it includes any attempt
to convert regular text to indexed text.
So the answer is, unfortunately, Zag needs some work.
--Z
--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
Thanks for the enlightenment, Andrew.
I suppose if there's a silver lining here, it is that the interpreter
at least *knows* that it doesn't handle unicode....
To decide whether unicodage is disabled:
(- ~~glk_gestalt(gestalt_Unicode, 0) -)
... and I can write an alternate and more limited version of certain
procedures to detour around this interpreter limitation.
Cheers,
Jack