Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Packing files
#1
Hi, I have seen many qbasic games that their graphic (bsvs), sounds (wavs, mids) files are located in the game directory and actually it have alot of them.. if thinking about it. this look quite "files to much". I know there are some games that actully have single file that containes all (For example: wav files)
I would like to know how to pack or compress list of files in qbasic
in to one single file? for example packing graphics:
1.spr
2.spr
3.spr

into "graphics.dat" that will containe all this sprites

and the same for wav files.. (sounds.dat)

Is there a way doing it in qbasic?
Reply
#2
Compression is a complex matter and requires large algorithms. Qb programs really dont use enough large datafiles to warrant bothering to use compression on them.

But packing them all up in one .pak file is a good way of keeping the files tidy. One way of doing things is to literally append each file on the the main pak file, so you just have the exact files inside one big file. This will allow you to access each file inside the main file by either skipping straight to the file position (in binary mode) This would require you to know the byte position of the file in question, or reading through all the data until you get to the file you want (Binary or Input modes).
Reply
#3
Ok, is there a simple example how to do this?
Reply
#4
There are many libraries that feature a packer. DirectQB, UGL and some stand alone packers are there... Can someone give links? Wink
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
some links from qb45.com
directqb - http://siaserver.ath.cx/cgi-bin/qb45site...t=directqb
pak lib - http://siaserver.ath.cx/cgi-bin/qb45site...aklibrary1
expak - http://siaserver.ath.cx/cgi-bin/qb45site...ect=expack
bs2packer - http://siaserver.ath.cx/cgi-bin/qb45site...ct=bs2pack
Reply
#6
UGL http://badlogic.bad-logic.com/dl.php?fil...xx_bin.zip
B 4 EVER
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)