In Dialog, unlike in Inform, I have to lay out my status bar manually. Which means I’m now trying to assess how much space I have to work with.
For common Z-machine interpreters—where window size matters, so not screen readers and the like—what’s the smallest number of characters to fit on a line? Historically I would assume a good old-fashioned 80×25, but in the era of smartphones with portrait orientation, I don’t know if that’s still the case.
(I feel like I’ve asked this same question in the past, but I can’t find it now…)
I was able to find a very narrow font for Parchment, and it now fits 56 characters in the status window (on my phone, it’s possible another phone might have even less though.)
Wider than the retro computers above, but perhaps the most narrow that a Glulx game will get played on?
Oh, just noticed you said you’re using Dialog. Does it really not expose the screen dimensions? The lack of any assembly mode is pretty annoying at times.
Annoyingly, no it does not. For laying out a status line you can either give exact sizes (“20 characters”) or relative ones (“40% of the width”), but there’s no way to know the actual size you’re working with.
My status line is going to be the room name on the left and a progress bar on the right, and I’m trying to figure out how much space the progress bar should get. Ideally it should be 20 characters at minimum, but I think 40% will work in general.
EDIT: The reason it doesn’t expose this information by default is because it has other compilation targets than the Z-machine, and they don’t necessarily guarantee a monospace font in the status bar.
If the interpreter is doing its job, the z-machine screen height and width are exposed in the header by the byte values at address 0x20 and 0x21 respectively.
Unfortunately, the language I’m working in doesn’t let me access the header information directly, since its other compilation targets don’t expose that particular detail.
Yeah, it’s a higher-level language that compiles to different virtual machines, and deliberately tries to not allow platform-specific code (which “read a byte at this memory address” would be).
Assuming at least 20x10 should be fairly safe. Anything smaller than that isn’t going to be very pleasant to use.
I guess technically the minimum would is 0x0 but good luck making sense of that output. Also, you’d need an out of band method for displaying [MORE] prompts, which would be triggered every…uhhh…zero characters. The infinitely larger 1x1 is still not much better.
I suppose you could say a screen reader has a 0×0 display, but that’s why I ruled that out specifically in my first post.
Anyway, thanks everyone, this has been helpful! I think if I allocate 40% of the status bar for the progress display, that should work out in most of these cases. I’m expecting most people to play it in a web browser, where I can use CSS to fine-tune the display to my heart’s content; I just want it to also look good for people who download the zblorb to play in their favorite offline interpreter.