Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm still having problems packing my resources, after going through complicated APIs and basically just zip files which are exhausting my brain, I thought I could also pack the game with the resources visible to the human eye, in a simple folder.

Would that be unprofessional? Personally, I've never even seen games do that, it would basically mean that the player could just edit whatever he wants in the game, like go in map1.txt and add an X somewhere to create a wall, or change the player sprite to a pony in MS PAINT.

share|improve this question
25  
Just think of it as a modding community :) –  Orin MacGregor Sep 26 '12 at 17:56
1  
Are you a professional game developer with a budget? I think it is fine in case you are not planning on making a lot of money from this game. I do have some tips though. If it makes you feel any better, I used to edit save files in X-COM / UFO Defence –  Arthur Wulf White Sep 26 '12 at 18:44
6  
@ArthurWulfWhite: I think rather than making money or not, the splitting point is what the implication of modded resources is to the game. For MMORPG, a modded resources/client might give unfair advantage to certain players so you'd want to prevent that as much as possible. For many other games, modding-friendly client makes it attractive for modding community to develop around your game and is generally considered a good thing. –  Lie Ryan Sep 26 '12 at 20:05
1  
The modding aspect in Quake(1) was very well handled, without exposing the models and bsp files to the casual gamer. I don't think it's bad to conceal things while still keeping them easily accessible. I liked the fact I could edit save files in X-COM, I saw that as a feature. However, it would be silly if there was a text file called money.txt where I could just type in how much cash I want to start with cause it kind of blurs the border between a sandbox and a game. –  Arthur Wulf White Sep 26 '12 at 20:11
1  
I like the Introversion way: Put the files in renamed zip files, e.g. sound.dat. Using uncompressed folders with a couple of hundred files makes the (de)installation quite annoying. –  Tobias Kienzler Sep 27 '12 at 9:25
show 7 more comments

6 Answers

up vote 41 down vote accepted

No it isn't, changing the game data is called modding, which is a common practice and often seen as positive effect. It's actually good to keep the game data as transparent as possible, and editing it as hassle-free as possible. Even more so if you are choosing more "advanced" players as your target audience.

The reason why you won't find many AAA-games that use a plain folder structure for their data is that they use custom optimized archive formats to get improved loading times. The downside is the decreased transparency and the additional required tools in the toolchain. However, for smaller, or 2D, games these two things are usually more worth than the improved loading time.

Just make sure that what the people see is not just a huge mess :) put the files into a proper folder structure.

share|improve this answer
    
Things are also packed to be a form of deterrent from stealing (though ultimately ineffective if pushed) –  CobaltHex Sep 28 '12 at 6:07
add comment

If it ever was unprofessional, it may not be anymore. Early on games used their own package-formats, primarily to preserve their intellectual property (IP).

You can overcome some limitations such as fragmentation and unnecessary function-invocations of the underlying native file-system, by packing all resources into a single archive. This makes fragmentation events less likely when deploying the package on the client's PC.
In the worst case scenario you might end up having tiny individual file-resources scattered around your hard-disk sectors. (With the arrival of SSD's this point is often rendered moot)

But all of these benefits can also be had with the free, (Unix) age old .tararchive format.

Additionally, by using your own package-format, you can overcome limitations such as the lack of versioning, file-hashes, encoding and pointers/links within files, to name but a few.

Concluding, I would argue for transparency in Indie-development, unless you explicitly need to protect your IP.


As for the great points raised by MGOwen: To prevent Spoiling surprises you can rename the file extension, change file attributes, use uncommon media formats, excise the media-header and store it elsewhere, etc... To prevent Losing challenge use a binary serialization writer to store your game's state, with additional encryption and decoy-variables if you must.

Disclaimer: I am not a game developer. Only regard this post as a starting point...

share|improve this answer
1  
"To prevent Losing challenge use a binary serialization writer to store your game's state, with additional encryption and decoy-variables if you must." If people want to cheat they'll cheat. With an in-memory debugger looking for what four bytes in memory correlates with your gold and tracks changes to it, if need be. –  Random832 Sep 27 '12 at 14:15
1  
@Random832 Amen to that. –  Lo Sauer Sep 27 '12 at 16:15
    
Your answer is wrong. Accessing the content of 6000 tinny files is between 5 to over 10 times slower in my experience than accessing the same content from 1 file. For a case where loading takes 5 seconds on an SSD, 15 seconds from a normal hard drive breaking the same data to editable files and loading jumps to over 30 seconds on both (HDD and SSD). So, for some reason the increase is more pronounced on the SSD than on the HDD. (No RAID in both cases) –  Coyote Sep 28 '12 at 4:10
    
@Coyote I was under the impression that I argued for the same point in the post... ? Fragmentation (i.e. Hardware Controller limitations, physical limitations of platters...) + many file system API invocations (often through wrappers) = Slow –  Lo Sauer Sep 28 '12 at 5:26
    
This particular sentence is wrong then : "With he arrival of SSD's this point is rendered moot" –  Coyote Sep 28 '12 at 5:42
add comment

It's easy to fix & otherwise search indexing will find your finale videos, etc. So,

For data files: flip bits with xor

   realByte_cpp = readByte_cpp ^ 0x44; // xor

To hide "Gold: 250" from GREP.

Just encode with the same (random) xor value.

To keep scenes away from casual users, try this: Machinarium translated filenames so \videos became \0101 and all files then had an 8-binary-digit id followed by .101 to stop file associations.

share|improve this answer
add comment

In addition to other answers, two important concerns you should consider:

Spoiling surprises
Say I'm halfway through the game and discover the "video" folder. Curious, I click on one, and happen to see the final cutscene of the game.

Losing challenge
Same scenario, but I find the saved game format has a value for "gold". I change it from 250 to 999999999, and it works. Suddenly your carefully crafted difficulty curve, maximising the fun of the game, is gone.

Both could cause someone to lose interest in the game, partially if not entirely. This could end up in a lower overall impression of how good the game was (unfair but true).

Think about these in terms of your target audience - younger players especially are susceptible to spoiling their own fun without really understanding that this is what they are doing.

Even if you want to encourage modding, you might still want to protect users from ruining their own experience with the game "by accident".

share|improve this answer
3  
Exactly right. It doesn't hurt if you need to go through a few hurdles before you can mod the game. +1 for the video scenario –  Arthur Wulf White Sep 27 '12 at 7:42
add comment

There is an easy fix for it.. You could simply batch rename the extensions in a command prompt using something like

rename *.txt *.map

And then place them in a \map folder

You can access a command prompt from windows running cmd

This will not stop modders who know they want to mod the game and will leave a less sloppy impression on people who just want to play the game without all the content hanging around.

Yes, it will still be editable.. People will just be less likely to notice it.

To answer Eric Robertson's comment

If you wish to properly hide the content of your game from players you could use RSA encryption on those text files and merge them into one text file while you are at it. This should not be too much trouble although I suspect it is way beyond overdoing it.

share|improve this answer
1  
-1 This isn't really a "fix". The resources are still there available to the eye. –  Erick Robertson Sep 26 '12 at 21:03
6  
@Eric Robertson Well, this could be said about packing them Quake(1) style as well. There is no magic solution to hide the assets completely. This is just intended to conceal them from the casual player and somewhat circumvent the problems he mentioned. That being said putting them in a folder structure or an asset package doesn't mean the assets are not there (available to the eye) either unless you use encryption. –  Arthur Wulf White Sep 26 '12 at 21:07
    
I know that file extensions matter none on Linux, but are you sure that this would work on Windows? –  akled Sep 27 '12 at 8:48
    
@Bane: It would "work" on Windows as far as not looking like a text file with the default settings. It will also likely stop tools like Google's desktop search from indexing your files by default. You can still trivially map '*.map' files to Write, Notepad++, jEdit or whatever and have them open in your text editor of choice on double-click, of course. –  Martin Sojka Sep 27 '12 at 8:53
1  
Thanks for explaining! Then Windows doesn't seem that much different than Linux in that domain –  akled Sep 27 '12 at 9:26
show 3 more comments

Perhaps unprofessional is the wrong word. It really depends on the game whether or not leaving files exposed is a Bad Thing.

For a simple singleplayer game, players and modders will love you. You would be giving them the ability to easily change your game and do what they want. And keep in mind, there will always be modders for a game, no matter how small the game is. Many gamers will feel slighted if modding is difficult, after all, they bought your game and they should be able to do whatever they want in it.

On the other hand, easily editing game assets is bad for a multiplayer game, as it is considered cheating. Malicious players can replace content to make enemies more noticeable, walls transparent, etc. Although your game code should really enforce that assets haven't been tampered with, the "asset package" approach has the benefit of helping to deter this activity (security through obscurity).

share|improve this answer
    
If you're good enough to bypass a checksum test, you're good enough to mess with packaged assets too. I don't think packaging is any more secure. –  mmyers Sep 28 '12 at 4:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.