How do commercial games store their graphics/resources?

Started by
6 comments, last by EGD Eric 20 years ago
I''m in the middle of building my first real game, and I have a graphics folder and a models folder. The game just loads them from these folders. How do commercial games store these? I look around in the folders for the said commercial game, but I can''t find them. (The game is a shareware shooter called Bugatron, you''ve probably never heard of it) On the other hand, in the Freedom Force folder, I can find a bunch of files for the models and skins.
Advertisement
Depends upon the game. I know that the old Blizzard games (Diablo II and earlier) stored all their data in .mpq files - these were basically graphics, sound, video, and other data files, all compressed into a single file. Their map files used a similar system. This made it (somewhat) difficult for people to take and/or modify their graphics files and whatnot, but not impossible.
Many other games you will see simply use the system you describe, with a graphics, sounds and models folder. Sometimes they''ll change the extensions, or use odd/custom file formats.
The other thing you sometimes see is graphics compiled into the executable as resources. This is fine for small programs, and makes it a bit easier to distribute them, but if you ever intend to update your game, this is probably a bad idea since you won''t be able to replace individual files and will have to provide the entire executable up for download again.
Varies across development houses and across titles. Some have their data out in the open in the file system where anyone can access it. Others store their data in archives which may or may not be compressed or encrypted. If the developer wants to protect the data from prying eyes, they''ll encrypt it using in-house encoding tools and build a decoder into the application itself. They may also redundantly store the data in several different places and do integrity checks to ensure it hasn''t been tampered with. This may be important to ensure that the no multiplayer cheats or exploits can be used.
Always a good idea to keep textures in one, sounds in another, etc.. Or all in one, not intervidual files such as texture1.bmp, texture2.bmp, for file access reasons! Faster!
I''m in the middle of creating a game too, file types & compression is a top prioty for me!


Dun mes wit me!
Dun mes wit me!
quote:Original post by Ului
Always a good idea to keep textures in one, sounds in another, etc.. Or all in one, not intervidual files such as texture1.bmp, texture2.bmp, for file access reasons! Faster!
I''m in the middle of creating a game too, file types & compression is a top prioty for me!


Dun mes wit me!



It depends. If the game is modabble, then people would prefer to have individual files. Something like WC3 maps/Quake/HL models/maps. In big games, the textures might be so many and so huge that it might be impractical to store the whole file in memory at once. If it is compressed, then decompressing huge files might take longer than just loading a single file.


quote:Original post by GamerSg
In big games, the textures might be so many and so huge that it might be impractical to store the whole file in memory at once. If it is compressed, then decompressing huge files might take longer than just loading a single file.


Actually you wouldn''t load the whole file in memory, just load the parts you need at that time, and typically compression is handled by compressing each individual part seperately, and not the file as a whole.


Drakonite

Shoot Pixels Not People
Shoot Pixels Not People
I just had a look at the hegemonia demo and they store their data like you described.
Basically most of the textures are either DirectX texture files or TGA''s.
-CProgrammer
I prefer using normal file formats stored in logical directory structure... Mainly for my own convenience but also for mods and patching purposes.

One reason to do "pak files" in the past was that the FAT filesystem used a lot of extra disk space if you had a large number of tiny files, because disk space was allocated in large chunks. Newer filesystems are more efficient, and high quality audio and graphics files are bigger than the allocation unit so this isn''t a problem any more.

You may be able to gain a bit of performance by using one big file, but it''ll take some tweaking to get it right (like placing the data in the file in the exact order they''re loaded) and the gains probably won''t be huge. In my opinion, if using individual files is good enough for Id software then it''s good enough for me

This topic is closed to new replies.

Advertisement