Quarter To Three Forums

Go Back   Quarter To Three Forums > Quarter to Three Boards > Games

Reply
 
Thread Tools
Old 09-29-2008, 01:20 PM   #1
cliffski
Social Worker
 
Join Date: Jun 2003
Location: Deepest Wilt-shire in the United Kingdom!
Posts: 2,965
WTF does 'My Games' folder come from?

Ok semi-tech geek question, because I know there are some developers here who work at stardock and other companies that have done this:

Under vista, how the fuck do you locate this folder:

\MyDocuments\My Games

I see stardock, THQ and Rise Of Nations are putting stuff in there, but I'm fucked if I can find an API to get that folder. I can get

\Saved Games

Which no bugger uses, and of course MyDocuments.
Are people *really* just bodging in "My Games" as a hard coded addition? I don't mind if they are, I just want to stop pulling my hair out. I'm sick of my games cluttering up MyDocuments, and want to do the 'ruight thing' short of the Games for Windows logo crap and the hell of getting added to the Game Explorer. Please tell me everyone just pastes "My Games" on the end of the mydocs folder and it's everyone's dirty little secret.

Yours,
A distressed coder just 24 hours before releasing a game.
cliffski is offline   Reply With Quote
Old 09-29-2008, 01:23 PM   #2
Kool Moe Dee
Social Worker
 
Join Date: Jun 2002
Location: My Crib
Posts: 2,431
AFAIK there is no standard for this that is accessible under XP, and it seems like everybody just adds on either the game name or "My Games". IIRC there is a standard way to deal with this in Vista, but it's been so long since I've looked at this I'm not sure what the constant name is off the top of my head...
Kool Moe Dee is offline   Reply With Quote
Old 09-29-2008, 01:24 PM   #3
Fugitive
New Romantic
 
Join Date: Jul 2005
Location: Calgary
Posts: 7,604
I think they are hardcoding it; various games use different locations, either because they're older ones before the Vista/GfW conventions were documented, or they just didn't care about them.

What I really hate are games that put saves in the AppData directories; I don't want to have to go digging around in all the hidden directories in my profile as well just to make sure I've got them all preserved...
Fugitive is online now   Reply With Quote
Old 09-29-2008, 01:25 PM   #4
cliffski
Social Worker
 
Join Date: Jun 2003
Location: Deepest Wilt-shire in the United Kingdom!
Posts: 2,965
for a long time I thought I'd found it with
FOLDERID_Games
But that's not it.
Ironically I can find
FOLDERID_SavedGames
which nobody uses, but the other one is a mystery :(
cliffski is offline   Reply With Quote
Old 09-29-2008, 01:34 PM   #5
Fugitive
New Romantic
 
Join Date: Jul 2005
Location: Calgary
Posts: 7,604
I think FOLDERID_Games is the virtual folder you get when you open the "Games" section from the Vista start menu. FOLDERID_SavedGames is what you want, but it's new in Vista, so you might need some kind of fallback path for non-Vista users. And then worry about importing from the old path when the user switches to Vista...

Or do what the other guys did and just hardcode a path off the profile root and stick with that.
Fugitive is online now   Reply With Quote
Old 09-29-2008, 01:37 PM   #6
Zylon
New Romantic
 
Join Date: May 2006
Location: Merriam, KS
Posts: 6,760
Quote:
Originally Posted by Fugitive View Post
What I really hate are games that put saves in the AppData directories
And what I really, really hate are programs that take it upon themselves to presume that their config files belong in My Documents. That folder should be for exactly what I decide to put in it, and absolutely nothing else.
Zylon is online now   Reply With Quote
Old 09-29-2008, 01:38 PM   #7
cliffski
Social Worker
 
Join Date: Jun 2003
Location: Deepest Wilt-shire in the United Kingdom!
Posts: 2,965
I think I'll hard code "My Games" onto the end of the MyDocs. That's where everyone seems to be putting stuff (ignoring "Saved Games"), and I don't want to spam the saves one place and configs somewhere else. I'm only doing an English language version so sod it.
what a mess.
cliffski is offline   Reply With Quote
Old 09-29-2008, 01:41 PM   #8
Rock8man
How To Go
 
Join Date: Dec 2005
Location: Kansas City, MO, Gamertag: Rock8mnky, PSN: Rock8man
Posts: 11,556
Yeah, I hate both games that put themselves in My Documents/My Games, and also games that put themselves in AppData directories. In the end it means having to search around and potentially miss save game data when it comes time to back things up so that I can reformat and reinstall Windows.

On the other hand, I love it when games detect by themselves (Interplay games used to be good about this) that I have a "Games" directory, and the default installation should be to that directory, not to Program Files. And that games should store their saves under where I chose to install them, not to some weird place on the drive where Windows is installed.
Rock8man is online now   Reply With Quote
Old 09-29-2008, 01:53 PM   #9
Zylon
New Romantic
 
Join Date: May 2006
Location: Merriam, KS
Posts: 6,760
The real problem is that most games don't offer the option to export saves. Everything else is just a symptom.
Zylon is online now   Reply With Quote
Old 09-29-2008, 02:03 PM   #10
Kunikos
How To Go
 
Join Date: Jul 2004
Location: Sigil
Posts: 11,674
Quote:
Originally Posted by cliffski View Post
I think I'll hard code "My Games" onto the end of the MyDocs. That's where everyone seems to be putting stuff (ignoring "Saved Games"), and I don't want to spam the saves one place and configs somewhere else. I'm only doing an English language version so sod it.
what a mess.
At least there's a "gentlemen's agreement" now, which is certainly a lot less of a pain in the ass when dealing with configurations that multiple users on a single computer need (like two brothers, but one is a lefty-- FUN).
Kunikos is offline   Reply With Quote
Old 09-29-2008, 02:31 PM   #11
RobotPants
Social Worker
 
Join Date: Mar 2005
Location: Damn comedians. Gamertag: Stuperhero
Posts: 4,163
The part I like is that the first time a game doesn't use the Games folder in Vista, the whole thing becomes pointless.
RobotPants is offline   Reply With Quote
Old 09-30-2008, 12:39 AM   #12
Chris Nahr
How To Go
 
Join Date: Jun 2002
Location: Aurora
Posts: 12,768
Quote:
Originally Posted by Rock8man View Post
And that games should store their saves under where I chose to install them, not to some weird place on the drive where Windows is installed.
I guess concepts like "non-administrator login" are alien to you? Still running Windows 98?

The installation folder is in "Program Files" by default, and that directory tree is write-protected for non-admins under every Windows version since 2000. So no, developers can't and shouldn't put save games in the installation location.
Chris Nahr is online now   Reply With Quote
Old 09-30-2008, 01:22 AM   #13
Scott Kevill
Broad Band
 
Join Date: Mar 2007
Location: Perth, Western Australia
Posts: 163
Quote:
Originally Posted by cliffski View Post
I think I'll hard code "My Games" onto the end of the MyDocs. That's where everyone seems to be putting stuff (ignoring "Saved Games"), and I don't want to spam the saves one place and configs somewhere else. I'm only doing an English language version so sod it.
what a mess.
As Fugitive said, according to MSDN, FOLDERID_Games is a virtual folder, which explains why it's not working for you.

You definitely have to hard-code it for XP which means you don't benefit from any localisation that I would have thought official special folders use.

Stupidly enough, you have to hard-code it for Vista as well. Another shining example of Microsoft's commitment to Games for Windows. :)
Scott Kevill is offline   Reply With Quote
Reply


Go Back   Quarter To Three Forums > Quarter to Three Boards > Games

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:10 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.