Bocfel runnable in terminal?

Bocfel man page says

If the Glk implementation being used is Gargoyle, or if Glk is not being used at all, support for colors is provided. This option disables color support entirely.

Does that mean it can be built for use in terminal without garglk or Spatterlight? With curses or dumb terminal mode even? I suppose the version distributed within those applications are not built to be run that way, am I right?

With curses or dumb terminal mode even?

You can get these results by compiling with GlkTerm and CheapGlk, respectively. The BUILDING doc has notes on this.

GitHub - erkyrath/glkterm: curses.h implementation of the Glk API
GitHub - erkyrath/cheapglk: Cheapass implementation of the Glk API

I use Bocfel-CheapGlk for fast Inform testing. That is, if I just want to compile an Inform file, run it, and see the output right there.

1 Like

According to Bocfel’s main website, it can be built against Glk, or against a “dumb” non-Glk frontend.

But you can also build it against a different Glk library than the Garglk one, to use curses or whatever.

1 Like

That’s exactly how I want to use it, hence the question. Since Bocfel is glk enabled software these things should already be in place right?

When you compile a Glk program and link it with GlkTerm, you must supply
one more file: you must define a function called glkunix_startup_code(),
and an array glkunix_arguments[]. These set up various Unix-specific
options used by the Glk library. There is a sample “glkstart.c” file
included in this package; you should modify it to your needs.

Yes, Bocfel already provides the Glk startup code. It supports both Unix and Windows Glk startups, defaulting to Unix. It should be enough to do this:

tar xfv bocfel-2.1.2.tar.gz
cd bocfel-2.1.2
tar xfv cheapglk-cheapglk-1.0.6.tar.gz
mv cheapglk-cheapglk-1.0.6 cheapglk
cd cheapglk
make -j8
cd ..
make -j8 GLK=cheapglk

Now you have a bocfel binary that’s build against CheapGlk.


Thanks everybody, I was able to build Bocfel with CheapGlk, just had to change the compiler to clang++ and it’s gone without a hitch.

Now for the embarassing question: I can use /replay metacommand while Bocfel is running to playback a command log, but when I invoke Bocfel with -r or -r -R replay.txt it just stays at the first game prompt and does nothing. What am I missing here?

Edit: Found it, options come before game file.