Files, files the musical fruit

Published June 07, 2006
Advertisement
Anyway, I got some stick over on the iDevGames forum for cramming my save game and persist files in the same directory as my program. So I whipped up a quick system-agnostic file module that creates its own packages in special places.

In Windows, it creates a Glow directory in My Documents/My Games, and in OS X...

So you can see it's really quite awesome and makes the game look much more professional, as well as allowing me to sidestep any issues with where the game is being run from (Freezer 2 on OS X crashed if you were running it from a write-protected directory).

It's a minor thing, but it's just one more thing that makes the game look good and treat its users well. Plus, you can keep your configs and save games between patch versions.

This module (PropaneFS) will be available in the post-Glow 0.5 public release of Propane Injector.
0 likes 13 comments

Comments

Polantaris
Everytime you add a minor thing, which is a lot of the time, they add up. Soon, all those tiny major things you did will make your game or whatever you are going very good looking, or make it work better, or something that will make you happy you did all those little changes. Good luck with your project.

~Polantaris.
June 07, 2006 08:56 PM
ApochPiQ
Errr... I thought persisting app data inside the bundle was Apple-sanctioned "standard practice" due to the platforms [moronic] lack of an uninstall paradigm?


(Then again, I finished my one Mac OS project and got the hell out as fast as I could, so I'm no expert.)
June 07, 2006 09:11 PM
Polantaris
Ah that's MAC? I was wondering what that was.

ApochPi - Heh, I heard Mac is pretty bad, I assume you agree with that?
June 07, 2006 09:13 PM
Ravuya
Quote:Original post by ApochPiQ
Errr... I thought persisting app data inside the bundle was Apple-sanctioned "standard practice" due to the platforms [moronic] lack of an uninstall paradigm?


That only applies for "write-protected" data (e.g. my sprites and music); preferences and other shit must be stored in ~/Library as per the Apple HIG. That way there's minimal stuff to remove when you hurl out the single app file into the trash.

And praise the Mord for no registry. [wink] Some of the things that actually use the OS X Installer can be removed by the same tool, though, if you're really hard-on for distributing with more than a single app bundle.

That reminds me; I should probably rig up the uninstaller on the Windows platform to take out the crap in My Documents.
June 07, 2006 09:46 PM
Ravuya
Also, I should probably clarify; I wasn't writing files inside the bundle (that's crazy) but in the directory around the bundle (which is stupid, since you're supposed to put the bundle wherever you damn well please). Which is, erm, why iDevGames bitchslapped me. Because I was being a tard.

And I like my Mac. [wink] I haven't had a problem with it yet.
June 07, 2006 09:56 PM
HopeDagger
For the Windows port, can you store the config/data/save files all in one self-contained folder with the executable? Where us Windows-users come from, we don't like this toss-it-all-about nonsense, even though 95% of our programmers do it. :P
June 07, 2006 10:23 PM
Ravuya
Yes, I can do that too. But I'd prefer to put it in the "My Games/Glow" folder in your "My Documents" directory, because that's what commercial games seem to be doing nowadays (Civ IV and FEAR).
June 07, 2006 10:33 PM
aidan_walsh
Quote:Original post by HopeDagger
For the Windows port, can you store the config/data/save files all in one self-contained folder with the executable? Where us Windows-users come from, we don't like this toss-it-all-about nonsense, even though 95% of our programmers do it. :P


Windows developers don't like it either. But then again, Windows developers are generally very lazy with details like this.

Either way, onc Vista hits and the typical user doesn't have write access to the Program Files directory, every application is going to have to start doing things the "proper way" or persisting user data to the inidividual user accounts folders.
June 08, 2006 03:12 AM
Ravuya
(Fucking GDNet journals quoting bug..)

I wasn't aware that people didn't like having data crammed in their My Documents folder... I'm trying to restrict it to My Games so I don't blow it all over the place.

I also wasn't aware that Vista will restrict writes to the Program Files directory by tard-level users. In that case, I've clearly done the right thing by knuckling under to Microsoft's fascist demands. [wink]
June 08, 2006 09:03 AM
Bradsco
Quote:Original post by Ravuya
I wasn't aware that people didn't like having data crammed in their My Documents folder... I'm trying to restrict it to My Games so I don't blow it all over the place.

In terms of application installs, there's nothing I dislike more than programs littering files everywhere. In my opinion, a game's root folder should contain everything.. be it sub-folders, config files, executables.
June 08, 2006 09:25 AM
superpig
Storing config files and saved games in your executable's folder make Microsoft cry.
June 09, 2006 03:56 PM
Telastyn
Quote:
typical user doesn't have write access


As if the typical user doesn't have admin access to their own machine...

Ignoring the uninstall problems, I've always had problems with games that place saves in user-spots, since the games are installed on the game drive (6 gigs free) and user info is on the system drive (~600meg free). A few mammoth saves later performance takes a massive hit.
June 09, 2006 04:12 PM
Ravuya
Well, my save games are (at last blush) 72K so I think you can store a couple of those. [wink]
June 10, 2006 12:25 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement