Basic Real Time

version 2 by Sarah Morayati

  • Home page
  • Beginning
  • Next

  • Documentation

    Basic Real Time is a wrapper for Glulx's real time functions. The
    extension requires Glulx Entry Points by Emily Short. It also
    requires you, of course, to compile to Glulx (not .z5 or .z8).

    Basic Real Time was developed with I7 build 5U92 and incorporates I6
    code. It may not work as expected in previous or later versions of I7.

    If this is the case, email the author:
    morayati (at) email (dot) unc (dot) edu
    and she'll curl up in the fetal position and weep. Then she'll see
    what she can do.

    Normally, Inform 7 games are turn-based: that is, events happen, and
    time passes, only when the player inputs a command.

    Glulx allows the inclusion of real time events: events that happen
    based on time in the "real world".

    This extension uses the Glulx timer, which normally repeats events at
    regular intervals. Here, the event will fire only once, when the timer
    is finished.

    Once the timer runs out, the event will fire after the player's next
    turn (this is to avoid interfering with the command prompt.)

        start timer for (number) second/seconds;

    Starts the timer. Once the action fires, the timer automatically stops.

        set timer for (number) second/seconds;

    Changes the time remaining to a specific amount.

        deduct (number) second/seconds from timer;

    Deducts time from the timer.

        add (number) second/seconds to timer;

    Adds time to the timer.

        pause timer;

    Pauses the timer.

        resume timer;

    Resumes the timer.

        stop timer;

    Stops the timer manually.

        say seconds remaining;

    Prints the amount of seconds remaining; can be called in quotes:

        [seconds remaining].

        say seconds elapsed;

    Prints the amount of seconds elapsed; can be called in quotes:

        [seconds elapsed].

        A glulx timed activity: perform the next real-time action;

    Triggers the next action. It will fire on the next available turn.

    The next real-time action is a stored action which can be altered
    in a story's source code, first when play begins, then each time
    the author starts the timer:

        now the next real-time action is the action of...

    As with any other stored action, this can either be an action built
    into the standard Inform 7 library or a new action defined by the

    The latter in particular gives versatility; the author can schedule,
    in real time, anything that can be defined as a result of an action.