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

[Inform] replay command

3 views
Skip to first unread message

Kathleen M. Fischer

unread,
Sep 25, 2000, 3:00:00 AM9/25/00
to
I would like to be able to keep the REPLAY command in my game, but it
seems to be a "debug only" feature. I even tried copying the
CommandsReadSub() routine and appropriate meta grammar into my game and
using IFNDEF's to make them show up right, which worked fine, except the
variable they were setting wasn't there then (xcommsdir)

So... before I plunge down the slippery slope of tracking this down...
is is even possible?

Can I include REPLAY in the non-debug version of my game?

Thanks!
Kathleen

--
-- The Cove - Best of Landscape, Interactive Fiction Art Show 2000
-- ftp://ftp.gmd.de/if-archive/games/zcode/Cove.z5
--
-- Excuse me while I dance a little jig of despair


Sent via Deja.com http://www.deja.com/
Before you buy.

Roger Firth

unread,
Sep 25, 2000, 3:00:00 AM9/25/00
to
"Kathleen M. Fischer" wrote:

> I would like to be able to keep the REPLAY command in my game, but it
> seems to be a "debug only" feature. I even tried copying the
> CommandsReadSub() routine and appropriate meta grammar into my game and
> using IFNDEF's to make them show up right, which worked fine, except the
> variable they were setting wasn't there then (xcommsdir)
>
> So... before I plunge down the slippery slope of tracking this down...
> is is even possible?
>
> Can I include REPLAY in the non-debug version of my game?

Funny you should ask; that's just what I wanted to do as well. And tried
the same things. And decided that xcommsdir probably didn't matter...
So I've been using:


#Ifndef DEBUG;
[ myCommandsReadSub; @input_stream 1; "[Replaying commands.]"; ];
Verb 'replay' * -> myCommandsRead;
#Endif;

and (so far, touch wood) it hasn't bitten me. So I guess we'll sink or swim
together.

Cheers, Roger
--
========================================================================
Roger Firth

Kathleen M. Fischer

unread,
Sep 26, 2000, 3:00:00 AM9/26/00
to
In article <39CF9CF3...@tesco.net>,

Roger Firth <roger...@tesco.net> wrote:
> "Kathleen M. Fischer" wrote:
>
> > I would like to be able to keep the REPLAY command in my game, but
it
> > seems to be a "debug only" feature. I even tried copying the
> > CommandsReadSub() routine and appropriate meta grammar into my game
and
> > using IFNDEF's to make them show up right, which worked fine, except
the
> > variable they were setting wasn't there then (xcommsdir)
> >
> > Can I include REPLAY in the non-debug version of my game?
>
> Funny you should ask; that's just what I wanted to do as well. And
tried
> the same things. And decided that xcommsdir probably didn't matter...
> and (so far, touch wood) it hasn't bitten me. So I guess we'll sink or
swim
> together.

Well, I tried it, and it worked. :) I wonder why that particular
command is considered a debug only one?

Kathleen <looking around anxiously then jumping in the water. Brrrrr>

Lucian Paul Smith

unread,
Sep 27, 2000, 3:00:00 AM9/27/00
to
Kathleen M. Fischer (green_g...@my-deja.com) wrote:

: Can I include REPLAY in the non-debug version of my game?

Here's code from Edifice (to include after grammar):

#ifndef DEBUG;
Verb meta 'recording'
* -> CommandsOn
* 'on' -> CommandsOn
* 'off' -> CommandsOff;
Verb meta 'replay'
* -> CommandsRead;
Verb meta 'random'
* -> Predictable;
Global xcommsdir;
[ CommandsOnSub;
@output_stream 4; xcommsdir=1; "[Command recording on.]"; ];
[ CommandsOffSub;
if (xcommsdir==1) @output_stream -4;
xcommsdir=0;
"[Command recording off.]"; ];
[ CommandsReadSub;
@input_stream 1; xcommsdir=2; "[Replaying commands.]"; ];
[ PredictableSub i; i=random(-100);
"[Random number generator now predictable.]"; ];
#endif;

The 'random' is important if your game has random events; 'recording' so
players can make their own walkthroughs and the like.

[Note: The above code was copied from the relevant sections of an earlier
version of the library (6/7) so it might be worth checking to make sure
nothing's changed.]

-Lucian

0 new messages