Game Development Community

Where the Torque Editors save files...

by Anders Dahnielson · in Torque Game Engine · 12/28/2005 (3:11 pm) · 9 replies

I've been very confused over the issue where the Torque SDK editors save files. Then I found out by accident that it all gets saved in a hidden dir in my home dir "~/.garagegames/torqueDemo/". I ask myself: Varf

#1
12/28/2005 (8:08 pm)
Yeah, I know what you're talking about and have mixed feelings about it. There are some good reasons, such as a game might be installed by root and the user won't have write priviledges to the game directory structure, but its a real bother for development.

That's why I used to build torque with this option turned off (sorry, I don't remember the define and didn't find it in the few seconds I looked for it), but now, I just made an alias that runs torque with the -nohomedir option which gets rid of the behavior you mention.
#2
12/29/2005 (1:08 am)
Thanks! I wasn't aware of the the -nohomedir option (obviously ;-)). Will roll my own binary later to fix such things...
#3
12/29/2005 (2:16 am)
Hmm... Ok now with the -nohomedir option it save the mission files are saved in the example dir (or whatever dir I run the binary from) but in a "home/anders/Torque-CVS/example/GameOne/" subdir... Argh!

And I still can't figure out why I can't load any texture in the Terrain Texture Painter.... and the file dialog make me go nuts...

Feel like I will spend some time fixing such broken behaviour before even thinking about making a prototype to a game.
#4
12/29/2005 (9:49 am)
I'm not sure exactly about why your missions are being saved there. New missions I make are saved under the creator directory, but existing missions I edit are saved where they should be when I used the -nohomedir option.

I had a bear of a time with the new file dialog. In fact I thought it was completely broken, but when I went to debug the problem, it turned out to be an issue with the use of dirent on certain file systems during the recursion in recurseDumpDirectories() and hasSubDirectory(). Once I fixed this problem the file dialog works much better.

I ran into the problem on a reiser file system, although it potentially could happen on any file system. I posted the patch and a better explaination to the SDK Bugs forum and a pointer to it in this forum.
#5
12/29/2005 (9:53 am)
With the use of -nohomedir (which is only required on *nix systems), Torque uses the default directory structure, which is based from the directory of your executable's runtime location combined with the indicated -mod/-game path. In other words, the second directory structure you indicated is normal--if you are running your executable from your Torque-CVS/example directory, which it appears you are.
#6
12/29/2005 (11:16 am)
@ Todd: Thank you very much for the patch!! :-) The file dialog is finaly useful, yes I'm using ReiserFS too. That patch really need to be accepted and checked into the cvs.

@ Stephen: With the patch above applied and using the -nohomedir option will now save the missions file exactly where I expect them (the place picked in the file dialog) in the normal mod/game file hierarchy.

FYI: For anyone reading this and wondering where Todds patch are, wonder no more, it is here: http://www.garagegames.com/mg/forums/result.thread.php?qt=38157
#7
12/29/2005 (12:17 pm)
You're very welcome Anders.

Yeah, before I figured out the real problem, I was thinking "What in the world was GG doing releasing this completely broken piece of something-or-other." Without a functioning LoadFileDlg.gui, a lot of the stuff doesn't work, like the show mod and lots of editor/creator stuff.

Now I like the feature, although I think it could use some tweaking, like sorting and a few other minor behavior things.
#8
12/31/2005 (2:32 pm)
The issue has been noted in the bug DB, #1013.
#9
12/31/2005 (3:32 pm)
@ Ben: The forum doesn't support emoticons, but here's two thumbs up anyway: (b~_^)b