PDA

View Full Version : Bulk Data File



aidave
06-06-2006, 05:27 AM
Hi what solutions are there to pack up all your graphics/audio data into a single archive file? To protect a bit from casual hacking/copying.

I'm not sure what would be good to use with Pascal...

:?

Robert Kosek
06-06-2006, 05:35 AM
I use zipfiles personally. You can get numerous headers and units for that. I'd reccommend ZipForge and their Personal License.

AthenaOfDelphi
06-06-2006, 06:40 AM
Personally, I use Abbrevia.

It was originally developed by TurboPower, now its open source.

tanffn
06-06-2006, 08:24 AM
I used ZLib as its cross platform and easy to use. You can also mess around with the header so it won’t be readable.
Or in case you have some free time without having any TV show to watch or a good computer game you can always create your own file format.. (and I’ve been there and done that :roll: )

savage
06-06-2006, 08:51 AM
Abbrevia is also cross-platform if I'm not mistaken at last Delphi/Kylix and could probably be ported to FreePascal as well.

cairnswm
06-06-2006, 08:57 AM
Harry Hunt wrote a nice article on this http://www.pascalgamedevelopment.com/forums/viewtopic.php?t=1466
but unfortunatly it doesn;t exist on his site anymore :(

JSoftware
06-06-2006, 09:00 AM
i just write a header containing length, filename and offset for all the files which i then stuff into the same file. no compression going on though i use a stream based approach and could easily change the memorystreams to be zlib-streams

WILL
06-06-2006, 12:02 PM
Yeah, I used to play around with his XCESS tools back then. He did some neat stuff. Too bad he wasn't able to keep up enough to have a complete product. Everything was VERY polished. Probablably one of the most polished Pascal-type library suites/packages I've seen to date.

Whatever happened to Kai? I haven't seen him around after Turbo slowed to a crawl. :?

So does anyone know for sure if Abbrevia can be used with FPC?

Sly
06-06-2006, 02:53 PM
The system we use in our games at Krome is quite complex, but blindingly fast, which is important for console games running from DVD.

The data archive contains the files in access order. That is, the files are sorted to make sure the seek time is kept to an absolute minimum. If the game loads fileA, fileC then fileB, then that is the order in which they exist in the archive. We also have what we call binary packages. If a level loads fileA, fileB and fileC, then those files are grouped together into a binary package. This binary package is loaded into memory in one file read and then handed out to the bits of the game that asked for them. If a different loads fileD, fileE and fileB, then it has its own binary package in which fileB is duplicated so that we can still load the entire package in one file read into memory. There are other features, such as per-file compression, CRC checks, CRC filenames (access a file by the CRC of its filename instead of by the filename. Finding a file in the archive is then just a matter of comparing numbers instead of comparing strings), file overrides (a second archive can override files contained in the first archive), and much more.

NecroDOME
07-06-2006, 02:53 PM
Yeah, it's a great solution if you have a it on DVD, but by copying it to the harddrive it's consuming space.

But i'm wondering what's best for PC: the unreal way (for textuers, sounds etc. seperat packages) or the quake way (1 package that contains everything).

aidave
07-06-2006, 04:29 PM
What about CAB files? I believe Tanx uses those.
Is there a Pascal interface for them?

Robert Kosek
07-06-2006, 05:43 PM
Those are built into Asphyre and are "ASDb" and are it's own record format. But yes you could use it and adapt it to your own needs, it's MPL licensed.

WILL
08-06-2006, 11:24 PM
Isn't .CAB a Windows only format?

savage
09-06-2006, 09:05 AM
I thought is was just an extension of the Zip format.