From: Stefan F. <ste...@we...> - 2012-05-02 12:31:32
|
Erik & Mike: sorry I confused both of you (but each in a different way ;-)) by using the words "save" and "reload". What I meant by simulating "save and reload" this is basically the replaying the game as Erik suggested below. From the back-end side of Rails starting a new game inside the existing Rails instance is not an issue anymore (as I fixed the few showstoppers for the automated testing where all games are replayed sequentially in one instance of a java vm), so it is possible to start a new game without having troubles with the other. There might still be problems arise from the UI side, but it should be not that difficult as I cannot remember any "global" state used in the UI, but I am not the expert there. Stefan On 05/02/2012 02:07 PM, Erik Vos wrote: >> 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 > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |