• Auto-restore - request for comments

    From news@zzo38computer.org.invalid@21:1/5 to All on Tue Dec 24 18:51:35 2019
    I invented auto-restore for Glk-based systems (such as Glulx). It is
    described at: http://ifwiki.org/index.php/Auto-restore

    Some games have questions that you must answer when starting a new
    session before it will let you to restore the game, and this is meant
    to avoid that, and may also be wanted for other purposes too maybe. (My
    own game doesn't have any such questions but still uses auto-restore.)

    There is a Inform7 code there, although I do not use Inform7 (nor
    Inform6), so I do not know if that code will even compile.

    My own work in progress game (called xyzabcde2) supports auto-restore,
    as well as another feature which is the ability for global user
    preferences to specify the default verbosity (if the interepreter
    supports it, which as far as I know, none do except for ones linked
    with my own Enhanced GlkTerm). (But xyzabcde2 is not written in Inform;
    it is written in assembly language instead.)

    If that Inform7 code works for you, then hopefully it can be included in
    the Inform7 extension library (change it if necessary to work). If it
    doesn't work, hopefully you would know how to correct it.

    (Is there a NNTP to post the Inform7 extensions? Maybe there is a mailing
    list, but I think NNTP is much better.)

    --
    Note: I am not always able to read/post messages during Monday-Friday.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R. Mutt@21:1/5 to news@zzo38computer.org.invalid on Wed Dec 25 13:56:08 2019
    <news@zzo38computer.org.invalid> wrote:

    (Is there a NNTP to post the Inform7 extensions? Maybe there is a mailing list, but I think NNTP is much better.)

    How big is it? If it’s just few KBs I would encode it in UUE and post it right here.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From news@zzo38computer.org.invalid@21:1/5 to R. Mutt on Thu Dec 26 07:39:04 2019
    R. Mutt <R.Mutt@da.da> wrote:


    <news@zzo38computer.org.invalid> wrote:

    (Is there a NNTP to post the Inform7 extensions? Maybe there is a mailing list, but I think NNTP is much better.)

    How big is it? If it's just few KBs I would encode it in UUE and post it right here.

    It is on the wiki, but OK I also posted it here (but uuencode isn't needed):


    Auto-restore (for Glulx only) by Aaron Black begins here.

    [Public domain]

    Use authorial modesty.

    Include (-
    Global auto_restoring_var = 0;
    -).

    Before starting the virtual machine: (-
    @glk $0022 0 auto_restoring_var;
    -).

    Include (-
    [ AUTORESTORE_R;
    @jnz auto_restoring_var 0;
    @copy $140C sp;
    @copy $14FE sp;
    @glk $0004 2 sp;
    @jz sp 0;
    @callf IMMEDIATELY_RESTORE_SAVED_R 0;
    @return 0;
    ];
    -).

    The auto-restore rule translates into I6 as "AUTORESTORE_R".

    The auto-restore rule is listed first in the when play begins rules.

    Auto-restore ends here.


    I don't know if the above is correct or if it will compile. I know how
    to program in Glulx (and Z-code), but not Inform or Inform7.

    The specification (also from the wiki) is:

    After creating windows (and other Glk initialization and protected
    variables, if necessary), if the story file has just been loaded and the RESTART command hasn't been used, and glk_gestalt(0x14FE,0x140C) returns nonzero, then it should attempt to restore a saved game; if that fails,
    just start the game normally.

    --
    Note: I am not always able to read/post messages during Monday-Friday.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)