News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Request: no autosave before actual game is started/loaded

Started by zook2, July 31, 2014, 03:40:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zook2

Hi,

after a long hiatus I've returned to Simutrans, updated my game to 11.35 and experienced a crash after three months of game time (could have been during autosaving). Anyway, with "autosave = 1" (monthly) I didn't lose much.

Unfortunately, I then restarted the game -without loading a savegame - and went to get a coffee. When I came back, the autosave function had overwritten autosave12 with the default "game", i.e. Christminster North.

jamespetts

Welcome back! I see that this has already been moved to the general extension requests subforum, which is correct, as this behaviour is not specific to Experimental. I suspect that this would be tricky to implement, since the demonstration game is, once loaded, not differentiated in any way from any other game.

However, if you could find instructions to reproduce the crash and report the bug in the Simutrans-Experimental forum, I should be most grateful.

DrSuperGood

I imagine it could be possible to set a hidden map option (which is saved/loaded with the map) that disables autosave and possibly even manual save. This flag exists and should only be set for the demonstration game during menus that loads when starting the client. Attempting to save a map with the flag set could instantly return with no save being produced. An option could be added somewhere to stop maps of this flag but it would need to be forcefully done (no accidental autosave overwrites).

An alternative would be that autosaves append the game name (file name the game was loaded from) to the autosave file name so each game produces a unique non-conflicting autosave. Games that were not loaded (freshly started) are assigned a unique name based on the date the game was generated until the player has a chance to give it a name by saving it. The demonstration game would have a name like "demo" which is hard-coded only for it when the client first loads.

On a lesser note relating to the experimental demo game, it would be nice if demo games actually showed functional game play (1 or more companies making profit). Nothing stops the particular load point from looking nice but it would be great if people explored the map they could see actual profitable transport stuff happening and get ideas that they can put into real games where they need to make profit.

zook2

Perhaps setting THIS_BUTTON_WAS_PRESSED_BEFORE to 1 when the player clicks "New game" or "Load Game" and telling the autosave routine to check it would do the trick.

Vladki

What about storing the autosave settings in the save game, and disabling it in demo.sve

However I like the idea of including the original name in the name of autosaved game

Sent using recycled electrons.


jamespetts

Quote from: DrSuperGood on August 01, 2014, 01:17:49 AM
On a lesser note relating to the experimental demo game, it would be nice if demo games actually showed functional game play (1 or more companies making profit). Nothing stops the particular load point from looking nice but it would be great if people explored the map they could see actual profitable transport stuff happening and get ideas that they can put into real games where they need to make profit.

It is actually quite challenging and time consuming to make a good demonstration game. I think that The Hood asked for submissions for a new demonstration game in Standard a while ago and had no replies (the current Experimental game is very closely based on the demonstration game from Standard). If you or anyone else were minded to make a demonstration game for Experimental (which would have to be not much bigger than the current one in order to keep down file sizes and loading times), then that would be appreciated.

prissi

I think the easiest way out would be do do not autosave when the new world dialogue is shown. Other than that: People load games just to see them progress. Sometimes these crash too (e.g. with AIs or scripts) doing something at certain stages.

jamespetts

Quote from: prissi on August 01, 2014, 09:01:09 AM
I think the easiest way out would be do do not autosave when the new world dialogue is shown. Other than that: People load games just to see them progress. Sometimes these crash too (e.g. with AIs or scripts) doing something at certain stages.

That seems sensible; would it be desirable or undesirable that this would also affect games where the player has gone bankrupt?

prissi

I think that is a nice side effect. Incorporated in r7277