This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Xconq output files


I've been looking at the various files that Xconq creates recently, since I
have been fixing a number of MacOSX-related problems involving these files.
Anyhow, this got me thinking. A plethora of files are created by Xconq.
Furthermore, their names and locations vary according to the platform, the
interface, and the game being played:

* Saved game files ("save.xcq" on Unix and Windows, "Saved Game" on the Mac).
* Checkpoint files ("checkNN.xconq" on Unix and Windows, "Checkpoint" on
the Mac).
* Warning files ("Xconq.Warnings" on all platforms).
* Debug files ("Xconq.DebugOut" on all platforms).
* Preference files ("prefs.xcq" in the tcltk interface, "Xconq Preferences"
in the PPC interface).
* Scores files ("scores.xcq" for most games, but some games have their own
scores files).
* Statistics files ("stats.txt" on Unix and Windows, "Statistics" on the Mac).
* Error files ("ERRsave.xcq" on Unix and Windows, "Error Save" on the Mac).

Then there is the question where all these files live:

On Unix, preferences, checkpoints and saved games go into XCONQHOME. If
XCONQHOME is not defined, they go into an invisible ".xconq" directory in
the user's home directory. If none of these are defined, the files are
dumped into the current directory. Other files (debug and warnings) just go
into the current directory. The scores files go into XCONQ_SCORES
(/var/lib/xconq/scores by default) or else into a visible subdirectory of
the current directory named "scores".

On Windows, an attempt is similarly made to put things in XCONQ_HOME (note
the underscore), or else into a hidden "_xconq" directory in the user's
home directory (?). When this fails, the files go into the xconq top
directory. The scores files also end up in the xconq top directory.

On the Mac, finally, most files go into the xconq top directory, but some
go into the current directory (usually the same thing, but not always). An
exception is the preference file under the PPC interface, which lives in
the System folder. The Mac tcltk preference file does however live in the
xconq top directory.

I think we could simplify things a bit. One easy step is to give the files
the same names everywhere. I am already looking into that. I think it would
make sense to use the xcq extension only for files (game files) that can be
opened by Xconq and the txt extension for all other text files.

Another possible simplification would be to be more consistent about file
locations across platforms and interfaces. For example, does it really make
sense to hide saved games and checkpoints in an invisible Unix directory?
The preference file certainly belongs there, but saved games I would expect
to find in a visible directory. And do we really need to put the scores
files in a common place (/var/lib)? This made sense with the old xtconq
where one program handled several users. I see no reason why a user should
not get the scores from his own games saved in his home directory, except
perhaps to prevent cheating.

A possible simplification could look like this:

* saved games, checkpoints and debug files all go into a "save" directory,
either within the xconq top directory itself (Mac and Windows) or a visible
$HOME/xconq directory on Unix.

* scores files similarly go into an xconq/scores directory (or perhaps into
xconq/save to make it really simple).

* preferences stay in their platform-specific locations (System folder in
MacOS9, invisible $HOME/.xconq directory on Unix).

This would also help to keep the xconq top directory less cluttered, which
is a problem at least under Windows and MacOS.

Comments?

Hans



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]