Animated text in Inform 7 with glulx?

Is it possible to have Inform display text like it’s being typed, instead of having it all pop into existence at once?

1 Like

This would be a job for Vorple. You want to use animated text effects with a light touch, though – they can annoy readers.

1 Like

Yeah. I don’t want anything super fancy, I just want the text to type itself out over a couple of seconds instead of just appearing. Can I have it work while using glulx for images and color styles? Is there and extension or something I could use?

1 Like

Last year I spent at least a week trying to do some text animation in Glk by writing text to specific positions on a text grid, with a timer to pause between updates. But with GlkTerm, just creating a timer with the minimum duration resulted in something that took a while, but with Glkote I needed a long pause for everything to not happen at once. So I tried initially measuring the timers against real time to try to calibrate them for the particular environment. And that, too, had disappointing results.

I’d have hesitated to say it was completely infeasible rather than that I just hadn’t gotten it to work in a week of trying… until Andrew’s implicit confirmation above.

1 Like

Shame. I’m going for a “old school computer” look, and I figured text animation would help with that.

1 Like

with GlkTerm, just creating a timer with the minimum duration resulted in something that took a while, but with Glkote I needed a long pause for everything to not happen at once

That sounds like an interpreter bug that would break all “Z-machine abuse” arcade games like Freefall, Mad Bomber and ZRacer. I think a spec-compliant Glk interpreter with timer support should be able to handle animated text.

2 Likes

Glk spec on timer events:

the timing of timer events is approximate

That gives considerable wiggle room in what you need to provide in order to assert compliance.

As to breaking Z-machine abuse games…

Freefall in Parchment (on iplayif) – responds to keyboard input, but blocks don’t fall automatically
ZRacer in Parchment – per Freefall, responds to keyboard input, but automated motion fails
The Mad Bomber in Parchment – fails with a “This interpreter cannot handle timed events. Unfortunately, this means that the game is unable to run.” message

They all look fine in bocfel built with glkterm.

From glkterm’s gtevent.c (I only recently encountered this; I hadn’t know why my results had been so disappointing):

The timed-input handling is a little obscure. This is because curses.h
    timed input is a little obscure. As far as I can tell, once you turn
    on timeouts by calling halfdelay(), you can't turn them off again. At
    least not on the OS I tested this on. So we turn on halfdelay() only
    when the program actually requests it by glk_request_timer_events().
    If the program requests that timed events be turned off, we turn the
    halfdelay() timeouts down to once every ten seconds and just ignore
    them.
   To make things worse, timeouts can only be requested with a granularity
    of a tenth of a second. So the best we can normally do is get a
    timeout ten times a second. If the player uses the -precise option,
    we try requesting a timeout delay of *zero* -- this may not be legal,
    and it will certainly waste tremendous amount of CPU time, but it may
    be worth trying.

So it’s not that text animation can’t be made to work on any one target implementation in particular… it’s that you shouldn’t bet it’ll work on another.

1 Like

Those are all because I never got around to adding timer support to ZVM, not anything to do with GlkOte.

2 Likes