I’m building a game in Inform6 (though not sure if this is related) with PunyInform (same).
I’m planning on releasing as a slightly-trimmed z3 game and the regular z5 game. The z3 version works fine.
The z5 version started responding to “X SOMETHING_NOT_IN_DICT” with “A look in that direction reveals nothing new”, which is the response for looking in a direction. Turning on actions & routine tracing, it seems it thinks the noun is indeed the Directions object.
But: it appears the problem is memory. With some binary-search-debugging, I found that that when I comment out enough text that my “readable memory” dipped below 32k, the behavior went away. Zooming in, with 32764 bytes, it does the expected thing “I don’t know the word ‘ZZZZ’”), but with 32768 bytes, it does the “I think you’re using the Directions object”. It’s not related just to examining, other things like Eat tried to take the directions object.
So, it seems like there’s some tripwire on memory use I’m hitting. I get the memory info on compilation using “inform -s”, and I when it hits 32k or more, the problem starts.
32768 bytes readable memory used (maximum 65536) ←- doesn’t work
32764 bytes readable memory used (maximum 65536) ←- does
Here’s the full output of compilation with -s
In: 17 source code files 15067 syntactic lines
23049 textual lines 693909 characters (ISO 8859-1 Latin1)
Allocated:
2700 symbols 1094473 bytes of memory
Out: Version 5 “Advanced” story file 1.260307 (149K long):
26 classes 327 objects
146 global vars (maximum 233) 2707 variable/array space
116 verbs 777 dictionary entries
253 grammar lines (version 3) 437 grammar tokens (unlimited)
126 actions 31 attributes (maximum 48)
33 common props (maximum 61) 61 individual props (unlimited)
95076 bytes of Z-code 968 unused bytes stripped out (1.0%)
139999 characters used in text 78922 bytes compressed (rate 0.563)
96 abbreviations (maximum 96) 799 routines (unlimited)
12426 instructions of Z-code 7606 sequence points
32768 bytes readable memory used (maximum 65536)
152544 bytes used in Z-machine 109600 bytes free in Z-machine
I’m not sure what layer to begin more debugging here. I’m sure there must be z5 games that use more readable memory, so I very much doubt I’m hitting any kind of zmachine format limit. It happens in the same way in a few different interpreters.
Any advice on where to dig in would be very welcome.