[BUG][PLAYER] False positive in detection of mixed steel / nonsteel groupings

Started by namida, August 20, 2020, 07:38:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

This is a specific situation relating to a level sent to me by another forum member, and I do not currently know what the cause is - my investigating so far is only as far as "I can confirm that the bug happens for me too".

This level loads and saves perfectly fine in the editor (EXP V1.26-B), but gives an error message about a group containing a mix of steel and nonsteel when loaded in NL itself (and thus doesn't load). On the balance of probabilities this is more likely a bug in the player, but I cannot say this for sure yet.

Should this turn out to be a player bug, it will be fixed in V12.10, and no editor update that supports piece grouping will be released until player V12.10 is too. If it's an editor bug, of course, that's just a matter of an editor update.

EDIT: Confirmed to be an editor bug and that it is indeed allowing mixed groupings. Have not yet figured out the "why", only the "what".

EDIT2: Confirmed to actually be a *player* bug after further investigation.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

I can now confirm this is an editor bug. The level does indeed contain a group that has a mixture of steel and non-steel.

This was determined by analyzing the level file, and I have not yet figured out why the editor allowed this to happen, nor why the editor does not complain when loading the level.

Only a single group is affected, so the level should be mostly salvageable.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

I may have spoken too soon on this - on closer inspection it appears I've overlooked that all nonsteel pieces were erase. So now it's looking like it's actually a player bug.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

Confirmed, this is a player bug, and I have found the exact cause.

The issue arises from how the player detects a mix of steel / nonsteel. In laymans' terms - it makes a note of if the first piece in the group is steel or not, then compares every other non-erase piece to this first one.

This usually works fine, but there is an edge case (which was the case here) where it fails - if the first piece in the group is set to Erase. Of course, it's pointless to actually do so, but it isn't invalid input, so it needs to be handled correctly.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

In short - this bug occurs when two specific conditions are both met in the same terrain group:
1. The first piece in the group is set to Erase
2. The first piece (the erase one) is steel but all non-erase pieces are not; or vice versa

This is fixed in player commit 7a4c85b, the fix will be included in V12.10 (not a V12.9.X update).
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)