Resurrecting Zag

I have started to give the Glulx interpreter Zag a much needed make over. I have changed the GUI theme and turned on font anti-aliasing, to give Zag a more pleasant look. I have added the missing date/time functions. And most importantly I have created native launchers for Windows and Mac.
A lot has changed under the hood, too, to make future extensions of Zag easier. The Swing GUI is now separate from the interpreter, to allow the use with other GUIs. I’m thinking about an Android port, for example.

A first test version can be downloaded here. (Windows and Mac included).

The sources are here.

I’m planning to make a proper release, once I’m finished with the refactoring. But I’m interested, how much interest in Zag exists in the community.

Development builds can be downloaded here.



PS: I am in contact with David Turner (the current maintainer of Zag), who graciously has offered to turn the project over to me.

I don’t know if anything similar already exists, but I think that an Android version might be interesting.

Something similar does exist indeed. It’s called twisty and was created by Google no less.
But my goal is to have a single cross-platform code base, instead of the many implementations that exist now.

It’s not the same. Twisty is a z-machine interpreter. Zag is a glulx-machine interpreter. I don’t know any glulx-interpreter written for Android (Zag for Android would be the first), but I may be wrong, so if you know any, let me know. Thank you!

I didn’t notice that twisty isn’t Glulx compatible. Then no, I don’t no any other Android Glulx interpreter.
After I’ve finished with the code cleanup, I’ll see what I can do about an Android port of Zag.

Development seems to have frozen on Gargoyle, which has been the flagship for Glulx in a lot of ways because it has all the features on all platforms. So thanks a lot for updating Zag, an interpreter I’d not even heard of.

I tried it on the Mac. Being soundy, I immediately missed sound. The interpreter reported that it supported sound, but I couldn’t hear any.

The fonts look nice.

I notice the window doesn’t give any feedback if it stalls due to more text being printed than it can handle. It just waits for you to hit a key. Maybe there should be a visual or text signal of some sort at such moments?

The launcher’s a bit rudimentary at the moment. It doesn’t do drag and drop, and if you choose ‘open’, it doesn’t seem to let you access the particular Mac windows view which lets the user see all their devices/favourites, which tends to be how people find their files quickly.

I understand this is a test release but I just gave feedback as if it was a finished product needing more work. It looks pretty good.


Thanks for the feedback.
I wish I could give better support for MacOS, but I have no access to a Mac. So for the time being, this is all I can offer. Maybe some Mac user can help out here?
There should be a small ‘[More]’ at the bottom of the window in a gray panel. I can see it on Windows.
I haven’t tested sound at all so far. I’m still busy fixing bugs and adding missing functions.


It was announced recently that they’re working on it…

it’s good you’re working on Zag. I used to play game with it in the past, but soon it became less appealing than gargoyle…

Some feedbacks:

  • On linux, when I browse for a game, if I scroll with the slide bar,I get some visual artefacts:

It doesn’t give them when using the mouse wheel to scroll.

good luck

The file chooser is a system dialog, so I have no control over any display problems with that. But I can add the gblorb extension.
I did change the look&feel to native appearance. And it does work on Windows. I will have a look at it on Linux.
What kind of Linux are you using?

Thanks for the feedback.

What kind of Linux are you using?

it’s linux mint, using KDE, but I think there is only a gtk toolkit look and feel.

I was planning to install Mint anyway. So this is a good excuse as any other :slight_smile:.

In the meantime I’m still fixing bugs. The file functions are quite a mess.

I’m sure a lot of us would kiss you for a working Android Glulx terp.
If you succeed in doing that, please make an .apk file available for download–not everyone uses Google Play.

I had a look at Twisty. And their solution doesn’t look so complicated. I might be able to st… ah lend something from them.
The apk would be available for direct download of course. Actually I’m not all that happy to pay 20 bucks for the privilege of submitting something free to Google Play.

You can also submit free and open source software to f-droid:

That’s a good idea. I shall do that.

I’m still busy fixing bugs. And there’s still a lot to do.

I’m considering to provide nightly builds for download, if anyone wants to follow my progress. I’m still interested in feedback and bug reports.
And if anyone has experience with development on MacOS, I could use some help with that.

Any way to turn OFF antialiasing? I use zag instead of gargoyle because I cannot stand antialiased fonts. It’s an odd thing to be against, I know, but I’d like to turn them off.
I can always recompile it if that’s what it takes, but an option in settings might be nice.
I started grepping through your code and never saw the phrase ‘antialias’ or ‘anti-alias’ anywhere. Where is antialiasing being enabled from?
I figured it out.
Antialiasing is enabled on what is currently line 297 of “zag-swing/src/main/java/org/p2c2e/zing/swing/”, it looks like:

FontRenderContext context = new FontRenderContext(null, true, true);

To disable font smoothing and achieve the ‘ugliness’ that I love, change that line to read:

FontRenderContext context = new FontRenderContext(null, false, true);

I’d still like a nice little tickmark or button in the menus, but I solved it well enough for me.
( Of course, this is your project, not mine, so disregard this request if you feel differently :wink: )

I have experience with MacOS in that I have compiled X11 programs for MacOS, and I have an iMac I can use. It usually runs linux, but I can boot into OS X Snow Leopard if needed, for science.

P.S. You might want to mention that it uses maven 3 to compile. It may be obvious to most java developers, but I am not a java developer and I was trying to use Maven 2 and was wondering why I was having trouble :blush:

To anyone who wants it, here’s the latest (as of June 19) version of Zag, with antialiasing disabled for my personal enjoyment:
And the latest version WITH antialiased fonts, with no modifications by me: … ag2-aa.jar

I always use Zag because I don’t like the look and feel of Gargoyle, I like the ease of customization of Zag, GtkGlk hasn’t been updated for unicode support, XGlk is even older, and I use Debian Linux.

And If you are going to install Mint, Try the MATE desktop. It’s basically GNOME 2, but improved :smiley:
(At least, I like it. But then again, I like blocky fonts.)

Also, compiled a version that uses the Nimbus theme. The GTK theme currently has problems (main window scrolling up and down whenever a character is typed, so only every other character is actually read as input), or I would have uploaded that too. This version is in a 7-zip archive and contains both an antialiasing and a ‘no antialiasing’ version. … s-theme.7z

The on-screen fonts are Tahoma and Unifont.

One more thing: trying to save games crashes the interpreter after the save dialog closes.

Thanks for the in-depth comments. I’m glad someone is using Zag. That makes the whole effort more fun.

If you could have a look at the Mac OSX app and suggest improvements, that would be very helpful. I had thought of buying my own Mac, but even the smallest one is sooo expensive. It sucks, that there’s no legal way to emulate Mac OSX.

I’ll add a toggle for the anti-aliasing. Sorry for not thinking of it myself. I know, that some people don’t like it.

And I did install Mint, but I had to use Xfc. My computer doesn’t like anything else.

Do you have by any chance experience with creating Debian packages? I’m thinking about submitting Zag to Debian, Ubuntu and the likes. But I haven’t done this for a few years now, and I forgot most of it.