Sunday, June 24, 2012

Roodylib, glk, and cheapglk

So I've been working on an extension for the standard library that I call "roodylib" ( Basically, it's a compilation of standard library routine updates and some utility routines I find useful enough to bundle with the library. I've been going over previous library contributions in search of things useful and lightweight enough to throw in.

Looking at my "newmenu.h" contribution prompted a bunch of additions and changes (not yet uploaded at the time of this post). It no longer requires "glk.h" to work well with glk interpreters. Likewise, the latest version of PrintStatusLine in "roodylib.h" also does some glk-detecting stuff (mainly for the purpose of detecting non-glk simple interpreters), also without the help of "glk.h".

The progress in these things has got me thinking two things. First off, I realized that my "glk.h" and "cheapglk.h" library contributions, being global-variable-based, will be broken if saved games are shared between different interpreters (although I'm not ever sure if Hugo save files are supposed to work between different interpreters). So, really, DoRestore should be replaced to re-detect glk-ness.

Secondly, I'm thinking I might move towards dropping a global variable for glk altogether. I'd add an "IsGlk" routine to "roodylib" and assume people will use it and modify "glk.h"-using library contributions to just call that routine.

Support for "cheapglk" interpreters (playing environments where status bars might not even be shown) is not even necessary now that the new GlkOte (, which has support for printing status bars in such environments.

Still, I'm thinking of keeping Hugo "cheapglk" support around,  as my cheapglk alternatives cut down on unnecessary printed white space, which might be preferable under some circumstances. The difference is that instead of asking the player if they are using a "cheapglk" interpreter after detecting glk, I'm thinking of changing it to a mode that can be turned on and off from kind of interpreter.

No comments:

Post a Comment