Game Development Reference
In-Depth Information
chapter 39
Persisting Application
Settings to Isolated
It's very good for an idea to be commonplace. The important thing is that
a new idea should develop out of what is already there so that it soon
becomes an old acquaintance. Old acquaintances aren't by any means always
welcome, but at least one can't be mistaken as to who or what they are.
Penelope Fitzgerald
Almost every application requires the ability to store session and state informa-
tion. This is especially true when dealing with disconnected applications or appli-
cations that cache data when possible to reduce load times. Traditionally, settings
were persisted to INI files when working with 16-bit Windows, but this approach
had fairly substantial limitations. Maximum file size was a factor when using the
APIs provided by Microsoft, and the settings were stored in flat file format, so hier-
archical relationships could not be represented. Another problem was determin-
ing where INI files should be located. Typically, these files were deployed alongside
the executables or in the Windows directory because it was the only directory
guaranteed to be available on all computers. Additionally, multiple users were not
supported by this mechanism. This deployment strategy created a configuration
nightmare, and was very hard to support and maintain.
Microsoft tried to introduce a new approach to solve these problems by creating
the registry on 32-bit Windows. This solution could represent hierarchical data, so
complex data could be nested to make configuration much cleaner. There was also
Search Nedrilad ::

Custom Search