set restart point fundamentally flawed?

Started by Goldmund, Sun 28/02/2010 16:07:20

Previous topic - Next topic

Goldmund

Erm, hello from parentland.

Ok, to the point: I've implemented an "undo" function in my game so that you can go back to the point before you died.
I've tried both ways: set restart point and save game to an unused slot.
The problem that is inherent in both ways is like this:

Imagine that early in a game you enter a room with an alligator.
The game saves automatically (or sets restart point).
The player, scared shitless by the sight of the alligator, saves his game as well.
OK, he gets past the alligator and enters another room with, say, a bomb.
The game saves automatically (or sets restart point).
The player cannot disarm the bomb, it explodes, death screen.
Now the player has two options: "undo" or "restore saved game".
If he chooses undo, he is back in the room with the bomb.
If he restores the game, he's in the first room with the alligator. Say, this time he cannot escape and is killed by this beast.
Now, if he chooses "undo" from the death screen -- he will go to the room with the bomb!

Thus, I would propose that setrestartpoint stores the game state not by saving a game, but in memory.

Pumaman

Goldmund! How is parentland treating you?

Your raise a good point about how SetRestartPoint works in this sort of situation. I suppose a workaround would be to disable the "Undo" button if you restore a game, until the next autosave happens. I'll have a think about if this could be done better for a future version of AGS.

GarageGothic

You could use unique slots for each autosave point (keeping track of the latest used slot in an int), but of course it's not a very elegant solution.

Edit: Oh, and very nice to see you around the forums again, Goldmund!

Goldmund

Ah, yes, I'll make a global variable "undo_point" and functions:

function SetUndoPoint (int whichpoint) {
undo_point=whichpoint;
SaveGameSlot (undo_point, "undo");
}

function Undo () {
RestoreGameSlot (undo_point);
}

Thanks for the welcome, guys :-)
Parentland is a bit slow at daytime (save for an odd butt rash), but we compensate by night.
I'd say it may be worse than being a student, but it still beats the crap out of troubled adolescence.

Dualnames

Quote from: Goldmund on Sun 28/02/2010 22:01:07
Ah, yes, I'll make a global variable "undo_point" and functions:

function SetUndoPoint (int whichpoint) {
undo_point=whichpoint;
SaveGameSlot (undo_point, "undo");
}

function Undo () {
RestoreGameSlot (undo_point);
}

Thanks for the welcome, guys :-)
Parentland is a bit slow at daytime (save for an odd butt rash), but we compensate by night.
I'd say it may be worse than being a student, but it still beats the crap out of troubled adolescence.


http://www.adventuregamestudio.co.uk/yabb/index.php?topic=34994.0

Just look at how Lazy CJ is!! :D
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk