Interpretor Output to E-ink Display?

Hello All,

So I’m digging into coding the IF compass. E-ink displays are not like terminals, they have specific python methods for displaying output.

In this case I want only to pull out the available directions of travel, parser generated messages (i.e. There is an envelope here), and objects at the current location.

Frobtads mediated through Textplayer (as textplayer too is written in Python) seems like a reasonable target to facilitate the e-ink display.

Does this seem reasonable to you? Has anyone a “10,000 ft. view” of how this might work? Am I stupid?

Not sure how useful this is, but someone ported Frotz to the Kindle platform a few years ago.


Here are a few things I’ve learned, I’m working with Frobtads (I know, you Inform heathens, “groan…”):

  1. FrobTads has a “plain,” text only mode, possibly handy for ‘regex’ redirection based on message type (room name, descriptions, objects, etc.)
  2. Frobtads has a handy sample game, sample.t, for testing
  3. Several helpful plugins exist for listing exits, objects, etc.

Overall I think a plugin could be constructed that “borrows” from these plugins to create output that is robust for writing regex expressions to “pull out” the data bound for the e-ink display from the prose.

This means that the ‘eink.t’ plugin needs to be compiled into all games using the compass–you unfortunately cannot just run games with the compass “out of the box.” Fortunately, putting in an “#include eink.t” line and recompiling isn’t a big deal.

Incidentally, the UNIX/Linux Tee command may be used at invocation to pipe output to both the screen and (after regex) the e-ink python library bound for the e-ink display.

While looking into possibly using one of the pimoroni e-ink displays for a terp of some sort, I came across this thread. My quick searches suggest that it was @JimmyMaher who may have done the kindle port?

There are a lot of conversations out there talking about re-use of existing terps, but the refresh characteristics of an e-ink display require some special consideration: in particular, full-redraws (even scrolling of text) are extremely expensive, while partial updates and in some cases region refreshes are more affordable.

The demos I remember seeing on old kindles seemed to all show partial updates from the top to the bottom, and when the viewing area overflowed below you’d get a refresh with a few lines of context at the top. I’d assume status bar updates would be a windowed refresh on platforms that support them.

1 Like