Author Topic: [BUG][NL] Swimmer falling through water due to terrain.  (Read 589 times)

0 Members and 1 Guest are viewing this topic.

Offline Flopsy

  • Global Moderator
  • Posts: 849
  • Gotta Go Fast
    • View Profile
[BUG][NL] Swimmer falling through water due to terrain.
« on: August 06, 2021, 02:38:18 PM »


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.
Flopsy's YouTube Channel

SEB Lems (160 levels)
MegSEGAbytes (40 levels)
Modular Lems (10 level minipack)
Gotta Go Fast (NEW 189 level pack as of Sept 2021)
The Flopsy Disk Drive (53 level pack of unused levels)

Offline namida

  • Administrator
  • Posts: 11884
    • View Profile
    • NeoLemmix Website
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #1 on: August 06, 2021, 08:13:25 PM »
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.

Offline Dullstar

  • Posts: 2012
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #2 on: August 06, 2021, 08:29:43 PM »
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.

Offline Proxima

  • Posts: 4393
    • View Profile
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #3 on: August 06, 2021, 08:31:35 PM »
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.
« Last Edit: August 06, 2021, 08:37:05 PM by Proxima »

Offline Dullstar

  • Posts: 2012
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #4 on: August 06, 2021, 09:01:17 PM »
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.
« Last Edit: August 06, 2021, 09:11:06 PM by Dullstar »

Offline Proxima

  • Posts: 4393
    • View Profile
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #5 on: August 06, 2021, 09:46:40 PM »
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.

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

Quote
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

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?

Quote
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?

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.
« Last Edit: August 06, 2021, 10:00:23 PM by Proxima »

Offline IchoTolot

  • Moderator
  • Posts: 3200
    • View Profile
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #6 on: August 06, 2021, 10:14:16 PM »
I agree with Proxima here.

Offline Dullstar

  • Posts: 2012
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #7 on: August 07, 2021, 02:08:34 AM »
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).
« Last Edit: August 07, 2021, 02:16:58 AM by Dullstar »

Offline WillLem

  • Posts: 2221
  • "The quality of light around this time of year..."
    • View Profile
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #8 on: August 09, 2021, 03:51:56 AM »
@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.
« Last Edit: August 09, 2021, 04:03:31 AM by WillLem »

Offline namida

  • Administrator
  • Posts: 11884
    • View Profile
    • NeoLemmix Website
Re: [BUG][NL] Swimmer falling through water due to terrain.
« Reply #9 on: August 16, 2021, 11:50:52 PM »
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.