[FIXED]Miner mask cloned while turning around and freeing blocker[GLITCH][V-EXP]

Started by Nepster, May 19, 2016, 05:30:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nepster

Here is a glitch, that only occurs in the experimental versions, because it requires cloning of miner masks (which were introduced to fix this bug).

If you assign a blocker in front of a miner while the miner is on his first terrain removing frame, the miner will turn on the second terrain removing frame, thereby removing the terrain below the blocker. This will free the blocker again and the miner will continue in the other direction. Note that this set-up can not occur in a usual miner tunnel (without specific external terrain setup), because the blocker needs to be placed too far away from the miner, i.e. within solid terrain.
Please frame-step through the attached level+replay to get a better understanding of the bug.

Here are two proposals to fix this glitch:
1) On the terrain removal frames and the one after that, do not check whether to turn around due to one-way-fields and blockers. Note that the third no-check frame is really necessary, if the blocker has a higher index than the miner, because then the miner will do his blocker checks before the blocker is actually freed.
2) If encountering a blocker field, first turn around and then apply the miner mask. While this ensures that the blocker does not get freed right away, this will might leave a miner-staircase from the first terrain removal frame for miners. Then the blocker can later be removed (e.g. by a walker) and the ledge may be used by all lemmings.

PS: And the replay shows that it is sometimes insufficient to copy the lower half of the miner mask when turning around. 

IchoTolot

Hm that's a harder descision  1) has no staircase, but it could lead to it beeing more difficult to turn around miners with blockers.
                                                      2) has this staircase on the other hand

I am leaning slightly towards 1), but it should be tested if it's still easy enough to turn around miners + not a lot of replays break which are using this trick

                                                     then 2) would be better as the staircase is not the biggest deal in the world after all

Nepster

Very good point: I checked the code and it turns out that we already don't do blocker field checks for the two terrain removal frames. So the problem is purely with frame 3, i.e. the one after applying the miner masks when the miner makes his first step.
This changes the implications of my two suggestions drastically:
1) would now imply that the miner would always move one step down whenever he started his stroke, therefore it will indeed get much harder to turn him around.
2) would not work at all, unless adding blocker field checks on the terrain removal frames as well.

That said: I really have to go back to the V1.43 code and see how this is handled there...

Nepster

Turns out that my initial thoughts about the reason of this bug was completely off:
On frame 2 (and on frame 1), i.e. the second on of terrain removal, the miner now checks for hitting interactive objects (due to this bug fix). As such the miner checks for one-way-fields as well, which are no different than blocker fields (as far as the code is concerned). So in the experimental versions, the miner already finds the blocker on frame 2, compared to frame 3 in NeoLemmix V1.43 and turns around.

So let us look into why frame 3 is harmless: If the miner has lower index than the blocker, then on frame 2 the terrain below the blocker lemming gets removed and the blocker lemming reverts to a faller already on frame 2. Thus there will never be a blocker field in existance.
If the miner has higher index, then the blocker lemming first sets up the blocker field on frame 2. Then the miner removes the ground below the blocker (still in frame 2), but doesn't check for the blocker field. On frame 3, the blocker goes first and reverts to a faller, so when it's the miner's turn, the blocker field is already gone.

This yiels bug-fix proposal 3) Remove the blocker field checks for miners on frames 1 and 2, though keeping the triggered trap checks during these frames. 

namida

QuoteSo let us look into why frame 3 is harmless: If the miner has lower index than the blocker, then on frame 2 the terrain below the blocker lemming gets removed and the blocker lemming reverts to a faller already on frame 2. Thus there will never be a blocker field in existance.
If the miner has higher index, then the blocker lemming first sets up the blocker field on frame 2. Then the miner removes the ground below the blocker (still in frame 2), but doesn't check for the blocker field. On frame 3, the blocker goes first and reverts to a faller, so when it's the miner's turn, the blocker field is already gone.

This yiels bug-fix proposal 3) Remove the blocker field checks for miners on frames 1 and 2, though keeping the triggered trap checks during these frames. 

I thought this would already be the case. The 3rd one somewhat introduces an extra rule, but is probably more consistent with existing (stable) mechanics, simple enough to implement, and probably has the least side effects.
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)