Frotz 2.52 released

Frotz 2.52 is now ready. This is a minor release focusing on bugfixes and minor enhancements. Compilation for macOS is much improved after painstaking testing and reworking of the Makefiles.

Summary of changes between Frotz 2.51 and Frotz 2.52:

Frotz 2.52 was released on Sunday May 10, 2020.

This is a minor release focusing on minor enhancements and bug fixes.


  • Partial support for new @set_true_colour opcode. Works for SDL.
    Doesn’t work all the way for curses. Not in scope for dumb interface.


  • Reworked Makefiles to better handle library detection, particularly for macOS.

  • Fixed rendering of non-paletted PNG images. Affected only non-Infocom V6 games.

  • Rolled back idiosyncrasy fix for Cutthroats and changed over to the quick-and-dirty 24-to-12 conversion used by Infocom as this is how the Imps expected an interpreter to behave.

  • Fixed broken handling of game paths set in environmental variables and in config files.

  • Fixed slightly broken parsing of .sfrotzrc.

  • Fixed behavior of command line processing inconsistent between the different user interfaces.

  • Assorted source code formatting fixes.

Source code can be downloaded now from or the IF Archive in a few days. A 16-bit DOS executable will be uploaded to the IF Archive in a few days.


I can’t compile this at all from the source tarball.

% make
** Generating src/common/defs.h
** Generating src/common/git_hash.h
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [src/common/git_hash.h] Error 2

It’s a quoting error.

dfab: /tp/frotz-2.52 % rm -f src/common/git_hash.h && make -n SHELL="sh -x" hash
+ uname -s
+ which pkg-config
+ pkg-config --exists ncursesw
+ echo 0
echo "** Generating src/common/git_hash.h"
echo "#define VERSION \"2.52\"" > src/common/git_hash.h
echo "#define RELEASE_NOTES \""Official release."\"" >> src/common/git_hash.h
echo "#define GIT_HASH \""187120c50714d2090420d77bb3a7d6d11ae7223\"" >> src/common/git_hash.h
echo "#define GIT_HASH_SHORT \""187120\"" >> src/common/git_hash.h
echo "#define GIT_DATE \""020-05-09 22:41:16 -0700\"" >> src/common/git_hash.h
dfab: /tp/frotz-2.52 % echo "#define GIT_HASH \""187120c50714d2090420d77bb3a7d6d11ae7223\""

I opened a PR to fix the build. (We’ll have to fix this in order to update the Homebrew build.)

Merged. Thanks!

If you push a new release, I can submit a version bump PR for Homebrew Frotz.

It looks like one more PR is needed.

Whoops again. After merging this, I’ll sit on it until tomorrow morning.

Okay, now it looks done.

FYI, the Homebrew PR to update to frotz-2.52 has been held up for a while as they requested that I add new tests.

(I think this caught the maintainers’ attention because the old test, --version, apparently stopped working, so I had to switch to -v, but Homebrew prefers a more substantial test.)

I’ve got a reasonable test of dfrotz:

echo "." | dfrotz src/test/etude/etude.z5

But I don’t see a way to test frotz or sfrotz from the command line. Is there a way to do this?

When I just echo "." to frotz, it hangs. When I echo ".\n", it kinda seems to work, but the Homebrew CI tests fail, saying that frotz refused to quit normally.

EDIT: They did finally merge the PR just now, but I’m still curious to know if there’s a better way to test frotz and sfrotz.

Frotz never supported long options, for example, --version. How do they expect other programs that make use of Curses or SDL to react?

I found a working example in asciiquarium, but I’m not going to bother unless Homebrew tries to hold up a subsequent release.

  test do
    # This is difficult to test because:
    # - There are no command line switches that make the process exit
    # - The output is a constant stream of terminal control codes
    # - Testing only if the binary exists can still result in failure

    # The test process is as follows:
    # - Spawn the process capturing stdout and the pid
    # - Kill the process after there is some output
    # - Ensure the start of the output matches what is expected

    require "pty"
    ENV["TERM"] = "xterm"
    PTY.spawn(bin/"asciiquarium") do |stdin, _stdout, pid|
      sleep 0.1
      Process.kill "TERM", pid
      output =
      assert_match "\e[?10", output[0..4]

It’s nice to find people playing with this source code as well.
I’ve been porting a couple of games to Discord as a chatbot and dfrotz has been very useful. I’ve been using 2.44 (from the debian repo), do you think there’s any new features or fixes that might make it worth it to look into updating it for my usecase?

There are a lot of new features intended to make bots nicer and easier to write.

Some recent discussion on this can be found in Discourse-Frotz and in

Sdl Frotz does not seem to take into account the scale directive in my definition of the blb file: picture 1 “img.png” scale 20/1
The image is displayed at its actual size and is not scaled.