Non-Inform Z-Machine game engines?

I’m trying to make a game for my friend who streams Commodore 64 games. Ozmoo looks interesting, but Inform’s library is much too meaty for it to copy with; the game I tested took literal minutes to process a turn. However, it plays Infocom games at least as well as the official interpreters do, so my thinking is that I could make him a game with a lighter engine - preferably much lighter.

I don’t want to have to code in ZIL if I can get away with it, though. Are there any engines for the Z-Machine that are worth looking at that aren’t Inform? I’m not expecting a sophisticated parser, obviously, but something a bit better than Scott Adams would be good.

If anyone has suggestions for lightweight Z-machine games I might want to try with Ozmoo, I’d also appreciate those.

Which game did you test?

Earlier is probably better. Try some of the small Z-machine games from 1995-1996, before Inform 6 came out.

1 Like

Inform 7 games are definitely going to be slow on that platform, but versions before 7 had a lot less runtime overhead.

I have it on good authority that ZIL is the handsomest way to compile Z-machine games that are small and nimble enough to run on the Commodore 64… but if you insist, I’d recommend trying Inform 6, or Inform 5 if you can find it. Inform 6 was released in 1996, a mere two years after the C64 was discontinued.

As for games to test:

  • Advent, the ZIL port (Z-machine v3)
  • Curses!, the first Inform game (Z-machine v3 or v5)
1 Like

I’d also recommend either ZIL or Inform 5. There are also some alternate libraries for Inform 6 (such as Minform) that try to cut down on overhead, but the whole object-oriented thing is baked into the language itself.

1 Like

No one has yet mentioned Dialog, a new language by Linus Åkesson that’s generating a lot of buzz on the forums and that some people seem to be very excited about. It generates Z-Code, including version 5, which you’ve mentioned elsewhere as being preferential.

1 Like

Wow, the Andrew Plotkin! I feel honored. FYI, it was The Orion Agenda, which was suggested in another thread.

Very good authority, I’m sure. :V I didn’t realize that it was more than an assembler! I’ll have to check out the library and see if it meets my needs.

I’ll consider that as well.

1 Like

We’ve been discussing some of these issues in other, newer threads but for people who might come across this one, I’ll add some notes:

  • As of today, Dialog Z-machine code is about as unplayably slow as Inform 7 code on a C64. The creator has indicated that an A-Machine may be coming for the C64 which might help out, but as of today, both Dialog and I7 are Not Recommended for classic 8-bits.

  • I6 games do vary wildly in performance on a C64, which makes me suspect that it may have more to do with helper libraries than with the stdlib. For those in-the-know: is there a good example of a recent-ish game that’s done with a very new I6.xx but not a lot of extra fancy bits? (Update: I presume Advent.z5 is pretty plain and it’s not a good gameplay experience. With REU assistance the game is reduced to about the level of pain of a classic Infocom game with disk-loading. Loading from disk, it’s bad.)

  • I’ve done a lot of Ozmoo benchmarking recently. In real-world situations it can be modestly slower than the official Infocom interpreter. The biggest problem is the lack of fastloader, which can be sidestepped if you have an REU. (Loading the game into the REU does take some time, but once that’s done, Infocom and Ozmoo performance is pretty close from a real-world-feel standpoint.)

  • Another way to give an Ozmoo game a speed boost is to have the resulting .z file be small enough that it can be played as a memory-resident (no disk loading after the initial file) game. ZIL builds pretty small binaries for small games and you can also claw back some extra bytes by paring out various cute-but-unnecessary bits from the stdlib (like responses to numbers, etc.) Things like Minform and PunyInform might also help in the I5/I6 world.

  • Zeugma is the fastest C64 interpreter by far, but it requires an REU and is not particularly user-friendly.

1 Like

(Attn @fredrik.ramsberg)

Using Ozmoo I just benchmarked Advent Z3 (ZILF 0.7 lib J3) against Advent Z5 (Inform 6.31 Library 6/11 S) using Ozmoo on a C64. The goal was simply to enter the building, take everything, and get to Below the Grate. As a bonus, I included the same task on the commercial “Golden Oldies Volume 1” edition of Adventure, using the original (not cracked) disks as found on C64 Preservation Project.

I include two time markers, one for how long it took from starting to load the game to getting to the first player prompt. This is not counting “do you want instructions?” which ZIL and GOV1 ask as a separate option, I’m going from “we are At End Of Road and the game is ready to play.” The second marker is how long it takes from the first prompt to get equipped in the building and get through the grate.

Ozmoo is not providing fastloading to either ZIL or I6. GOV1 is using whatever fastloader may or may not be on the disk.

Time to prompt (minutes:seconds)

ZIL -  2:06
I6 -   3:15
GOV1 - 3:23

All of these times are objectively terrible, but then, so is Commodore 64 disk access. I was mildly surprised by GOV1 being slower to get to the prompt than I6, even though I knew I had to plow through the bundle’s main menu.

Time from prompt to Below the Grate (minutes:seconds)

ZIL  -  0:46
GOV1 -  1:20
I6   - 11:17

Because I remembered it being a more primitive (and therefore simpler) parser, I would have made a modest wager on GOV1 Adventure being slightly faster than ZIL, but it’s not. There’s some time penalty for extra typing as a result–we cannot GET ALL in the building so I had to type out four GET (item)s by hand–but I typed pretty briskly so it wasn’t mostly down to that.

And I6 did suffer a small unfortunate penalty because, unlike the ZIL and GOV1 versions, it doesn’t automatically complete [with the keys] when I UNLOCK GRATE, so I had to sit through a long grind while it figured out to ask me and I answered KEYS and so forth.

But the difference is pretty striking overall.

2 Likes

Interesting! I wonder how the ZILF 0.9/J5 build of Advent performs… the compiler generates more efficient code now, but the library has also grown.

Just ran it. Timing on the shipped 0.9/J5 build was basically identical, I got 2:05 on load and 0:46 for play again. (In every case I’m typing instructions individually on each line rather than banging it together as one long string, but I’m not stopping to carefully read responses.)

To try to narrow down any difference in performance to the computational bit (rather than the disk access bit) I did two things: let Ozmoo load the whole story into ram expansion first, and ran a little longer, going down to the point of turning on the lamp In Debris Room.

These are the gameplay timings only (from first prompt to a prompt In Debris Room)

ZILF 0.9 - 0:35
ZILF 0.7 - 0:34

Both experiences qualify as Fast. Not “instant screen refresh as seen on today’s supercomputers” Fast, but Plenty-Fast-For-8-Bit Fast.

1 Like

Anyway, back to the original premise @FredMSloniker : if you want to work in a system that

  • is available today
  • produces comfortably playable C64 binaries
  • has contemporary support from contemporary enthusiasts and system-minders

your top choices are probably ZIL and DAAD. DAAD isn’t Z-Machine but it is a multiplatform system.