Z-machine release, Glulx debug: risks?

I’m currently writing a game that’s approaching the Z-machine limit in debug mode (x80000) . However, in release mode, it’s under x70000. I’m able to build from the command line in release mode easily enough to send a build to my testers. But I’ll also be doing a lot of testing with Zarf’s python scripts.

Now I can do some cheating where I comment out some tables (there’s a lot of parser abuse that is not critical to the main story) and re-build and be well under the x80000 limit–I’d just need to test certain commands other ways. But that’s obviously fiddly.

As I’m doing a lot of testing on my own, I’m wondering if there are any errors/“heisenbugs” that might pop up. If there’s anything in particular to be aware of, I don’t mind doing so if it isn’t too much.

The reason I want to release in Z-machine is that the parser abuse I have in mind may slow Glulx down a bit, especially when I hit the parser error rules.

I think I asked a similar question to this years ago on the forum, but I can’t seem to find it. So apologies if this is a duplicate. Thanks!

If you are using Inform 6, you can use -~S to turn off strict error-checking. This makes the game a bit smaller. Not sure if it’s possible in Inform 7.

1 Like

This seems to me to be unlikely to actually be problematic… do you have any actual examples of how Glulx would perform significantly worse?

Hmm, my current WIP has this problem, but I can’t really release it, because it’s for IFComp, and I haven’t fully been able to isolate the case.

I think that hammering the parser errors with a lot of regular expressions in a table can show a significant slowdown.

But it’s not critical. I’ve been able to find a way to eliminate/cut down certain tables only for my debug build, so that works well enough.

I’m probably missing something, but you can have someone look at your game privately for testing purposes - via PM or private email. Just so long as you don’t release the game publicly beforehand.

You know this, you’ve been doing it longer than me! :stuck_out_tongue:

If you’re willing to try something very experimental (which will probably cause errors), I’m working on this extension to make text and regular expressions substantially faster in Glulx:

Oh, now that’s an excellent extension…I’ve always wondered why Inform kept managing its own heap when Glulx had dynamic memory support.

Z-Machine compatibility. But this is something that would make much more sense to be rewritten to be Glulx only. This was a very straightforward extension until I got to the resizing functions (and I expect that’s where the remaining bugs are) because the template code expects blocks to be resizeable in place, but Glulx doesn’t allow for that. Instead a new larger block needs to be allocated, and then the references to the old one replaced.

Very cool.

I tried to use this with Counterfeit Monkey, but got this on the second turn:

Do you remember our name?

*** BlkValueRead: reading from index out of range: 0 in 5206411 ***
> andra
*** BlkValueRead: reading from index out of range: 1 in 5206363 ***

*** fatal error: Out-of-bounds memory access ***

Yeah I was originally working on this for CM. I’ve seen those errors, haven’t diagnosed them yet. Was hoping it might work for a simpler game, but haven’t really tested it enough yet.

1 Like