Hey. Thanks for explaining further.

I don't think it helps to do your serialisation by hand, instead of using 
pickle - the same objections hold.

The things I infer that you are talking about serialising - sprite content 
and opengl state - these are not part of your application's model state. To 
save them and then restore them along with your game state is conflating two 
very different things, and all the objections I stated above, together with 
plenty of others, will cause no end of problems.

Suppose the opengl state contains information about the open window, such as 
it's size, or screen resolution, or the display it is on. When the user 
changes this state, by moving the window to another display, they do not 
want this change to be reset when they reload their game!

Suppose the user saves game on one computer, but then reloads it on another 
computer. The saved opengl state might not even be valid.

Suppose they update the application, which includes a nice graphical 
makeover which improves the appearance of the sprites. Then they load their 
old save game, and this reloads the old ugly sprites again.

I don't want to be patronising, but I think you might benefit from reading 
about the model-view-controller pattern. I'm not usually a big 'patterns' 
kind of person, but this one seems especially pertinent here.

Sorry to be so negative! But those are my thoughts. Obviously I wish you 
nothing but success with whatever strategy you choose to go forward with. 
Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pyglet-users/-/H9GghIbq05wJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to