From: Erik V. <eri...@xs...> - 2012-05-02 12:07:42
|
> I can confirm both bugs. Both are related to the fact the undo mechanism of > Rails still has a few bugs remaining. > > As going back in game history is based on the undo mechanism it shares the > issues. > > This is one of the issues which will be addressed in Rails2.x and will be > (hopefully) easier to identifier and fix. > As I focus on the core of the rails2.x now (and this is harder work or better > more tedious work as I hoped it to be), I abstain from looking into the precise > nature of the bugs (though I have some ideas where to start). Maybe Erik will > have a look into it? I will try. Hints are welcome. > Usually the effects will not survive reload (as it replays the game from the > beginning and thus does not use undo). So either the game is loaded in a > correct state (most cases) or it is broken and unloadable (only a few cases). A > general workaround would be a menu item that allows an automatic replay > which simulates the sequence of a save and reload and will get the game > back into a reasonable state automatically? Reload does not actually reprocess previous actions, it only checks if all saved game actions are either identical to the actions currently in memory, or new (i.e. later than the last action currently in memory). The problem is that we don't yet have a good way to clear a whole game other than by exiting and restarting Rails. Perhaps it would work, but I'm afraid the hard part is cleaning up memory. There are thousands of (old and current) objects holding references to each other, and I expect a thorough cleanup will require a lot of extra code. Erik |