Sign in to follow this  
polarboy

How commercial games do the packing?

Recommended Posts

polarboy    145
Hi, all:
Recently I've been learning about unpacking actual game packages.
What I've noticed is that some of them do not need to be packed back (especially the ones where you just rename it to .zip and it will work).

Which is strange to me because as I play the game, the contents are not actually extracted in the file system, although I'm sure it does in memory.
So we might say, sure they are extracted, and we use the path name to find it in memory, but that doesn't explain why it also works if we just leave the contents there without repacking it back.

So I'm wondering, how does that actually work? How is the game able to access these files without actually extracting them in the file system and how are the games able to access those files without repacking them?

Thank you,

Share this post


Link to post
Share on other sites
Hunter_Ex    976
By using libs like (for example [url="http://icculus.org/physfs/"]PhysicsFS[/url]) you can search and load the assets in the package as if they were in the filesystem, combine it with functions like
[b]CreateTextureFromMemory[/b] and you can just pass a pointer to a chunk of uncompressed memory for the texture that has been loaded from the package.

There is many other similar working libs but i guess the inner workings is the same but some might use a more secure format other than ZIP.

Share this post


Link to post
Share on other sites
polarboy    145
[quote name='Kristoffer Lindström' timestamp='1342876420' post='4961652']
By using libs like (for example [url="http://icculus.org/physfs/"]PhysicsFS[/url]) you can search and load the assets in the package as if they were in the filesystem, combine it with functions like
[b]CreateTextureFromMemory[/b] and you can just pass a pointer to a chunk of uncompressed memory for the texture that has been loaded from the package.

There is many other similar working libs but i guess the inner workings is the same but some might use a more secure format other than ZIP.
[/quote]

I see, that makes it a lot more understandable. Especially with the actual file path in the pack file

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