Status Line Color Change in Glulx

I’m going to provide some full code here because I’m not sure what parts might matter to figure out how to easily do what I want to do. What I have here is a simple status line modification that shows a location in red it hasn’t been visited in the Z-Machine:

Chapter - Location Navigation

Section - Colored Text

To say red reverse:
	turn the background red.

Section - Directional Information

Table of Various Directions
chosen path	abbrev	spacing
up	"U "	" "
northwest	"NW"	" "
north	" N "	" "
northeast	"NE"	" "
east	" E"	" "
west	"W "	" "
southeast	"SE"	" "
south	" S "	" "
southwest	"SW"	" "
down	"D "	" "

To say (path - a direction) abbreviation:
	choose row with a chosen path of path in the Table of Various Directions;
	say abbrev entry.
To say (path - a direction) spacing:
	choose row with a chosen path of path in the Table of Various Directions;
	say spacing entry.
Section - Compass Rose

To say rose (path - a direction):
	let place be the room path from the location;
	if the place is a room, say "[if the place is unvisited][red reverse][end if][path abbreviation][default letters]";
	otherwise say "[path spacing]".

To say top rose:
	say "[rose up][rose northwest][rose north][rose northeast]".
To say middle rose:
	say " [rose west] . [rose east]";
To say bottom rose:
	say "[rose down][rose southwest][rose south][rose southeast]".

Table of Fancy Status
left	central	right
" [parent region]"	""	"[top rose]"
" [if in darkness]Darkness[otherwise][location][end if]"	""	"[middle rose]"
" Rooms visited: [number of rooms that are visited] / [number of rooms]"	""	"[bottom rose]"

Section - Build Status Line

Rule for constructing the status line:
	fill status bar with the Table of Fancy Status;
	say default letters;
	rule succeeds.

All I want to do is have that same thing work in Glulx and, to be sure, the only part that’s problematic is this:

To say red reverse:
	turn the background red.

if the place is a room, say "[if the place is unvisited][red reverse][end if][path abbreviation][default letters]";

Literally just the small color change I want to do.

I looked at this: Font colors in Glulx. I also checked out the Glulx Status Window Control mentioned there. But everything seems very complicated, and rarely to work, when all I want to do is replicate the above but for Glulx.

I don’t mind digging in more but before I started trying to untangle what did and didn’t work, is there some easy solution to this that I’m not glomming onto?

1 Like

This is a phrase from Basic Screen Effects which is only defined for Z-Machine.

You have to use an extension to set colours. With Glulx Text Effects you would set the background colour of special-style-1 and then switch to that style. (However for the status window you’d also have to use Flexible Windows as GTE doesn’t set styles for grid windows.) Or you can use Glk Text Formatting to be able to change colours on the fly like in the Z-Machine, however it has less interpreter support: currently only Windows Glk, but Quixe and Lectrote support should be coming soon.

1 Like

Yep, I was familiar with the extensions but, as you note, those don’t work for status line which was where my troubles are. I’m playing around more the Glulx Status Window Control that I mentioned and I’m seeing glimmers of getting things to work after I sort through the tangle of info in that thread I referenced.

Right now I’m thinking this might be a little more trouble than it’s worth particularly if interpreter support could be an issue, which admittedly I wasn’t considering as much. It might be better to just come up with a textual representation of “not yet visited” rather than rely on a color.

You could use italics, which should work everywhere.

Ah, yes, fair point and a good one. I think I got mono-focused on recreating what I had without really considering if what I had was all that necessary.

It’s a bit of a shame we never got the momentum to get Gargoyle’s extensions for changing colours in Glulx more widely accepted ( I put it into Windows Glulxe and Windows Git, and it’s there by default in Gargoyle (though still without the gestalt selector, is that right, Dannii?) but that’s about where it stopped.

1 Like

I added full support to Gargoyle. The problem there is organising a new release.

I’ve also been working this past month on adding support to GlkOte/Quixe/Lectrote. It should be there for this year’s IFComp (not that I expect anyone will have used it) and hopefully soon after for Lectrote and Parchment.

I made an issue for Angstsmurf’s Spatterlight hoping it would only need changes to the dispatch layer (like for Gargoyle) but it didn’t actually have internal support yet.

Which other Glk implementations are really under current development? CocoaGlk I assume, but who and where?

1 Like

As far as I know, the only active work on CocoaGlk is for the OSX Inform 7 front-end, which is done by Toby Nelson these days ( That’s probably about it for active Glk implementations.