Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] zdbsp compressed UDMF nodes configuration produces uncompressed nodes #1091

Open
kitchen-ace opened this issue Aug 9, 2024 · 4 comments

Comments

@kitchen-ace
Copy link

This is probably a bug with zdbsp, but as a workaround in UDB is fairly easy, I decided to just report here now too.

zdbsp requires the options -X -z in that order to produce compressed extended nodes.
using -z -X, as UDB does currently, will produce uncompressed extended nodes.

tested with Linux and Windows (through Wine) versions of zdbsp as well as UDB.

ZDoom/gzdoom#2658

@biwa
Copy link
Collaborator

biwa commented Aug 10, 2024

According to the ZDoom Wiki:

--compress or -z
Compresses the node information. Compressed nodes are identical to extended nodes, but they take up less space. If GL nodes are built, they will be compressed as well.

So compressed nodes always seem to be extended nodes. A quick check on a simple test map reinforces that:

-z      ZGLN header   209 bytes ZNODES
-X      XGLN header    468 bytes ZNODES
-z -X   XGLN header    468 bytes ZNODES
-X -z   ZGLN header    209 bytes ZNODES

So I'd say that the -X parameter can be completely dropped from all the configs that use -z. That'd also make a bunch of them superfluous, like this would have the exact same options:

zdbsp_compressed
{
	title = "ZDBSP - Compress nodes";
	compiler = "zdbsp";
	parameters = "-z -o%FO %FI";
}

zdbsp_udmf_compressed
{
	title = "ZDBSP - Compress nodes (UDMF)";
	compiler = "zdbsp";
	parameters = "-z -X -o%FO %FI";
}

@kitchen-ace
Copy link
Author

kitchen-ace commented Aug 10, 2024

You're right, whichever of -z and -X (and -Z) is passed last takes priority, as they all control the same internal options.

https://github.com/ZDoom/zdbsp/blob/master/main.cpp#L385

@biwa
Copy link
Collaborator

biwa commented Aug 10, 2024

Simply removing the useless settings poses a bit of an inconvenience, since it'll leave the setting blank in the editor:

grafik

And when trying to save (or probably playtest - didn't test that) it'll complain that the nodebuilder can't be found. Maybe it should just fall back to the default nodebuilder setting in the game config in that case.

@kitchen-ace
Copy link
Author

Maybe it should just fall back to the default nodebuilder setting in the game config in that case.

Does that mean switching nodebuilders for game configs that default to zennode? Probably good to give a warning in that case.

(why is zennode still the default for Doom/Boom/etc. anyhow?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants