aeron005
January 30th, 2010, 09:12 PM
I'm looking for some clarification here,
Would it be more logical to put my resources (bitmaps, fonts, etc.) in the executable directory and use relative paths in my code, or to hard-code a directory such as "/usr/share/games/my_game/image.bmp"?
Relative paths would be more portable, but in a packaging situation (.deb or otherwise) designed for linux, it would be better to stick with the typical linux conventions (binaries in /usr/games/, read-only data in /usr/share/games/, read-write in /var/games/).
Unless there's some kind of environmental variable-based trickery I'm unaware of, these are the only options... how do most developers deal with this?
Would it be more logical to put my resources (bitmaps, fonts, etc.) in the executable directory and use relative paths in my code, or to hard-code a directory such as "/usr/share/games/my_game/image.bmp"?
Relative paths would be more portable, but in a packaging situation (.deb or otherwise) designed for linux, it would be better to stick with the typical linux conventions (binaries in /usr/games/, read-only data in /usr/share/games/, read-write in /var/games/).
Unless there's some kind of environmental variable-based trickery I'm unaware of, these are the only options... how do most developers deal with this?