I’m making my first D3D simple game. My game uses many images.
This is my organization on disk:
MyGame
|
|-Debug
|-Release
|-Assets
|-Others
|-Images
|All cpp and h fiels here
If I launch my game from Visual Studio, thr game is working. But if I launch the game from Windows (by clicking the EXE file in the Release folder), I get an error that my application can’t load images. This is because in my app I refer to those images like “Assets\Images\image.bmp”.
How should I organize my project?
Now I have to make copy of the Assets folder in the Release folder and in the main project folder.
Another possibility to @shelleybutterfly’s answer is to always refer to images relatively, e.g. as “..\Assets\Images\abcde.bmp”. Then when you deploy you could put your executable in the same kind of structure as long as the relative relationship is still the same.
e.g. Project:
e.g. Deployment: