[BUG][NL] Swimmer falling through water due to terrain.

Started by Flopsy, August 06, 2021, 02:38:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Flopsy



in the area circled. A swimmer lemming will stop swimming and fall through the water and off the stage entirely.

It is terrain which is 2 pixels wide with water on both sides.

namida

I explained this on Discord, but in short: It's a non-bug. The Swimmer sees empty space below the wall (because underneath the level is empty space), with no trigger area, so moves downwards and falls out of the water.

This is a change from older behavior, albeit a change that happened in V12.11, not V12.12 - specifically, prior to this, if the swimmer saw empty space underneath a wall that he could move down to, but that pixel was open air instead of water, he would refuse to move down to it. The bottom of the level is not special in this regard - the same setup in midair would have the same result as this setup would, in any version.
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)

Dullstar

This seems to me like a bit of an edge case/oversight in the intended behavior: the code's doing exactly what it's supposed to, sure, but I don't think that can/should be used to argue that this behavior is correct.

The swimmer does seem particularly prone to these types of seemingly-a-bug setups, and I'd suggest it's probably the most broken skill in the game from a technical perspective.

Proxima

For reference, this is the topic in which the "swimmer won't fall out of water" behaviour was noticed and discussed, and it was decided to change it.

In that topic, we mainly considered water at the top of the level or above air, not at the very bottom -- but I agree with namida that water at the bottom of the level should behave in the same way, because conceptually, the space underneath the level is empty.

Similarly, a walker lemming can ascend a step of up to 6 pixels, and therefore if he runs into such a step at the very top of the level, he will ascend out of the level and die. The terrain may be pillar-like and intended to look as if it continues out of the level, but it doesn't and can't -- it would be unreasonable for the player to have to make guesses about what's outside the level, and so the most consistent and fair behaviour is for the outside of the level to be treated as empty.

Dullstar

#4
I still think that goes too much into "the player is expected to know the internal physics of how skills work to figure out what will happen in a given case" territory.

Now, because of a change made to allow upside down water, levels that use water at the bottom have to pay a design potential debt and pad the trigger areas to make sure the water is not too close to the bottom, or strange things will happen.

The low level physics details exist to implement the desired behavior; the desired behavior should not be left to be a purely emergent property of whatever low level rules we decided on when it causes some sort of weird behavior like this. I'd pose this question:

Assume a player who doesn't know how the terrain checks for the swimmer are handled internally. What about the observed behavior is expected or reasonable?

Sure, we decided we wanted upside down water to be a thing for some reason... but now we're making levels that use water objects at the bottom pay for the complexity it introduced by causing wonky stuff to happen when the trigger area is too close to the bottom of the level.




Also, that thread did seem to very much have an attitude of "sure, make the change, but only if it doesn't break any existing behaviors" regarding this change.

I'd argue this is your breakage.

Proxima

Quote from: Dullstar on August 06, 2021, 09:01:17 PMNow, because of a change made to allow upside down water, levels that use water at the bottom have to pay a design potential debt and pad the trigger areas to make sure the water is not too close to the bottom, or strange things will happen.

No, that's not at all true. It's true that WillLem originally made the point regarding upside-down water, but we quickly realised there was an issue of unexpected behaviour with any water, and the rest of the discussion concentrated on that. (Upside-down water is just a visual effect; internally the object is just a rectangle of water and should, and does, behave like any other rectangle of water.)

QuoteLevels that use water at the bottom have to pay a design potential debt and pad the trigger areas to make sure the water is not too close to the bottom, or strange things will happen

Levels that use terrain close to the top have to make sure the lemmings aren't allowed to walk too high, if you don't want them stepping up and out of the level. How is this different?

QuoteAssume a player who doesn't know how the terrain checks for the swimmer are handled internally. What about the observed behavior is expected or reasonable?

Suppose a lemming is swimming under sloped terrain, and therefore its position is going down 1 pixel at a time. What would you expect to happen when it reaches the bottom of the level? I would certainly expect it to die.

And if that's allowed, then as the size of the bottom step increases, there has to be some arbitrary dividing line where it becomes high enough to hold the lemming back. "Being expected to know the internal physics" is unavoidable, unless you push the water and terrain far enough away from the edge that the step is clearly high enough.


Dullstar

#7
In this case, I want more aggressive warning options for the editor, with this triggering one when extra warnings are enabled (I guess it would be "Top of water trigger area less than 6 pixels from the bottom of the level" if I'm understanding what causes this correctly).

WillLem

@Flopsy

Having spent a lot of time with this mechanic when working on Inverse Lemmings, the easiest way to fix this behaviour when you don't want it to happen is to include a vertical wall of at least 5 pixels at the point that you want the lemmings to turn around and carry on swimming the other way.

If all points of the slope are equal to or less than 4 vertical pixels, the lemming will continue to descend until they reach the bottom of the water trigger, at which point they will transition to faller. In the case of your level, the bottom of the water is at the edge of the level and so the lemming falls straight off the edge immediately after exiting from the trigger area.

---

To address Dullstar's point about design costs, it's easy enough to re-imagine the layout of that part of a level, and it helps to reinforce to players that a descending swimmer must hit a solid vertical wall of at least 5 pixels in order to turn around rather than continuing to descend through the water's trigger.

The question of whether the behaviour is reasonable or expected has already been addressed at length long before its implementation, but another point that perhaps wasn't raised even then would be that if the lemming reaches the bottom of a mid-air water trigger, they have reached air and no longer have any water beneath them to support their weight. Since lemmings (probably) weigh more than air, they should fall.

I also agree with Proxima here, and am obviously very strongly in favour of the behaviour having suggested it in the first place. As far as I can tell, it was accepted mostly due to it making physical sense generally rather than due to its proclivity towards being used for upside-down water.

namida

At any rate - as it is established that there is no bug here, just an unexpected / controversial intended behavior, I am closing this topic as per physics suggestions no longer being considered.
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)