Detecting screen width?

Is there a predicate to detect the screen width? dgdebug has an argument to specify the width; is there a way to detect what it is? I have some (fixed pitch) output that looks awful if it line-wraps; if my game is being played under Å-machine or Ozmoo on a 40-column C64, I’d love to be able to reformat it so it fits.

1 Like

The Z-Machine writes the width into the memory header, so you can probably access that? I have no idea about the Å-machine though.

Firstly I have no idea about Ozmoo and the c64 - so this is all aamachine only. Secondly I have no idea about css styles and the like other than a 10 minute Google.

I haven’t figured out how to change the screen width within a story. However I do use one of the following to get around this.

I create a new style class (I have two that I use).

(style class @ascii)
	line-height: 1.05em;
	font-size: 0.75em;


(style class @ascii)
	white-space: nowrap;
	line-height: 1.0em;

Then wrap my fixed pitch stuff:

(descr *)
	(div @ascii) {
	(fixed pitch)

The first one simply reduces the font size, the second stops the word wrapping - but you can still scroll left/right to see the whole text.