Sign in to follow this  
gunning

The Potential of File System Streams for Game Developers

Recommended Posts

Today I read this article about file system streams in The NT Insider. Link. To summarize, modern Windows file systems define these things called file streams which are the compartments within a file used to store its data. Typically a file will have one data compartment (stream) for its information but it is possible to have files with additional streams of "hidden" data, basically additional files within a file. This got me thinking. What potential do additional file streams have for game developers? I've been thinking of data hiding for one. It would be pretty sick to have a bitmap that when opened normally displayed a standard image but contained another stream with the actual game data. What are your thoughts on this?

Share this post


Link to post
Share on other sites
Using a filesystem feature unique to NTFS will create a few headaches when doing porting to consoles or alternative OSes. It'll also likely make your game break once MS moves on from NTFS in the semi-near future.

Share this post


Link to post
Share on other sites
Telastyn- Good point and I think that should be kept in mind for anyone doing development outside of Windows. I know FAT32 and NTFS both contain support for file system streams. Maybe others? They don't appear to be going away in the future but sure there's room for caution.

In what ways could we use them to our advantage for game development?

Quote:
Original post by JohnBSmall


Thanks. Fixed now.

Edit: FAT32 doesn't seem to have file streams. Shrug.

[Edited by - skittleo on April 29, 2006 1:30:20 PM]

Share this post


Link to post
Share on other sites
Er, no. To my knowledge FAT32 does not support alternative streams... [hunt for link]

This implies that it doesn't.

This [and most other links I've found] refer to it explicitly as NTFS Alternative Data Streams.

I don't have any FAT32 to try it on unfortunately...

Share this post


Link to post
Share on other sites
Other than for simple obfuscation, they aren't all that useful for games. On Windows, it'd require NTFS. If the hapless user moved the file from NTFS to FAT32 and back again, the stream would be gone. If they copied the file via FTP or out to a non-Windows network, the alternate stream would be lost as well.

They might be good for storing state information or saved games, but don't expect a hacker to be thwarted by it for more than a few minutes (if that).

Robert

Share this post


Link to post
Share on other sites
Guild Wars uses a stream like aproach.

There is a single physical data file. When data needs to be transferred, it is stored as a stream. When needed, these are decompressed/decrypted into actual files. All files are stored "anonymously", no filenames are stored by the client.

Note: This is based on casual look at structure. The format was never public, and it was never completely reverse engineered. Even if modifications were possible, any tampering with local files would have no impact on proper functioning of the game itself, since the corrupt content is either detected, or would be updated on the fly.

Share this post


Link to post
Share on other sites
Quote:
Original post by Antheus
There is a single physical data file. When data needs to be transferred, it is stored as a stream. When needed, these are decompressed/decrypted into actual files. All files are stored "anonymously", no filenames are stored by the client.
I'm pretty sure that has nothing to do with NTFS ADS at all.

Share this post


Link to post
Share on other sites
Quote:
Original post by skittleo
Today I read this article about file system streams in The NT Insider. Link.
To summarize, modern Windows file systems define these things called file streams which are the compartments within a file used to store its data.


It might by somewhat useful for viruses.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this