[✓][BUG] Inconsistency in entering water between swimmer and normal lemming

Started by Armani, July 26, 2024, 05:50:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Armani


This bug only occurs when there're 4 pixels or less between the platform where lemmings are and the bottom boundary of the level.
The swimmer lemming fall into the void while the normal lemming start drowning. While drowning, you can assign a swimmer to save him.
My newest NeoLemmix level pack: Holiday Lemmings 2024 8-)
Xmas themed collaboration pack with Mobiethian :D

My other NeoLemmix level packs(in chronological order):
  Lemmings Uncharted
  Xmas Lemmings 2021
  Lemmings Halloween 2023

WillLem

Possible fix, might be a bit hacky: check for water at Y=PhysicsMap.Height when deciding whether to remove the Swimmer lem. If found, decrement the lem's Y position.

kaywhyn

I've also observed this happening. In Armani's case, I'm going to assume that he first observed it happening in stable 12.12.5, just like me, as I believe he said that he noticed it happening on his level Natural Born from a few LDCs ago. However, in my case, I got completely taken by surprise with this while I was solving 400 metres 3 - The infernal moat (now at 400 metres 13 due to me giving David feedback that the level's way too hard for the third position of the rank) of DavidLems off-camera a few weeks ago. The level has the water pit at the bottom, just like Armani's post.

I can go a bit further than this. I have confirmed that it happens anytime the wall or the water pit is 4 pixels or less in height and that the water pit doesn't necessarily have to be at the bottom of the level. See attached level, where there is also a water pit at the top. Assign the swimmer skill to a Lemming at the top. He will just fall through that water pit instead of touching the water and swimming. However, he will correctly hit the water pit at the bottom and start swimming. If you don't assign the swimmer skill to a Lemming at the top, he will touch the water at the top and drown just like in Armani's case with the water pit at the bottom.

You can do the same with assigning the swimmer skill to Lemmings at the bottom, but same observations: A non-swimmer will touch the water and drown, while a Lemming who has the swimmer skill doesn't touch the water and falls through the water pit.

Here, my guess is this bug has something to do with the changed swimmer physics of 4 pixels being the cutoff point that determines whether a swimmer will dive underneath or climb if he's a climber:

https://www.lemmingsforums.net/index.php?topic=5346.msg89674#msg89674

In any case, a fix is definitely needed, as this is quite odd and inconsistent.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

WillLem

The issue is that water checks for Swimmers are outside of the regular gadget-checking loop, which decides whether or not a lem's position should be adjusted (or if the lem should be removed, in which case the checks are aborted).

So, the bug is actually present for any water object <= 4px in height. The Drowner is handled by the gadget-checking loop, in which a water object is found for a non-Swimmer lem between point A (the starting position) and point B (the initial Faller drop of 4px, so the position is re-adjusted accordingly. Swimmers, on the other hand, require water to be present at the drop height in order to "find" it.

Fixed in SuperLemmix commit ffb1bdd.



EDIT: The above fix wasn't working properly. The swim action was being re-triggered momentarily in situations where the swimmer found an overlapping water/terrain pixel. The correct fix is simply to add a special-case check for water when transitioning to Faller.

Fixed in SuperLemmix commit 4437dde.

Note that this will not be fixed in NeoLemmix CE due to its "compatibility with 12.14" mission statement.