However, I am now worried. I am about 1/8-1/10 done programming it
(I'm at about 4900 words in my source file) and I've already hit a
size limitation.
One requirement is that the game has to be written for the Z-Machine.
No Glulx (which he specifically states in the comments under the
competition post on the site - someone else asked if they could use
Glulx).
How big a story file will compile to the Z-Machine? I don't
understand, I guess, why my story file is so large. 4900 words may
seem like a lot, but the scope of it is very very small. Smaller than
any of the Zork games, and aren't those all Z3?
I may be showing my ignorance here with the way I'm asking the
question, so any explanation whatsoever would be helpful. Thanks.
The first factor is that Inform itself has a fair amount of overhead.
The basic library itself occupies 137kb of Z-machine space. You can test
this by creating the smallest possible game ("X is room.") and compiling
it for release.
The second factor, I believe, is that some types of code use up more
Z-space than others. As a result, the raw number of words in a game is
not necessarily a reliable gauge of the size of the finished file. I
don't know which types of code use up more space -- someone else will
have to address that.
I can tell you, however, that my current WIP (for the same competition)
has 18,800 words of source. It also uses five extensions. The .z8
release version is 275kb.
So I guess I'd say, don't panic. Just keep writing. If you've just hit
256kb, 512kb is a long ways off.
--JA
Thanks. I'll keep going and will refer to the cover of my Hitchhiker's
Guide to the Galaxy as my blorb increases in size.
This thread may be of interest:
... and specifically this quote from Zarf's reply to the OP:
> MAX_STATIC_DATA is where I6 array data is stored (in the I6 compiler)
> before being written out to the final game file. So if you need to
> crank this up, then you're creating a lot of I6 arrays.
>
> Unfortunately this doesn't pin down the problem, because many
> different I7 features are implemented as I6 arrays. Look for:
>
>
> - very large tables
> - many-to-many relations
> - heavy use of indexed text and other dynamic allocation
>
Thanks, Mike - I'm aware of the kind of error you are referring to,
actually, as I encountered it quite a bit in my other (larger) project
(which is Glulx and which I set to some crazy maximums due to my using
various gigantic tables). This, though, is a story file size issue and
not a memory allocation issue, unless there is a relationship between
the two that I don't understand? Anyway, my .z8 file compiles into a
308kb file, so I was apparently hitting the 256kb .z5 limitation:
[-----------------------------------------------]
Packaging up for Release - Ran Out of Space
The application ran your source text through the Inform 7 compiler, as
usual, and it found no problems translating the source. This process
results in what's called a story file, which is a program for a small
virtual computer. Unfortunately, the story file for this source text
was too big for that virtual machine: there's just too much of it.
Inform can produce story files for several different virtual
computers, and the one used by the current project can be selected
using the Settings panel. If you are currently using the version 5 Z-
machine, try trading up to version 8. (For instance, two of the worked
examples on the Inform website are large enough that they can only be
compiled to version 8.)
[-----------------------------------------------]
I'm just worried that when all is said and done I will be beyond
512kb, which is the .z8 limitation as far as I know.
Of course, another way to solve this problem is to write the game in I6.
I thought that my WIP would be the last game I wrote in that language,
but the contest you alluded to came along. I have no worries at all
about hitting any Z-machine limits. :)
--
Poster
www.intaligo.com I6 libraries, doom metal, Building
sturmdrangif.wordpress.com Game development blog / IF commentary
Seasons: fall '09 -- One-man projects are prone to delays.
Someday perhaps. I'm just starting to get the hang of I7 now, though,
and I have a couple of busy months ahead of me in many respects so I
won't have time to learn I6 and finish writing the game in that
language in that amount of time. :(
Are you compiling with "Use memory economy"? That will free up some
code/text space.
vw
Nope. Adding that helped a little bit, thanks. It took 24kb off the
blorbed file.
> Nope. Adding that helped a little bit, thanks. It took 24kb off the
> blorbed file.
Not sure if you've solved this issue, but -- do you need this to be a
blorb file for the ocmpetition entry?