Page 1 of 4

PLEASE GOD make an undo last feature

Posted: 09 Jul 2008 22:05
by audigex
I don't care how much of my CPU/ram useage it uses, just let me undo the last action.

I disabled autosaves, because they use too much HDD space if you play a long game... and yes, I know I should save more often, but I make one line, perfectly, spend ages on it... and then one little glitch on the dynamite tool (trying to delete a handful of trees) and half my map goes up in smoke. I'm left with a dozen trains on a few tiles each, some cities and the odd station which happened to be occupied at a time.

Really, use 2gb of ram to do it if you must, but let me hit ctrl+z to undo my last action!

Re: PLEASE GOD make an undo last feature

Posted: 09 Jul 2008 22:53
by Qu@rks
How can you be afraid of a couple of megs of hdd that the autosave feature uses if you have a computer with 2+ gigs of ram?

Anyways, I do think that this is something that should be added. I think it has been discussed before but anyways, a UNDO button would certainly improve gameplay.

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 00:02
by YukonRob
Maybe an overwriting autosave would be easier to implement?

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 02:32
by Rubidium
YukonRob wrote:Maybe an overwriting autosave would be easier to implement?
You mean like it is now (when you did not enable keep_all_autosave)?

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 02:44
by YukonRob
Rubidium wrote:You mean like it is now (when you did not enable keep_all_autosave)?
I don't see that option. Is that in the patches or options menu? Or do I have to enable it manually?

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 11:03
by Mchl
It's off by default in openttd.cfg in [patches] section. You can also tweak max_num_autosaves to something that fits you more (default 16)

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 14:04
by Gremnon
Odd. I've never had any autosave show up at all.
But that's off-topic, and I can deal with that later.

Undo would be useful, especially for those of us who play ottd on a laptop, when you end up blowing half the map up because you knocked the pad without realising. Happened to me a few times.

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 14:28
by Mchl
I'd rather see something like 'construction mode' where you can build for free, and see the 'total cost' of your investition. When you're done you either accept or abandon the design.

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 14:34
by YukonRob
Found it - it is now in the [gui] section of the openttd.cfg. Great info to know.

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 15:11
by Mchl
Actually... I have both under [gui] and [patches]... It's not something I'd expect...

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 15:17
by Rubidium
Mchl wrote:Actually... I have both under [gui] and [patches]... It's not something I'd expect...
That's because you loaded a trunk openttd.cfg into an older (probably stable) version of OpenTTD.

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 15:18
by YukonRob
I have no [patches] section whatsoever...
<edit> This appears to be explained by the above^

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 15:22
by Mchl
Rubidium wrote:That's because you loaded a trunk openttd.cfg into an older (probably stable) version of OpenTTD.
Yes. I'm using several diffirent versions, and they all use same openttd.cfg. Thanks for explanation. :)

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 18:59
by Qu@rks
Could we get back to the topic?

What about an undo function? Would it be very hard to code? Is it possible at all (with a decent amount of coding)?

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 20:47
by T-Unit
A quick question - how do you manage to have a small glitch that deletes half the map?
I also cannot see a reason for deleting trees. They are deleted automatically when you build rail or road. Also if you want to see past them you can make them completely invisible using a toolbar (found under the spanner).

Re: PLEASE GOD make an undo last feature

Posted: 10 Jul 2008 20:50
by belugas
It will be very hard to do, not to mention very memory intensive.
The reason is that you need to go back to a point in time in the game.
And since there are a lot of stuff going on (way more than it may looks) under the hood, having a list of all those modifications will be simply... too much.
It's not just the last human action that needs to be done. It's the whole state of the game that needs to be saved. Otherwise, it would not make much sens. You need to revert it all. The trains that have dropped a shipment, the industry that changed its production etc etc.
This is not a word processor, it's something way bigger in term of pieces interacting.

The best way for an undo "kinda" stuff is to set autosave to a high frequency.
The game has not been constructed with an undo in mind. Therefor, adding it is not really a posibility.

My opinion.

Re: PLEASE GOD make an undo last feature

Posted: 11 Jul 2008 00:30
by DeletedUser21
belugas wrote:...
What about it not goes back in time but just records the last action you did alone? (Maybe I'm stupid or something but I'm wondering).

If I remove a piece of track somewhere and press the undo-button; it should just recreate that same piece of track (not going back in time but only undoing the last con or de-struction).
Only problem I can think of is abuse when someone build something and undoes it so it's cheaper to remove stuff (like trees or road).

Re: PLEASE GOD make an undo last feature

Posted: 11 Jul 2008 00:53
by Qu@rks
I'd like a combination of undo and the other model that has been suggested. This could work similar to the construction mode in The Sims (if anyone has played it). The game basically copies the state it is in when construction mode is being turned on. As soon as you leave construction mode, you cannot reverse that last thing you did any more, only as long as construction mode is actually active. This would have to be turned off in multiplayer as it could lead to players having (dis-)advantages...

Re: PLEASE GOD make an undo last feature

Posted: 11 Jul 2008 06:57
by dihedral
undoing an action just involves a lot more that you currently are not seeing!

e.g. planting trees would be the best example i can think of right now. it has an affect on the town rating. undoing the planting would require to memorize the town rating that existed before planting.
same thing with destroying trees, the town authority reacts to that (obviously this time in a negative way), undoing such an action requires more than just removing tress and paying back the money for that action.

besids, every single action in the game has an affect on the futur of the game. like Belugas already said, there is more in the background that you are not aware of that needs taking into account - trust a dev on that one, i think he knows more about the inside guts of the game ;-)

in addition to that: it sounds to me like a feature that is there to prevent people to plan, structure and think about their construction before they build it! you guys seriously need to switch on that thinker you have sitting on your neck (excluding the recently bannd kiddo, he aint got none)

i btw. read out of Belugas' post: will never happen!

Re: PLEASE GOD make an undo last feature

Posted: 11 Jul 2008 08:45
by hertogjan
Probably the best one can do is to make a hotkey (Ctrl-Z for example) for loading the last (auto)save.