Re: hacking on same-gnome



> One note about session management: it would be really cool if, rather than
> being session-management oriented, the games started where they left off.
> There are two tricky bits here. One is you have to save the games on a
> stack so if two copies of a game are opened and then closed reopening two
> games at the same time gets you two different games (but opening one,
> closing it, and opening it again, gets you the same game). If the game
> state is saved at a the right moment then recovery after a crash is also
> possible.
I've been thinking of writing some sort of game save system for
aisleriot (keeping as far away from the C side of the code as
possible, of course), but I wasn't sure if this would be used or if
there was something else I could do that would be more helpful (it
looks like most of the things that would be helpful involve a lot of C
or require some good ideas I don't have).

Most of the work could be done without any knowledge of how it would
actually be used, but I'd still like to have some idea. The
possibilities I've thought of are by session (this is probably not
good because I expect to write the game save to a file), manual (with
actual file>>save, file>>open ui--I'm not sure about this because a
corrupt save in aisleriot interacting with the game rules could cause
a crash or worse, though it could be made safe by saving a list of
moves instead of an undo/redo history), automatic (i.e. games just
starting where they left off), and automatic with a separate save per
game (freecell has a separate menu shortcut, so it might not make much
sense if playing freecell makes you lose another game save, then again
maybe it's not important).

I know the automatic stuff would make quitting a bit easier for me
(since I wouldn't have to worry about it recording a loss--btw, if I
start a new game and then quit, does that count as a loss?).

-- 
Vincent Povirk aka MadEwokHerd
Primary email: madewokherd gmail com
Secondary email: madewokherd comcast net
Tertiary email: vrp5000 psu edu
Jabber: madewokherd jabber org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]