xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XBoard-devel] Thoughts...


From: Dan Jenkins
Subject: [XBoard-devel] Thoughts...
Date: Wed, 10 Mar 2004 16:19:19 -0600

I've been playing with adding an OpenGL interface to the code lately, and currently have got a version of that working fairly well. It's not code I'd want to merge back into the main code, yet, though, since it currently is a compile-time setting to make it use OpenGL, and I think a run-time setting would be much more desireable. Still, if anyone wants a look, I can throw a tarball up somewhere, or check it into CVS under a separate directory.

Anyway, I got to thinking of a couple of things and was wondering what others opinions are. For the 3d models, I have some pieces that I threw together in Blender, and wrote an export script to export them to my own custom format, and then I have code that reads in that format. These are data files that aren't compiled into the executable as resources, and as such, the app needs to know the path to look for them. It appears that all of the graphics for xboard currently are included into the code as arrays, and thus, they are not loaded from disk at run-time as my 3d models would be. I could write a utility to convert the models and textures to do something similar, but I don't like that idea, because I would like to eventually add code to allow users to import their own 3d chess sets.

So... what I was thinking is that there could be a central path somewhere to the files for all users, but the app could also check a directory in the user's home directory, so that users could get their own sets and wouldn't need root access to "install" them. What I'm not sure about is what the best way to go about determining the central path would be. It seems a lot of apps install themselves into /usr/local, so /usr/local/xboard would be an option, but I hate to hard-code paths like that, and would prefer to make it more configurable. So... that gets back to the problem of the app needing to know what the install path was... The app could look for a data directory in the same directory that the executable is, but that doesn't seem that good either, since then xboard would either need to be someplace other than /usr/bin or /usr/local/bin, or you'd have to have something like /usr/bin/xboard/data... I suppose it would be possible to install the xboard executable into an install path like /usr/local/xboard, and then make a symlink to it in /usr/bin or /usr/local/bin, though... Any thoughts? How do other linux apps that need to access data files generally do this?

Another thought I had was that, since it'd be nice to allow users to select their own chess sets, it'd also be nice to be able to save that information in something like a .xboardrc so that when they choose a different set, shutdown, and restart xboard, their latest settings are loaded again. This could be nice not only for things like which chess set, but current options like the "highlight last move" option etc. Currently, I know you can probably specify the options you want for everything on the command-line, and possibly by using the .Xdefaults file, but it seems it would be more user friendly to setup your options, and know that they will stay that way until you change them again. But then, maybe that's just me being used to many Windows apps doing this... What do you guys think?

_________________________________________________________________
Fast. Reliable. Get MSN 9 Dial-up - 3 months for the price of 1! (Limited-time Offer) http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]