Page 2 of 2

Re: Best way to implement Undo function?

Posted: Wed Aug 14, 2013 12:16 pm
by TimeLoop
It is in the Sokoban game I have just released.

Right now there are unlimited undo, up to the starting point.

But I realize that with unlimited undo the player can just play the game in a try-error way instead of planning future movements, which is the main purpose of the game.


So far I think that:

a) Unlimited undo can be against the game spirit.

b) When the player finishes a level, he is gifted with 2 or 3 undos, which accumulate with possible unused previous undos. This way, not using undos in easy levels may let him to save them for harder levels. But still, he must plan the movements because undos are a very limited resource and must plan movements anyway.

c) Each level has 5 or 6 undos, and the undos get restarted each level instead of accumulate.


I'm up for the b), which seems more like planning and resource saving.

Which one would you prefer?

Re: Best way to implement Undo function?

Posted: Tue Aug 20, 2013 11:48 am
by Lafolie
I don't think that either of those is a great idea. Perhaps limiting the size of the history stack would be a better way to go about it, in addition to having a strict usage policy. If you're concerned about difficulty you want something closer to a mulligan than time reversal.