My best guess would be, that the engine is not made to run for such a long time and will eventually break down on all the information it has to temporarily save. Some people have played for 100+ hours, just not in one session, and a lot left the game open overnight, and both never had the same issue. That's why I think it most likely only happens when the game stays open for a very long time. Maybe the age or power of your system could also play a part in this, but I can't say for certain.
I think there are two things I can do about this.
1. Limit the amount of gold you can get over time from mines and taxes until the player withdraws it. This way, leaving the game open for a long time does not help people any longer, and will make them close the game more often. It also decreases the work for the game in the background, as it can skip the increase of the gold once the limit is reached.
2. To deal with the not yet perfect balancing of the game, and help people enjoy the game without having to resolve to such options, I'll (temporarily?) add a cheat option for gold.
On a sidenote, when your game crashes, there is a chance that your saves still exist but are not recognized by the game. In this case, you'd still be able to find the saves in the www/save folder with the numbers of the saveslot in which they are. If they're in the folder but not shown in the loading screen, you can easily fix it:
- Move the existing save files out of the folder.
- Start a new game.
- Create new save files in every slot.
- Overwrite the new save files in the www/save folder with the files you moved out of the folder in the first step.
-> The loading screen will show the wrong information in the loading screen about party, playtime and such, but when you load the save, it should be your old progress now. Loading and saving again into the same save slot will update the preview information in the loading screen.
Thanks for the long message, I appreciate it!