Best way to implement Undo function?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
TimeLoop
Prole
Posts: 28
Joined: Wed Apr 17, 2013 8:20 am

Re: Best way to implement Undo function?

Post 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?
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Best way to implement Undo function?

Post 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.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests