Packing into PK3 is not working correctly

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1117
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

Re: Packing into PK3 is not working correctly

Post by Jekyll Grim Payne »

I removed the claim about memory corruption from the wiki. However, please do NOT store full WADs inside PK3s.
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

Re: Packing into PK3 is not working correctly

Post by sacarias »

Jekyll Grim Payne wrote: Wed Apr 10, 2024 3:10 am I removed the claim about memory corruption from the wiki. However, please do NOT store full WADs inside PK3s.
Could you, user Jekyll, explain why this must NOT be done then?
User avatar
phantombeta
Posts: 2155
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Packing into PK3 is not working correctly

Post by phantombeta »

sacarias wrote: Wed Apr 10, 2024 10:30 pm
Jekyll Grim Payne wrote: [...
Could you, user Jekyll, explain why this must NOT be done then?
You were already explained this:
phantombeta wrote: Mon Apr 08, 2024 5:46 pm
sacarias wrote: Mon Apr 08, 2024 1:11 pm Then this would make user SPZ1 a complete fool, and either he has no dignity, or you are the one who doesn't, or this is a witch hunt for free.
Nothing makes sense here
This is needlessly hostile. The wiki is inaccurate about it causing memory corruption, but it's very much correct about it using up more memory (though it's not leaking it- the wiki doesn't claim it is, anyway). GZDoom decompresses the WAD in memory, then loads it as if it were a normal WAD, and to do that, it needs to keep that decompressed copy around in memory, so it's gonna use up memory that it wouldn't have if it were loading from disk.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1117
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)

Re: Packing into PK3 is not working correctly

Post by Jekyll Grim Payne »

sacarias wrote: Wed Apr 10, 2024 10:30 pm Could you, user Jekyll, explain why this must NOT be done then?
I think it should be obvious from the wiki description, but I'll elaborate.

WAD is an inconvenient game-specific file format that requires specific tools to work with. PK3 is a simple and easy-to-setup ZIP archive.

A WAD is a bunch of files that only works when it's put in a specific order, separated with specifically-named markers, and file names in it cannot exceed 8 characters. It's an absolute nightmare in terms of organization. In contrast, a PK3 can have subfolders, does not need markers or specific order and supports long file names. And it also can be worked with an unpacked form, which lets you turn it into a repository, work with it using any editor you like instead of Slade, etc. In other words, it's a completely regular ZIP archive (or a completely regular folder, if you're using it unpacked). It's as close to what regular everyday interaction with files and folders looks like as possible. For all intents and purposes, consider PK3 to be the default.

UPD: I realize I was kind of answering a different question. The answer to why WADs must not be put in the root of the PK3, besides inconvenience, is that GZDoom will load all of those WADs into memory at once, resulting in huge overuse of RAM.

Return to “Mapping”