I wanted to try to complete this exercise, and the interpreters I’ve tried so far will run the game file but don’t seem to register mouse activity (even for the provided example solution’s code). Note that this exercise requires compiling to Z-machine version 6.
Are there any modern (or even old) interpreters that can support checking mouse activity for Z6?
You should upload your story file for testing.
I can tell you that I’ve used mouse input in Zork Zero and Journey in the following (in addition to Infocom’s interpreters running in DOSBox): Xfrotz, Grotz, Zoom, and SDL Frotz. I remember that old DOS Frotz also worked circa 2004.
@Nathan, sure. This is just the example solution as provided by the DM4, not my code.
Switches v6;
! EXERCISE 134 (provided example solution, DM4 pp. 513-514)
! Write a test program to wait for mouse clicks and then print out the state of the mouse.
! (Requires Z6)
Array mouse_array --> 4;
[ Main k;
@mouse_window 0;
for (::) {
@read_char 1 -> k;
@read_mouse mouse_array;
switch(k) {
253, 254:
if (k == 253) print "Double-";
print "Click at (", mouse_array-->0, ",",
mouse_array-->1, ") buttons ",
mouse_array-->2, "^";
}
}
];
@DavidK, I picked up a fresh copy at http://www.ifarchive.org/if-archive/infocom/interpreters/frotz/WindowsFrotz.zip and tried it out. Works like a charm, and comes with a great diagnostic test example “game”, too. Thank you, both for the response and for the work of making WinFrotz! I was pleased that it also respected the optional “prompt” parameter to suppress filename dialogs for the @save and @restore opcodes used in Exercise 137, too. (The provided example solution for Ex 135 about menus did not work, but I note that your diagnostic example doesn’t make use of @make_menu, so I’m guessing that they’re just not supported. If that’s not the case, please let me know, and I’ll test some more.)
@Nathan, thanks also for this. The b should be 1 to reflect the click that caused the printout, so it sounds like it’s working. I’ve been using the outdated Frotz 2.44 from the Ubuntu repositories, which doesn’t include any mouse support, but I see that there are instructions on how to build SDL Frotz at SDL Frotz now fully integrated with Unix Frotz which hopefully are still good, so maybe I’ll try that later.
@otistdog Good to hear Windows Frotz worked for you.
Windows Frotz does implement @make_menu, at least enough for the (very limited) use of it made by the Mac release of Journey, although to get anything to happen with menus with that game you need the version of Journey released for the Mac, and to set the interpreter number to Macintosh. I’ll try to look at DM example 135 when I can.
How was that used? I don’t remember seeing any extra menu when I played the game on a Mac back in the day.
By the way, shouldn’t it be possible to get curses frotz to support mouse clicks as well, if it doesn’t already? I vaguely remember experimenting with that long ago, but I guess I must have thrown out those files at some point.
Hmm… I don’t get that extra menu when I run the game in a Macintosh emulator. Maybe Infocom never actually implemented it themselves? There does seem to have been plans for Journey that never actually came to fruition. Not just that it’s billed at the first game of a trilogy, but the back of the box claims the game has “theme music”. And the screenshots are clearly from an earlier build: The font is different, and the villain of the game is still referred to as “the Evil One”.
Mind you, I think it’s pretty cool to see pre-release material. I wish there was a better scan of this image from Journey that wasn’t in the final game, because I remember how fascinated I was by it when I first saw it. But if there is, I’ve never seen it:
That’s interesting: I’ve always assumed that menus were observed on the Mac releases, but having never had a Mac, I’ve never been in a position to test it.
@DavidK, how foolish of me! Never having seen the menu system in use, I was looking for a text-driven menu within the main screen, not on the menu bar of the application itself. (… and that’s yet another note added to my heavily marked-up DM4.)
WinFrotz is working fine – best of class, in my experience. Thanks again for making it!