Directory paths for resources and assets
- by The Communist Duck
If I have a file stucture for my final, released game something like:
Main folder
Media
Images
Other assets
Sounds
Executable
List item
And a different one for my 'in development' project, with the same Media folder but:
Main
Source and .obj, etc.
Media with everything
Bin folder with executable
I obviously cannot hardcode file pathnames into this, like: "../Media/Image/evilguy.png" or "Media/Image/foo.jpg" because they wouldn't work with one of the builds and would require a lot of switching names.
Instead, does it make sense for my resource manager, that loads everything, to have some kind of prefix path? Then, I can just do Get("foo.jpg") or Get("Sounds/boom.ogg")
And simply switch out, for the final release, the ctr argument from the relative path for the development build to the release layout?
If not, how have other people sorted these sorts of things out?