Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Auto-restore - request for comments

19 views
Skip to first unread message

ne...@zzo38computer.org.invalid

unread,
Dec 24, 2019, 1:51:41 PM12/24/19
to
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.

R. Mutt

unread,
Dec 25, 2019, 8:56:10 AM12/25/19
to
<ne...@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.

ne...@zzo38computer.org.invalid

unread,
Dec 26, 2019, 2:39:14 AM12/26/19
to
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.
0 new messages