i want to see your prescious Word handling a 60MB file...ProDigit wrote: No wonder nothing like this exsists yet. And if Word can save a file without pause, OpenTTD which is based on Transport Tycoon created in the latter '90's, can do so too.
'Undo' knob
Moderator: OpenTTD Developers
Re: 'Undo' knob
Re: 'Undo' knob
If you would know the internals of OpenTTD you would know why things don't work as you think they work. Not to mention that this has been discussed many times over already.
Furthermore comparing simulators on one big heap is like comparing OSes. Why can't Windows boot in 1 second? DOS proves that you can boot in 1 second. Opening a text file in Wordpad takes considerably less time than opening the same text file in MS Word; why can't MS Word start as fast as Wordpad?
A simulator game like Densha Go or MS Flight Simulator have (likely) very little game state; the location and orientation of the vehicle and maybe some other vehicles. In OpenTTD the game state is enormous; an empty 2048x2048 map is already 36 MiB and that's excluding information about cargo, towns, industries, vehicles.
You propose to scan that map and instead of simply copying every byte we must for each byte we might want to copy read one byte and check whether those tiles are important for the game state (e.g. is rail tile) and then copy another byte. After we should go over the map again (asynchroniously) to copy all 'unimportant' bytes... but wait... doing that asynchoniously might result in a savegame that is in an invalid state (i.e. a half build rail tile) or even missing state (you build a rail tile after the initial copy and the 'unimportant' copy thinks it already copied that data). So... we can't copy the unimportant data asynchroniously as that means corruption or loss of data. This makes the whole idea of copying the important data first and the unimportant data later unwanted (in my opinion losing data or corrupting savegames during saving is very unwated).
I left the whole compressing and saving to disk out of this because that already happens asynchroniously. Now comparing this to a game like TTD which does NOT asynchroniously compress and save the file to disk an OpenTTD 256x256 map has less of a 'hiccup' when saving a game than TTD had (the amount varies with the used hardware).
It seems you are totally sure that you can make an autosave this way. The only way to make me say that you are right is by actually showing a working autosave implementation for OpenTTD using your suggestions and then I might reconsider my knowledge about OpenTTD's internals and the workings of CPUs.
Furthermore comparing simulators on one big heap is like comparing OSes. Why can't Windows boot in 1 second? DOS proves that you can boot in 1 second. Opening a text file in Wordpad takes considerably less time than opening the same text file in MS Word; why can't MS Word start as fast as Wordpad?
A simulator game like Densha Go or MS Flight Simulator have (likely) very little game state; the location and orientation of the vehicle and maybe some other vehicles. In OpenTTD the game state is enormous; an empty 2048x2048 map is already 36 MiB and that's excluding information about cargo, towns, industries, vehicles.
You propose to scan that map and instead of simply copying every byte we must for each byte we might want to copy read one byte and check whether those tiles are important for the game state (e.g. is rail tile) and then copy another byte. After we should go over the map again (asynchroniously) to copy all 'unimportant' bytes... but wait... doing that asynchoniously might result in a savegame that is in an invalid state (i.e. a half build rail tile) or even missing state (you build a rail tile after the initial copy and the 'unimportant' copy thinks it already copied that data). So... we can't copy the unimportant data asynchroniously as that means corruption or loss of data. This makes the whole idea of copying the important data first and the unimportant data later unwanted (in my opinion losing data or corrupting savegames during saving is very unwated).
I left the whole compressing and saving to disk out of this because that already happens asynchroniously. Now comparing this to a game like TTD which does NOT asynchroniously compress and save the file to disk an OpenTTD 256x256 map has less of a 'hiccup' when saving a game than TTD had (the amount varies with the used hardware).
It seems you are totally sure that you can make an autosave this way. The only way to make me say that you are right is by actually showing a working autosave implementation for OpenTTD using your suggestions and then I might reconsider my knowledge about OpenTTD's internals and the workings of CPUs.
-
- Chief Executive
- Posts: 697
- Joined: 10 Jun 2003 00:19
- Location: Australia
Re: 'Undo' knob
Rubidium and CommanderZ has said most of what I would have said. Making apples and oranges comparisons helps no one here.ProDigit wrote: And if Word can save a file without pause, OpenTTD which is based on Transport Tycoon created in the latter '90's, can do so too.
Anything with a large amount of changeable state will take a long time to copy. Trying to make a non-corrupt and consistent copy without freezing the state is really hard, it pretty much involves saving all actions that change the state (which includes vehicles moving, cargo loading/unloading, any money changes, etc.) and then applying them when the copy is done, ie. a lot of work. In addition to that the code to paint the screen now has to check if there are any changes against the game state every time it draws something, and then replay the changes on the fly into it's own "substate", before it can draw things, probably slowing down the game so much you may as well just freeze the thing.
I am hard pressed to come across many games which have as much changeable state as OTTD with large maps. Most other games' maps can't change during play; so they can be saved asynchronously. And most games don't have anywhere near the number of "objects" (in OTTD this is vehicles and signals depending on whether signal states are saved or worked out on load, I haven't checked) that OTTD allows. Apart from some strategy games and things like simcity, I don't think much comes close.
You haven't explained how to deal with the problem DaleStan already mentioned (ie. if someone changes some "mostly static" state during the save, how do you stop the save being corrupt?). The part that is done is the easy part, once we have a copy of the game state we can take all the time in the world to compress it and write it out to disk, and that is what already happens. Making a copy of state that could change at any moment without it becoming inconsistent/corrupt is a much harder problem (as I said above, and DaleStan said, and Rubidium said). By far the easiest solution is to freeze the state so it can't change, any harder solutions would almost certainly fall into "too much work, too little benefit".ProDigit wrote: So,with this I totally disagree with the explenations mentioned above! It is more than perfectly possible to do an autosave like I mentioned above, since it's in part already done; only now it can be optimized.
Many games already have autosave feats without pausing a game; including simulators.
Re: 'Undo' knob
actually they are not bitching at all, just look now though, who is way out of place!ProDigit wrote:Both of you are bitching like little bitches.... Sorry to say...
perhaps you in turn should be grateful for... lets start with the time the devs invest into this game. you actually have any idea what these guys are doing? they dont earn anything from OpenTTD, this is all developed in free time, some of the devs could spend their free time with their children, and all they get in turn is some unhappy, idioticly behaving forum user, who is whining about just because he cannot get his "undo knobb" (IT'S A BUTTON)?ProDigit wrote:Instead of being grateful for responses, and ideas.
seriously? way to go, kid!
good ideaProDigit wrote:I might as well just shut up
if you payed more attention to what was going on (development wise) you'd have perhaps reconsidered writing such nonsense (left aside the fact that 20 years is quite a lot for such a project - lets take it a year at a time, eh?)ProDigit wrote:But if y'all goin' to say 'no' to everything,then have your OpenTTD work like today, without anything new;even 20years from now.
you know, you could contribute! perhaps if you started with your perfectly working autosave featureProDigit wrote:I'm not doing the programming

then why are you whining about so much?ProDigit wrote:so I wouldn't care about what the developers decide that goes into openttd
now do be honest, please! you think the time you spend writing any amount of replies to this thread actually compares to the amount of threads the devs may tend to? you think the time you spend writing anything in these forums is worth comparing to the amount of time the devs have invested into this project? you think your 15 lines are worth standing next to the entire code base? did you spend a few weeks designing your post just like devs need to spend time tuning certain aspects of the code? oh - and lets not forget - they are not just working on the code, no! they have a bunch of annoying forum brats that start demanding stuff and claiming they are not doing stuff correctly - funny thing is, those who complain have like no idea what actually goes on in the background of the game - they dont even know a single line of the code!ProDigit wrote:You know it costs me time too to write this thread?
have you ever thanked the developers properly? have you ever realised how much work it really is they put into this?
i really do beg you to stick to what you posted:
Edit: oh - and by the way: it took me time to comment on your BSProDigit wrote:I might as well just shut up
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: 'Undo' knob
Since it seems that you have a high end PC, why don't you write a patch to autosave 'Every day', load the game in a RAM drive and tell us your results?ProDigit wrote:...
regards
athanasios
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest