Game Development Community

Missing Files and Invalid Bitmaps only in some directories

by Yik-Sian J Seow · in Torque Game Builder · 06/27/2012 (2:56 am) · 2 replies

Hi everyone. I have an issue I ran into a few hours ago. When I build my game into the My Documents folder (on Win7 64-bit, for Windows) it will run correctly. All files/assets are accounted for in console.log. But if I copy the entire game directory to another location, sometimes it will not work correctly. Some files (gui.dso and cs.dso files) in the same directory will be reported as missing although they are in the correct place and the paths appear to be correct. A similar problem occurs with some of the imagemaps loaded from the datablocks files saying that the bitmaps are invalid (from the engine code this seems to be a generic error if the bitmap file is not found).

So for example if the entire game directory is in My Documents or Program Files (x86) the game will not report any missing files or invalid bitmaps. But if I move the directory to C: or Program Files the errors will appear.

----------------------------
Additional Information
----------------------------
I define and execute my script filepaths this way:

exec(expandFilename("./gameScripts/partyManager.cs"));

Similarly I define and execute my gui filepaths this way:

exec(expandFilename("~/gui/splashScreen.gui"));

The expandFilename call's presence or absence does not seem to affect any result.


Any help at all in this matter would be greatly appreciated! It's about 6 a.m. where I am now so I'll need to head to bed but I will check this first thing when I wake up.


(Edit: Forgot to mention I'm using TGB 1.7.5 although I tried on 1.7.6 as well and the results were the same.)

About the author

Recent Threads


#1
06/29/2012 (3:19 pm)
My Game has been moved in and around "Program Files" and nothing like this ever pops up.
In "game.cs" I have:
exec("./LevelHandling.cs");

And maybe in "main.cs" you change the tilde "~" to a period?

exec(expandFilename("./gui/splashScreen.gui"));

Not much advice but have to check the basics.

#2
06/29/2012 (4:40 pm)
Thanks for the response, Alpha-Kand. Unfortunately I've gone over the specifics of the filepaths and cannot seem to find any careless errors in the basics, although that is good advice.

I should mention that this occurs with some .gui and .cs boilerplate files that come standard in the /common folder as well. It seems to be an issue with the ResManager in the engine. The find and openStream functions are not finding said files in the dictionary but I haven't looked deeper into that yet so I am not sure how the ResManager is populating that dictionary.