[Fixed][BUG][PLAYER] Swimmer falls and splats in water

Started by Akseli, August 13, 2018, 10:04:04 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Akseli

Quote from: Nepster on August 13, 2018, 03:52:33 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.

nin10doadict

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.

namida

QuoteI 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.)
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)

Strato Incendus

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? ;)
My packs so far:
Lemmings World Tour (New & Old Formats), my music-themed flagship pack, 320 levels - Let's Played by Colorful Arty
Lemmings Open Air, my newest release and follow-up to World Tour, 120 levels
Paralems (Old Formats), a more flavour-driven one, 150 levels
Pit Lems (Old Formats), a more puzzly one, 100 levels - Let's Played by nin10doadict
Lemmicks, a pack for (very old) NeoLemmix 1.43 full of gimmicks, 170 levels

IchoTolot

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. ;)

Simon

Yeah, if the digger drowns, then all fallers should drown or swim, never splat.

-- Simon

Nepster

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.

Quote from: 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.
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.

namida

^ 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?
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)

Nepster

I just checked and this only seems to happen for water. At least exits, triggered traps and teleporters behave consistently.

Nepster

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.