Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: Akseli on August 13, 2018, 10:04:04 PM

Title: [Fixed][BUG][PLAYER] Swimmer falls and splats in water
Post by: Akseli on August 13, 2018, 10:04:04 PM
That's a very interesting question. There might be a good solution to this by checking for water before checking for solid terrain, but I would have to look at the precise implementation to determine what can actually be done without negative side-effects. Please make a forum thread regarding this issue.

- Assign a lemming swimmer and climber skills.
- Dig a hole that ends in water and will be fatal fall distance from top to bottom, digger turns into a swimmer and climbs up the wall.
- When swimmer falls in this hole, the water should save him, but depending on the exact height of the fall he might splat.
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: nin10doadict on August 14, 2018, 05:56:37 AM
Upon testing this the behavior seems strangely inconsistent. My tests showed that heights of 1, 2, and 4 pixels above splat height killed the lemming, but 3 pixels strangely did not. :lix-unsure: No idea if this behavior would be the same for other attempts.

I haven't tested more cases. The lemming appears to be checking for the floor and the water which are exactly overlapping, but which one takes priority isn't always fixed when it should be the water taking precedence every time.
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: namida on August 14, 2018, 07:19:35 AM
Quote
I haven't tested more cases. The lemming appears to be checking for the floor and the water which are exactly overlapping, but which one takes priority isn't always fixed when it should be the water taking precedence every time.

One could argue that the terrain should take precedence; but the important thing is that it should be consistent. (Though I would be in favor of the water doing so.)
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: Strato Incendus on August 14, 2018, 08:13:45 AM
Why should the terrain take precedence? Swimmers have never been splatting when falling into water, hence, digging or bombing holes into terrain to reach a water pit to break a fall has become part of many intended solutions. These would become impossible with such a rules change, wouldn't they? ;)
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: IchoTolot on August 14, 2018, 08:47:07 AM
When a digger digs and turns into a swimmer upon reaching water, I would call it logical that lemmings falling into the same tunnel either drown or swim (just as the digger).

The terrain taking priority in this case doesn't make sense to me. When the digger swims so should everyone else after him.


@ Strato: The rule of swimmers surviving the fall into water is not in question. Only the edge case of a hole just reaching the water is inconsistent for different lems and needs to be adjusted to be the same rule for all.  No levels in danger. ;)
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: Simon on August 14, 2018, 09:55:59 AM
Yeah, if the digger drowns, then all fallers should drown or swim, never splat.

-- Simon
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: Nepster on August 14, 2018, 03:38:30 PM
Assuming the quote from my PM did not make it clear: I, too, am in favor of letting the falling lemming drown/swim. The main question for me is how to implement this without negative side-effects.

Upon testing this the behavior seems strangely inconsistent. My tests showed that heights of 1, 2, and 4 pixels above splat height killed the lemming, but 3 pixels strangely did not. :lix-unsure: No idea if this behavior would be the same for other attempts.
That actually makes a lot of sense, once you know how to code works: We first determine whether we would splat, but just remember the outcome of this and not yet turn the lemming into a splatter. Then we go pixel by pixel down to see whether we hit another trigger area in between. If so, this trigger area (be it a teleporter, a trap or as in this case water) takes precedence and we forget about wanting to splat.
If you are interested, why this works like this, please refer to the thread Lemmings splatting mid-air. (https://www.lemmingsforums.net/index.php?topic=3005.0)
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: namida on August 15, 2018, 05:42:47 AM
^ So, then, is it simply a matter of that it doesn't check for trigger areas when the movement has come to an end?

And by extension, would a similar situation happen with other objects? Eg. if a lemming falls onto a trap, where the top of the trigger area lines up exactly with the terrain, might that lemming also splat or get trapped depending on the exact height?
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: Nepster on August 17, 2018, 07:11:05 PM
I just checked and this only seems to happen for water. At least exits, triggered traps and teleporters behave consistently.
Title: Re: [BUG][PLAYER] Swimmer falls and splats in water
Post by: Nepster on August 17, 2018, 07:52:50 PM
According to the code, the falling swimmer should always have splatted, regardless of where it started - which at least would have been consistently the incorrect behavior :P. Not sure what special-casing turned the falling lemming into a swimmer sometimes, but anyway... It is fixed now.