Original Post
I''ve made a package file format for my game that basically lists the files in order they were added. Each file has three fields with it, the name of the file, the size of the file, and the file itself. When the game needs to load a file from the package, it starts at the beginning and goes "Is this the right file?" *checks the filename* "Nope." *checks the size of the file and moves that far ahead in the package* "Is this the file? Nope." until it finds the file.
The only problem with this is I plan on putting LOTS of files in this package file, so every time a file is loaded the game has to go looking through the whole package! Then I thought about putting a table in the file listing the filenames and their position in the package, but I realized the game would still basically be doing the same thing ("Is this the file? Nope. Is this the file? Nope..."). The only advantage to that approach that I can think of is that the hard drive doesn''t have to go looking through a big file; its all right there in one spot.
Is that table idea a good one? Is it worth it? Is there a better way than any of this?