[+][BUG][PHY] Miner turned by Blocker clips through Builder bridge

Started by Flopsy, August 15, 2026, 01:28:27 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Flopsy

RetroLemmini 3.2.1

Skip to 44:10 and watch the left side near the Blockers.

I was hoping the miner would have freed the blocker but it got turned but it then just bugs through the builder bridge leaving no hole. I freed the Blockers to test this and the rest of the Lemmings passed over where the miner drowned.

WillLem

Most likely related to this bug.

The Miner is moved down 2px at frame 0. I haven't been able to figure out why this is, but I imagine it's so that the sprite lines up correctly with the movement.

It probably does warrant further investigation if this is what we're seeing again and again (i.e. Miners clipping through terrain). In the case reported by Flopsy, the movement takes the Miner's foot position into the water trigger and they transition to Drowner.

The terrain clip, then, is actually built into Miner physics. I need to find out:

1) How far back into Lemmini development history this bug goes.

2) What's the exact reason for this 2px adjustment?

For now, the bug is fixed for cases where the presence of Steel or One-Way-Arrows should turn the Miner. The bug discovered by Flopsy is extremely rare, but should still be guarded against if possible.

WillLem

OK... so, the bug reported by Flopsy is actually not related to the 2px vertical movement, it's related to the 4px horizontal movement that the Miner takes at physics frames 6 and 30. This is responsible for clipping a Miner through terrain in the very specific case that:

(a) There is no more than 4px horizontal terrain in front of the Miner (in this instance, a Builder brick)

and

(b) The Miner has been turned by a Blocker at some point prior to (or at) frame 6 or 30, but not on a destruction frame (which would destroy the terrain anyway)

So, a particularly nasty bug with no immediately obvious fix.

WillLem

There are 2 possible fixes here:

1) After being turned by a Blocker, suppress the next 4px horizontal movement.

2) After being turned by a Blocker, reset the action/animation to frame 0.

Both of these fixes guarantee that the Miner will either not clip through terrain, or will destroy the terrain directly in front of them (after turning). However, neither looks quite right (the 2nd is definitely the better of the two in this regard), and both will likely break replays involving turning a Miner with a Blocker.

All other fixes (checking ahead for terrain, checking for during-movement terrain) interact poorly with existing physics, which often has the Miner stepping through existing terrain anyway.

NOTE: It seems worth mentioning that this bug is also present in SuperLemmini. So, it's not being caused by any changes to Miner physics made in RetroLemmini.

The only other option I can think of is to completely refactor the Miner's movement cycle so that it moves across-then-down rather than down-then-across. This could interact poorly with the sprite, though, and still wouldn't guarantee no clipping.