[Inform] How To Program A Game Within A Game

4 views
Skip to first unread message

John Menichelli

unread,
Nov 27, 1999, 3:00:00 AM11/27/99
to
I have an idea for a game, but I'm not sure how to implement it.

Basically, the player (you) would be playing the game as usual. In the
course of the game, you will find a computer. This computer will be
running a text adventure, which the player can also play.

Does anyone have any ideas on how to keep the two game (the "main"
game and the "secondary" game) states separate? Most of the routines
could be re-written to check to see which game the player is playing,
but what about "restart"? Note that I'm not talking about Tertris or
games like that, but rather full-blown IF games.

Any ideas would bee helpful - even if it's to say that it's not
possible in Inform.

Thanks.

John Menichelli


Matthew T. Russotto

unread,
Nov 27, 1999, 3:00:00 AM11/27/99
to
In article <383f44c1...@news.pixi.com>,

John Menichelli <meni...@pixi.com> wrote:
}I have an idea for a game, but I'm not sure how to implement it.
}
}Basically, the player (you) would be playing the game as usual. In the
}course of the game, you will find a computer. This computer will be
}running a text adventure, which the player can also play.

Don't do it! Self-reference is the dungeon crawl of the '90s.
--
Matthew T. Russotto russ...@pond.com
"Extremism in defense of liberty is no vice, and moderation in pursuit
of justice is no virtue."

Mary K. Kuhner

unread,
Nov 27, 1999, 3:00:00 AM11/27/99
to
John Menichelli <meni...@pixi.com> wrote:
>Does anyone have any ideas on how to keep the two game (the "main"
>game and the "secondary" game) states separate? Most of the routines
>could be re-written to check to see which game the player is playing,
>but what about "restart"? Note that I'm not talking about Tertris or
>games like that, but rather full-blown IF games.

I believe you can replace the routines for the "utility" verbs
too, though you will want to do it very carefully (past experience
suggests that if, for example, you disable "quit" or "save" for
the main game players will hate you).

Actually having "restart" restart the inner game, though, that
would be tricky to manage. Perhaps the game-within-a-game
should be something with a more restricted parser, like a
Scott Adams game. Then you could leave out "restart" and
"quit" would just drop you out of the subgame (so you could
type "quit" again to actually quit playing).

Maybe you could look into the manuvers that people who write
large games use to "jump" into a section during debugging, and
see if there's something there. The source for "Christminster"
might be a place to start, if it retains any of that scaffolding
(I haven't looked at it myself).

Mary Kuhner mkku...@eskimo.com

Jon Ingold

unread,
Nov 27, 1999, 3:00:00 AM11/27/99
to

John Menichelli wrote in message <383f44c1...@news.pixi.com>...

>I have an idea for a game, but I'm not sure how to implement it.
>
>Basically, the player (you) would be playing the game as usual. In the
>course of the game, you will find a computer. This computer will be
>running a text adventure, which the player can also play.
>
>Does anyone have any ideas on how to keep the two game (the "main"
>game and the "secondary" game) states separate? Most of the routines
>could be re-written to check to see which game the player is playing,
>but what about "restart"? Note that I'm not talking about Tertris or
>games like that, but rather full-blown IF games.
>
>Any ideas would bee helpful - even if it's to say that it's not
>possible in Inform.


I did something distinctly similar in my game the Mulldoon Legacy; basically
if you change the SaveSub, QuitSub etc. action routines to start with a
check: if (player=computer_player) { ..do whatever..} (having used
ChangePlayer to change the real world player into the computer game player,
so the prompt now interacts in the game, so to speak.)

Basically then, there's no real way of doing a clever restart other than (I
think) have a routine which puts all the objects back where they should be,
resets all attributes etc. This is practical if the computer game is only
small (like mine was).

Save and Restore - so long as they save to a 'file' rather than an actual
file; just have an array full of flags which are set to wherever objects
are, and whether things have been done and the like. It's extremely
inelegant but it is doable; and produces quite a nice effect when a player
can SAVE the game, QUIT, wander off for a bit, RESTORE it back again and not
lose the wandering in the middle.

Jon

Jim Aikin

unread,
Nov 27, 1999, 3:00:00 AM11/27/99
to
John Menichelli wrote:
>
> I have an idea for a game, but I'm not sure how to implement it.
>
> Basically, the player (you) would be playing the game as usual. In the
> course of the game, you will find a computer. This computer will be
> running a text adventure, which the player can also play.

Now what would be _really_ interesting would be to go the other
direction -- outward rather than inward. In the course of the game, the
PC might discover that she was only a character in a computer game. She
might have an attitude about this -- might start talking back to you
(the player) or run amok inside the game software, trashing the data and
text printout routines if you're not nice to her. Hmm....

--Jim Aikin

jm...@thud.office

unread,
Nov 29, 1999, 3:00:00 AM11/29/99
to
On Sat, 27 Nov 1999 02:51:28 GMT, John Menichelli <meni...@pixi.com> wrote:
>I have an idea for a game, but I'm not sure how to implement it.
>
>Basically, the player (you) would be playing the game as usual. In the
>course of the game, you will find a computer. This computer will be
>running a text adventure, which the player can also play.
>
>Does anyone have any ideas on how to keep the two game (the "main"
>game and the "secondary" game) states separate? Most of the routines

I did this in my comp game, 'Calliope', through some hideous hacks and
kludgery, more or less documented, which you can see for yourself:
<http://www.jmac.org/intfic/calliope_source.txt>

Basically, the game-within-a-game had a separate player object, who
was activated for a single move through use of a certain verb by the
'real' player.

Someone earlier in this thread said 'eeagh not again' at you, and I'd
agree, insofar as the idea is less original than you may think. I
thought my gimmick was original up until just before competition
deadline, when I started learning about how the game-about-an-IF-game
stunt had been pulled before. Several people, their reviews suggest,
took one look at Calliope's setting and ran away in disgust. Oh well.

Since I'm here, though, I'll make this my opportunity to turn around
and thank everyone who did write reviews of Calliope. Nearly all of
them, even the negative ones (many of which were written by people who
did in fact stick it out to the end, at least), encourage me, one way
or another, to start work on my next game. Or my first game, depending
upon how you look at it. Thanks!

--

J McIntosh jm...@jmac.org
Waterville, ME, USA http://www.jmac.org

elia...@my-deja.com

unread,
Dec 12, 1999, 3:00:00 AM12/12/99
to
Hey John,have you checked out these sites?

http://www.gnelson.demon.co.uk/inform.html
ftp://ftp.gmd.de/if-archive/infocom/compilers/inform6/
There is a lot of info there, as I am sure you may know.
As far as keeping your game states seperate, that shouldn't be a
problem. Go here to read the designers manual:
ftp://ftp.gmd.de/if-
archive/infocom/compilers/inform6/manuals/designers_manual.txt
This should help you out.


Eliavrezz


"Don't Think you are...Know you are"

In article <383f44c1...@news.pixi.com>,


meni...@pixi.com (John Menichelli) wrote:
> I have an idea for a game, but I'm not sure how to implement it.
>
> Basically, the player (you) would be playing the game as usual. In the
> course of the game, you will find a computer. This computer will be
> running a text adventure, which the player can also play.
>
> Does anyone have any ideas on how to keep the two game (the "main"
> game and the "secondary" game) states separate? Most of the routines

> could be re-written to check to see which game the player is playing,
> but what about "restart"? Note that I'm not talking about Tertris or
> games like that, but rather full-blown IF games.
>
> Any ideas would bee helpful - even if it's to say that it's not
> possible in Inform.
>

> Thanks.
>
> John Menichelli
>
>


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

Reply all
Reply to author
Forward
0 new messages