Re: Inform: How to use the system clock


29 May 1995 10:36:24 GMT

Bruce Barnett <bbarnett@crash.cts.com> wrote:
> This is a programming question about Inform: my game involves
> displaying certain messages which flash successively on the screen
> with delays in between.

Infocom's game "Border Zone" had events which happened in real time
while the player was typing, and as a result there is an opcode in the
Z-machine that can do what you want. See the description of "aread"
(advanced read) on page 29 of the Specification of the Z-machine.

The call

aread b p t f;

gets input from the player, putting the input text itself at the address
b, the tokenised result at p, and also calls f(t) every t seconds while
the player is working on her input.

Using this, you ought to be able to get roughly 1-second resolution for
your timed events.

--
Gareth Rees