Advancing the Universe

jaynabonne
26 Sept 2012, 09:38I've run into an interesting issue.
Let's say you want to implement a "chase" game, where you start off in a room with a character that wants to capture you. Your goal is to make movements, room by room, to get away, seeking the exit. To be kind, your pursuer gives you a one turn head-start, but then afterwards, on each turn, he makes a step in your direction, wherever that happens to be. If you dilly dally too long, then you get captured. So you see something like this:
Being the kind of game designer that you are, you decide to use a turn script insetad of making it real time. The idea is that the player makes a move, then the Universe responds.
But now the player, knowing something about Quest, does this:
and suddenly, from the point of view of the chaser, the player becomes The Flash, making multiple moves at once before the turn script executes once, as a turn script occurs once per command line input.
There are some interesting ramifications to this, including the fundamental definition of a "turn", not to mention the fact that, if a player knew how a game was laid out, they could in theory solve an entire game in a single turn. Also, it seems that (unless you change what "wait" does) "wait" does the exact same thing as "wait. wait. wait. wait.", which might be a bit surprising to a player.
I was wondering if anyone has run into this problem. I was also wondering if players typically know about this feature of Quest (multiple period-separated commands). And finally, I was wondering if anyone has a solution to the problem of wanting the Universe to have a chance to respond to each command, as opposed to a more chunked up "turn".
I can think of only one solution so far, which is to hack into the core Quest code and implement my own hook after each command (seeing as how turn scripts seem to be coded much lower than in the aslx library code).
Any thoughts welcome!
Let's say you want to implement a "chase" game, where you start off in a room with a character that wants to capture you. Your goal is to make movements, room by room, to get away, seeking the exit. To be kind, your pursuer gives you a one turn head-start, but then afterwards, on each turn, he makes a step in your direction, wherever that happens to be. If you dilly dally too long, then you get captured. So you see something like this:
The security guard sees you!
> n
You're in a hallway running east to west.
You hear footsteps to the south.
> w
You're still in a hallway running east to west.
You hear footsteps to the east.
> w
You've reached a dead-end. The only exit is to the east.
You hear footsteps to the east.
> wait
The security guard appears, throws you to the wall, and handcuffs you.
Being the kind of game designer that you are, you decide to use a turn script insetad of making it real time. The idea is that the player makes a move, then the Universe responds.
But now the player, knowing something about Quest, does this:
n. e. e. s. s. d. d. o. say "Up yours". give finger
and suddenly, from the point of view of the chaser, the player becomes The Flash, making multiple moves at once before the turn script executes once, as a turn script occurs once per command line input.
There are some interesting ramifications to this, including the fundamental definition of a "turn", not to mention the fact that, if a player knew how a game was laid out, they could in theory solve an entire game in a single turn. Also, it seems that (unless you change what "wait" does) "wait" does the exact same thing as "wait. wait. wait. wait.", which might be a bit surprising to a player.
I was wondering if anyone has run into this problem. I was also wondering if players typically know about this feature of Quest (multiple period-separated commands). And finally, I was wondering if anyone has a solution to the problem of wanting the Universe to have a chance to respond to each command, as opposed to a more chunked up "turn".
I can think of only one solution so far, which is to hack into the core Quest code and implement my own hook after each command (seeing as how turn scripts seem to be coded much lower than in the aslx library code).
Any thoughts welcome!

The Pixie
26 Sept 2012, 11:26Interesting. I had looked at modifying a turn script so it only happened after the player actually did something (so not after a command is not parsed or saving or whatever), but had not considered this aspect.
See also:
http://quest.uservoice.com/forums/34461 ... s-and-unsu
See also:
http://quest.uservoice.com/forums/34461 ... s-and-unsu

Pertex
26 Sept 2012, 12:11Same with status attributes and darkness. The function Finishturn is not called in commandqueues. Could you add this to the issue tracker?

jaynabonne
26 Sept 2012, 13:58Yes, I will.
(Thanks for the pointer to FinishTurn. Things are clearer now.)
(Thanks for the pointer to FinishTurn. Things are clearer now.)

jaynabonne
26 Sept 2012, 14:06Pixie, I hadn't thought about that, but that is an annoying problem as well, especially if "time-critical" things are happening, and the player is stuck in "guess the verb." It would be really handy to know when the user has actually accomplished something. (I saw your post elsewhere about "successful" vs "unsuccessful" commands.)