How commercial games do the packing?

Started by
1 comment, last by polarboy 11 years, 9 months ago
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,
Advertisement
By using libs like (for example PhysicsFS) you can search and load the assets in the package as if they were in the filesystem, combine it with functions like
CreateTextureFromMemory 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.
Blekinge Institute of Technology
Twitter [twitter]devmoon[/twitter]
Homepage http://devmoon.se
Stream http://twitch.tv/devmoon

By using libs like (for example PhysicsFS) you can search and load the assets in the package as if they were in the filesystem, combine it with functions like
CreateTextureFromMemory 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.


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

This topic is closed to new replies.

Advertisement