[GD-General] RE: A portable preferences library
Brought to you by:
vexxed72
|
From: Jeff L. <je...@SP...> - 2003-12-04 23:19:37
|
> I'm also aghast at the sheer # of files that most applications and
> games require for installation into /windows/system32 and /windows,
> including game specific DLLs. I have NO idea why developers insist on
> putting game specific DLLs in global locations.
Because when push comes to shove, Windows is *still* just DOS - it still
requires a PATH environment variable of ";" seperated directory names to
search - in fact, with the latest versions of Windows, Microsoft is
disparaging the idea of putting your DLL's into the system directory, but
they don't give adequate documentation or support of the API's required to
insert directories into the search path.
Putting DLL's next to the application that Joe User has to "click to start"
makes them a candidate for Joe Jr to trash them (actually, its more likely
the reverse).
There *are* registry tricks you can do to auto-force directories into the
search path, but then there are known bugs where if the path gets too long,
it all goes *poof*.
I believe that Application Manifests give you scope to have explicit path
specs, but that means you need to *write* those at install time and that
precludes moving things around.
> > [a] One can have many independent instances of the application on a
> > single machine, each with different preferences;
>
> That's great, except in many cases most users don't like/want/know
> about that.
Actually you *can't* have many independent instances of an application if
you are going to respond to double-clicks on a document. This is the part
that I feel hasn't been picked up on by developers, and I think its probably
because no-one wants to admit that Apple's *LISA* did these things better
than anyone else. Documents, and Document Templates are whats important,
not applications.
Why not have your preferences as the main *ICON* (ie, file) you click to to
enter your game? Feel free to stick it where you like, copy it around if
you like, but understand that its your config.
For a better user experience, you should do the same with Save Games, and
they should have a soft-pointer internally to the preferences document so
that you can restore the users state when they click on this DOCUMENT.
Of course, on Windows, this means needing unique file types (since thats how
the registry maps files to apps), but on MacOS it works beautifully.
The truly innovative could, however, write a tiny app that functioned as a
LAUNCHER, that stored the preferences back into itself as resources, and
passed values on perhaps through environment variables, a command-line
option or a temporary file.
Sure, you can't read them with a text editor, but its meets the
zero-registry-config requirement, its not unreasonable to assume that the
"prefs file be writable", etc...
(But, of course, it makes Brian's life a helluva lot harder to write a
generic prefs class ;-)
Jeff Laing <je...@sp...>
----------------------------------------------------------------------------
--
A complex system designed from scratch never works and cannot be patched up
to
make it work. You have to start over, beginning with a working simple
system.
-- J Gall. "Systemantics: How systems work and how they
fail"
|