O'Reilly logo

Software Engineering and Computer Games by Rudy Rucker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

29.9. Serializing the view and version

A difficulty in properly serializing a Pop Framework game is that we want to serialize the view information as well as the game information. If you’ve set your viewpoint to a certain location, direction, and zoom, you’d prefer to have it restored when you reload a saved game.

Since a document can have more than one view open, the default behavior for an MFC CDocument class is to not save any of the view information. The Pop Framework changes this by having a CPopDoc save the view information of the active view and, when loading, signal the active view to load its parameters from the archive being loaded.

Another point to worry about is versioning. When you make repeated builds of a program, you will occasionally ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required