Jump to content

  • Log In with Google      Sign In   
  • Create Account

How commercial games do the packing?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 polarboy   Members   -  Reputation: 145

Like
0Likes
Like

Posted 21 July 2012 - 05:52 AM

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,

Sponsor:

#2 Kristoffer   Crossbones+   -  Reputation: 839

Like
1Likes
Like

Posted 21 July 2012 - 07:13 AM

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 @devmoon
Homepage http://devmoon.se
Stream http://twitch.tv/devmoon

#3 polarboy   Members   -  Reputation: 145

Like
0Likes
Like

Posted 21 July 2012 - 08:10 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS