Zip file loading

Moderator: GZDoom Developers

Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Zip file loading

Post by Scuba Steve »

I've noticed that when I drag a zip file onto the zdoom exe, it runs the wad just fine... but it will not load things like DEH files or BEX files that might also be in the zip. Would it be possible to make sure ZDoom loads these files, too? Also, people seem to zip PK3 files... could zdoom also do a double check and unpack 2 compressed files and run a pk3 from a zip file if someone is silly enough to do that?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Zip file loading

Post by Graf Zahl »

Wrong forum. Moved to where it belongs. Don't expect any results soon though.
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Zip file loading

Post by Blzut3 »

Scuba Steve wrote:Also, people seem to zip PK3 files... could zdoom also do a double check and unpack 2 compressed files and run a pk3 from a zip file if someone is silly enough to do that?
The zip format only compresses on a per file basis so it is actually possible to compress them further by compressing the compressed output (well actually if you do it tar.gz style is don't compress the first zip it will compress more). Of course this is really only noticeable when you get to about 3000 lumps in which case the savings can be about .5-1MB. So why do you think we have to be silly enough to compress pk3s?
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Zip file loading

Post by Project Shadowcat »

Because people are actually doing that? It's true, some of the files on the /idgames archives are zipped pk3s.
User avatar
Enjay
 
 
Posts: 26976
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Zip file loading

Post by Enjay »

The only reason I can think of for people doing this is neatness.

You open a zip and inside it you find a pk3 and a text file - just like finding a WAD and its text. If the file sitting in the archive was a playable zip, then when you opened it, you may be presented with hundreds of lumps and have to search for the text file.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: Zip file loading

Post by Xaser »

Well spoken, Enjay. Though it's a rare occurance, one of my biggest ZDooming pet peeves is when people 'forget' to use the .pk3 extension. All of us are quite accustomed to, when seeing the .zip extention, to open it up *then* extract the contents. It's a pain when I save a .zip to a different folder, fully expecting to extract the contents into my main Doom one, only to find out the zip *is* the wad... :(

Point be made, wad authors should use the .pk3 extension, not .zip, if it's meant to be loaded directly to ZDoom. It saves a lot of hassle, truly.
User avatar
MartinHowe
Posts: 2062
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Re: Zip file loading

Post by MartinHowe »

Enjay wrote:The only reason I can think of for people doing this is neatness.

You open a zip and inside it you find a pk3 and a text file - just like finding a WAD and its text. If the file sitting in the archive was a playable zip, then when you opened it, you may be presented with hundreds of lumps and have to search for the text file.
Exactly. Everybody when this feature was introduced said how cool it was, but nobody seemed to have thought it through. Probably the best two things that could have happened are (1) Randy introducing a "lumps" namespace that required a "lumps" subdirectory -a la deutex - and (2) Ty banning from the archive any zips-as-wads that did not follow that format; I fear, however, that the genie is well and truly out of the bottle now :(
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Re: Zip file loading

Post by Scuba Steve »

I was just playing and ran into another zip file with a pk3...

I really like pk3 files... but I prefer to run projects as zips because I get to keep the text file AND project file (wad OR pk3) in the same file. I no longer have wads without their text file, I can download a file from idgames or a website and just keep the downloaded file in my wads folder without unpacking anything. I understand that pk3 is essentially a zip file with a different extension, and you COULD put the txt file in the pk3... but nobody uploads pk3 files to the net. It's one more step to unzip the pk3... and then I lose the txt file... it would be nice for cleanliness and order to keep everything in one zip.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Zip file loading

Post by Graf Zahl »

... but it won't happen because others see it differently.
Blzut3
 
 
Posts: 3203
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Zip file loading

Post by Blzut3 »

I'm sure a good number of us do not want spend more time uploading a project then we have to (especially if the up-loader is using dial-up). And I'm sure dial-up users will appreciate not having to download a whole extra MB because some people find it more convenient to download just the pk3. If ZDoom supported a compression format like 7z then my point would be invalid (since it achieves better compression ratios by compressing the whole file at once and not on a per file basis).

I recall fooling ZDoom (or at least Skulltag) into loading pk3s inside of a zip by changing the extension to .wad. (In an attempt to achieve better compression ratios.) If this is still the case then it would simply be a matter of adding pk3 to the list of extensions for ZDoom to try to load from a zip.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Zip file loading

Post by Graf Zahl »

Blzut3 wrote: If ZDoom supported a compression format like 7z then my point would be invalid (since it achieves better compression ratios by compressing the whole file at once and not on a per file basis).
... and it's that particular feature that makes such archives that have to be able to randomly access each file useless as a game resource file.
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Re: Zip file loading

Post by Scuba Steve »

Graf Zahl wrote:... but it won't happen because others see it differently.
Sure... and "they" have been on the wrong side of the discussion on numerous other topics, just like this.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Zip file loading

Post by Project Shadowcat »

Who's right and who's wrong though, and in whose eyes?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Zip file loading

Post by Graf Zahl »

Scuba Steve wrote:
Graf Zahl wrote:... but it won't happen because others see it differently.
Sure... and "they" have been on the wrong side of the discussion on numerous other topics, just like this.


Thanks for making that point. Now I know what to do with this thread! :P
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Re: Zip file loading

Post by Scuba Steve »

"Not needed". PK3s were not "needed", zip reading was not "needed"... People WILL continue to be stupid and put pk3s inside Zips (or be forced via idgames requirements). Of course this isn't "needed", but neither is any of the other extension handling. This, just like the other methods, allows for cleaner gamefiles and directories and user friendliness. People can't upload pk3's, they're essentially useless as a downloading format since nowhere accepts them as such... reading it from a zip removes a layer of obfuscation.

BTW, the other issue I called you "wrong" on was you personal decision to limit weapon slots to 8 because "meh, you don't like it". It should not be up to the developer to chose how to make a wad. A terrible wad will use it poorly, just like the other features in ZDoom... good project will know how to handle it responsibly.
Locked

Return to “Closed Feature Suggestions [GZDoom]”