What's the minimum screen width for a Z-machine interpreter?

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…)

2 Likes

Ozmoo on Commander X16 supports the interesting screen mode that has 20 columns by 15 rows.

(We’ve made sure PunyInform works well with this resolution as well)

3 Likes

The Apple 2 was 40x24 characters, unless you bought the fancy-ass 80-column card.

(Yes, it was called the “80-column card”. No, there was no such thing as a “48-row card”. Yes, the letters got really skinny at 80x24.)

1 Like

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.

There is no minimum screen size in the standard.

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.

There’s no way to just read a byte of memory at an address? That seems pretty limited.

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).

1 Like

There is section 8.4, but it is only a suggestion: “The screen should ideally be at least 60 characters wide by 14 lines deep.”

2 Likes

Yes, but smaller ones do exist.

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. :stuck_out_tongue:

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.

1 Like