Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Using RAR/ZIP archive for media files

Author
Message
Barliesque
23
Years of Service
User Offline
Joined: 10th Nov 2002
Location: Los Angeles
Posted: 10th Nov 2003 05:23
Hi,

I've downloaded Nick Kingsley's unRAR.dll

I wanted to know if others have had experience with this, or any other methods of extracting files from an archive. I don't see much problem with using this for individual files. My question is, how do I deal with an X file, which contains links to multiple other files, ie. texture images?

CPU: Pentium 4 3GHz, w/ Hyperthreading, 1GB DDR RAM
OS: Win XP Home, SP1, DirectX 9.1b
GPU: NVidia GeForce FX 5800, 128MB
Barliesque
23
Years of Service
User Offline
Joined: 10th Nov 2002
Location: Los Angeles
Posted: 10th Nov 2003 05:27
Maybe I should be using the .PAK file functionality in DBpro??

Are .PAK files compressed? ...encrypted and password protected?

CPU: Pentium 4 3GHz, w/ Hyperthreading, 1GB DDR RAM
OS: Win XP Home, SP1, DirectX 9.1b
GPU: NVidia GeForce FX 5800, 128MB
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 10th Nov 2003 06:16
i think .pak files are compressed, but not for sure...

as for the .x file in a .rar file... you would have to extract all the textures as well

CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 10th Nov 2003 14:31
I think pak or pk3 are the same compression as zip, and are prolly not encrypted.

-RUST-
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Nov 2003 14:39
As long as everything is in one compressed file, you shouldn't have a problem. If you need to split it over many compressed files, then, as long as everything goes into the correct directory, there shouldn't be a problem either.


Avatar & Logo by Indi. Mirrors are more fun than television.
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 10th Nov 2003 15:06
Quote: "Location: Resuming plan for world domination. "


What are we going to do this week then Brains?


God created the world in 7 days, but we're still waiting for the patch.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Nov 2003 15:08
And I'm not Pinky...


Avatar & Logo by Indi. Mirrors are more fun than television.
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 10th Nov 2003 15:14
Pinky is currently banned from UK television because the authorities believe he is a refference to the Prince of Males. I meen Wales, sorry, typo.


God created the world in 7 days, but we're still waiting for the patch.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Nov 2003 15:22
Indeed...


Avatar & Logo by Indi. Mirrors are more fun than television.
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 10th Nov 2003 15:30 Edited at: 10th Nov 2003 15:30
It's the ears you see... and the fact that Pinky is quite a little chap.


God created the world in 7 days, but we're still waiting for the patch.
Bren
22
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Belgium
Posted: 10th Nov 2003 15:37 Edited at: 10th Nov 2003 15:37
Pinky and the Brain rule, along with freakazoid

Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Nov 2003 16:07
Yes, I like them as well...

So, your saying I'm small and have got big ears ?


Avatar & Logo by Indi. Mirrors are more fun than television.
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 10th Nov 2003 17:01
Quote: "What are we going to do this week then Brains?"


Did you miss the class on reading comprehension 101 ? hehe


God created the world in 7 days, but we're still waiting for the patch.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Nov 2003 17:31
Well, I'll forgive you for ommiting a comma...


Avatar & Logo by Indi. Mirrors are more fun than television.
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 11th Nov 2003 00:49 Edited at: 11th Nov 2003 00:49
I missed the class on writting comprehension 101.

EDIT: I meen writting comprehensively. Or should I say 'mean'?


God created the world in 7 days, but we're still waiting for the patch.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Nov 2003 00:51
I think you need to stay off the coffee for a while...


Mirrors are more fun than television. Well, that was fun, in a not-so-fun sort of way...
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 11th Nov 2003 04:37
*drool* mmmmMMMmmm caugh-ee.


God created the world in 7 days, but we're still waiting for the patch.
Barliesque
23
Years of Service
User Offline
Joined: 10th Nov 2002
Location: Los Angeles
Posted: 11th Nov 2003 12:44 Edited at: 11th Nov 2003 12:49
Uhhhhhhhmmmm.... What on earth has happened to my thread?!

Anyway...
Quote: "As long as everything is in one compressed file, you shouldn't have a problem"

(T.C.A. or may I call you, Nick?) Shouldn't have a problem with what? With using the UnRAR approach? I'd certainly like to do it that way.

What I'd like to do is specify the archive name, a password and the x-file to be loaded, and have its texture files follow along as normal. I don't see how this would be possible from the example code.

CPU: Pentium 4 3GHz, w/ Hyperthreading, 1GB DDR RAM
OS: Win XP Home, SP1, DirectX 9.1b
GPU: NVidia GeForce FX 5800, 128MB
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Nov 2003 13:35
Quote: "Uhhhhhhhmmmm.... What on earth has happened to my thread?!"

Good question...

UnRAR just UNRAR's files from a RAR file - essentially it works in more or less the same way as the unzip command line - its all or nothing (more or less) - whilst it can do what you want (I think - you can certainly extract 1 or more files in one go into a given directory) - however, it would still be a lot of work : Build a list of files in the RAR file, get the .X that you want to decompress, decode the .X file to get all the textures and then extract these textures from the RAR file. If you can do it, I'll love to put the code on my web site as a bit of an advert for you.

Alternatively, you could UNRAR the .X, and say, a configuration file which contains the texture names. You could then go through this list and extract the indiviual textures from the RAR file.


Mirrors are more fun than television. Well, that was fun, in a not-so-fun sort of way...
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 11th Nov 2003 16:45
I have code for stripping texture names out of a ASCII formatted DX model but it's not very fast. It's not too hard to do in other formats too, again though, it isn't quick.


God created the world in 7 days, but we're still waiting for the patch.
Barliesque
23
Years of Service
User Offline
Joined: 10th Nov 2002
Location: Los Angeles
Posted: 12th Nov 2003 03:06 Edited at: 12th Nov 2003 03:07
Quote: "If you can do it, I'll love to put the code on my web site as a bit of an advert for you."

Thanks, but this isn't the kind of programming I want to be doing. On the other hand, if you were to do it, I'd sure be glad to give you a credit.

Quote: "I have code for stripping texture names out of a ASCII formatted DX model but it's not very fast. It's not too hard to do in other formats too, again though, it isn't quick."

Speed is the name of the game. (Not literally.) Extracting filenames and then extracting files and then loading the files... that's a dead slow approach.

Hmmmm... the idea really, was to keep media files compact and secure. I suppose, even though extracting the RAR to the drive opens up the chance of media theft--that's not so much a concern as files being modified within the program itself. I dunno-- maybe these are actually fairly trivial issues.

I can keep download file size down with an installer that compresses everything. And the few images I wouldn't want tampered with (like company idents) can be embedded into the exe.

And I suppose PAK files are still a reasonable option as well, as long as they operate as I've described, loading textures with the model. I'm sure it must, seeing as it's an integrated part of DBpro.

Can you guys recommend a good PAK file archiver utility?

CPU: Pentium 4 3GHz, w/ Hyperthreading, 1GB DDR RAM
OS: Win XP Home, SP1, DirectX 9.1b
GPU: NVidia GeForce FX 5800, 128MB
Barliesque
23
Years of Service
User Offline
Joined: 10th Nov 2002
Location: Los Angeles
Posted: 12th Nov 2003 05:10
...I found a program called PakScape which works very nicely.
But there's no compression whatsoever.

Which makes me wonder what the point is of a PAK file.

CPU: Pentium 4 3GHz, w/ Hyperthreading, 1GB DDR RAM
OS: Win XP Home, SP1, DirectX 9.1b
GPU: NVidia GeForce FX 5800, 128MB

Login to post a reply

Server time is: 2026-07-26 17:33:30
Your offset time is: 2026-07-26 17:33:30