coelckers / prboom-plus

This is a cleaned up copy of the PrBoom+ SVN repository as a courtesy for those interested in forking that port
289 stars 115 forks source link

UMAPINFO: Questionable default handling of exiting the secret levels #498

Open ViolentBeetle opened 2 years ago

ViolentBeetle commented 2 years ago

I am not sure it's a bug, but it seems wrong. If map has an associated UMAPINFO entry, exiting the level normally appears to go to the next map numerically. Which is logical, except on secret levels where the game should instead return player to normal progression (ie MAP16 in Doom 2, or E1M4 in first episode of Doom) but instead goes to the next level numerically and crash because MAP33 or E1M10 et al don't exist.

Steps to reproduce:

I confirmed this handing in PrBoom+ v2.6um and DSDA-Doom 0.24.3 but not in gzDoom

JadingTsunami commented 1 year ago

This seems like a bug that should be filed against the UMAPINFO spec, in the following section:

UMAPINFO spec - default handling

kraflab commented 1 year ago

There is no such thing as a "secret level" in umapinfo. The game doesn't know how you arrived at a map. Similarly there is no "normal progression" except that the map number goes up by 1 when you leave a map.

kraflab commented 1 year ago

For sure I'll say under no circumstance can we change what map you go to by default when you leave a map, that would be a massive break in behaviour that could affect any number of wads and would create a critical split between future versions of the port and old versions.

JadingTsunami commented 1 year ago

There is no such thing as a "secret level" in umapinfo. The game doesn't know how you arrived at a map. Similarly there is no "normal progression" except that the map number goes up by 1 when you leave a map.

Yes, and the specification should define the default behavior. Adding a default behavior note that says "The exit to all maps defined in UMAPINFO will proceed to the next numerical map unless next and/or nextsecret are specified, in which case the respective target is used" would be enough.

Otherwise the "default progression" can be ambiguous: is this the way the map would behave if no UMAPINFO were present? The issue filed here assumes that. The current wording of the spec mentions "hard coded" engine defaults but doesn't lay out what those are.

Normally, if some information cannot be found, the engine will fall back to its hard coded implementation, with a few exceptions: [...]

It seems like a reasonable reading of this statement to assume secret exits work the way they do in the engine by default.

This can be addressed by updating the spec to reflect the de facto standard.

kraflab commented 1 year ago

I agree, it should be more specific in the spec, I'll put in an update.