I’m trying to test my game in both the Å-machine and the Z-machine, for compatibility purposes. And overall it’s been working great! In Frotz, for example, here’s how it looks (with text removed to avoid spoilers).
[ROOM]
[ROOM DESCRIPTION]
[ITEM DESCRIPTIONS]
In this state, you can’t do much yourself. The best you can do is LOOK around, EXAMINE something, or RECALL a person.
(Your score has gone up by one point.)
Exits: north west
>
Those last three are printed as divs of three different styles: @tutorial, @meta, and @exitbar. So far so good.
However, in dumbfrotz:
[ROOM DESCRIPTION]
[ITEM DESCRIPTIONS]
***MORE***
>
Where’d all my divs go? Even the room header is gone!
I’m not really expecting anyone to play IFComp entries in dumbfrotz, but it’s really convenient for testing, and a bit alarming that the divs are disappearing! Is this a problem in the Dialog compiler, or in the version of dumbfrotz I got through apt, or something else?
(I didn’t expect it to do the bold and italics, of course, but I expected it to print the text at least.)
(style class @example)
font-style: italic;
(program entry point)
Normal text (par)
(div @example) { Div text }
Normal text (par)
(div @example) { Div text }
Frotz:
Normal text
Div text
Normal text
Div text
[Hit any key to exit.]
Dumbfrotz:
Using normal formatting.
Loading mwe.z8.
Normal text
You might prefer to hook up Bocfel to Cheapglk. Or if you have node installed, then emglken or ifvms (zvm) would also work as cheap-mode interpreters. They both also have remglk modes, if you also want to test formatting etc (regtest.py is great for that.)
I was particularly hoping to use dumbfrotz because dgdebug is specifically designed to use the same random number generator, so that if you run your code in dumbfrotz and dgdebug with the same seed, you should get identical output. That would make my regression tests a lot simpler, since I don’t have to keep two different outputs in sync.
But if it can’t handle my tutorial prompts, then I’ll end up needing two versions anyway.
Two solutions come to mind. You can place conditionals on the styles to compile for dumbfrotz without them. You can also port Bocfel’s PRNG into dgdebug or vice versa.
Huh, good thought on conditionally compiling the styles. So I could make a file containing a line like (no styles) and then have the style definitions only be compiled if that isn’t there…