# Approach on how to split game assets into split archives

With a custom binary file format for archives that is structured similiar to Valve's VPK files I have a Game.index.gcf which holds information about all files and where exactly they are stored. I can split up and say, that the /Assets/Maps and /Assets/Scripts folders should be stored in Game.000.gcf while the bigger /Assets/Music folder could be split up into Game.001.gcf and Game.002.gcf. This should boost performance but only if done right. Moreover with updates I could say, just update this particular split archive and not the entire archive (when storing everything in one really huge a file).

As of yet, I don't know how to write such an adaptive algorithm which automatically decides the best way to split all archives and files. What aspects should I keep in mind and what should I be aware of when creating these? Do you have any suggestions?

• Why do you think this would boost performance? If you mean that there is no need to read the whole file, then proper use of seeks within a large file would have the same effect. – Liosan Mar 28 '13 at 8:15
• Besides, an "adaptive algorithm" means that archive layout would change often whenever you add new content, which doesn't sound fun even for the dev version. – Liosan Mar 28 '13 at 8:16
• @Liosan: I was thinking that seeking to and reading a small file in a 5MB archive is much more efficient than doing this in one of 1GB size which hold everything. (the sizes are chosen arbitrary) Am I wrong? – Christian Ivicevic Mar 28 '13 at 11:47