Author Topic: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth  (Read 1540 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
[PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« on: January 01, 2021, 08:40:08 PM »
Attached level demonstrates it best, but basically - when a Swimmer encounters terrain and needs to move downwards, it can move further if it is not a climber, than it can if it is one.

This is presumably meant to be "climbing has priority over diving if the dive would be this far", but didn't have a fallback "...but still dive if climbing is not possible".
My Lemmings 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)

Offline WillLem

  • Posts: 3401
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« Reply #1 on: January 02, 2021, 08:39:53 AM »
Solved 8-)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« Reply #2 on: January 17, 2021, 02:09:46 AM »
Fixed in commit bc6f87c. Topic remains open to discuss the fix and whether a different fix would be better.

Old behavior when a Swimmer encounters a wall that it cannot step up (or swim upwards) onto:
- If the wall, going downwards, is 3px or less tall, dive
- If the wall is exactly 4px, and the lemming is not a climber, dive
- If the wall is exactly 4px, and the lemming is a climber, climb the wall if possible, otherwise turn around (note that there is no "dive")
- If the wall is 5px or more, turn around (or climb, if a climber and possible to do so)

New behavior:
- If the wall is exactly 3px, dive
- If the wall is exactly 4px, is climbable, and the lemming is a climber, climb it
- If the wall is exactly 4px, and the lemming is not a climber or could not climb the wall, dive
- If the wall is 5px or more, turn around

This alteration presents the fewest possible breaks to existing content possible - the only situation where a level / replay will break is if a climber-swimmer encounters a wall that he cannot climb, that extends 4px below his current position.

The alternative possibility was to simply keep the "dive up to 4px" behavior even for climbers, and only attempt to climb in cases where diving would not be possible. This is a simpler overall rule, but it poses a slightly higher risk of breaking existing content.
My Lemmings 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)

Offline Strato Incendus

  • The King of Shimmiers (crowned by Flopsy ;D )
  • Posts: 1754
  • #RIP Spearer/Grenader (2020 - 2021)
    • View Profile
Re: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« Reply #3 on: January 17, 2021, 02:18:56 PM »
Quote
The alternative possibility was to simply keep the "dive up to 4px" behavior even for climbers, and only attempt to climb in cases where diving would not be possible. This is a simpler overall rule, but it poses a slightly higher risk of breaking existing content.

Could you elaborate how? ;) Keeping more of an existing behaviour would actually lead to more content breaking than changing the existing behaviour? That sounds kind of confusing.
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

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« Reply #4 on: January 17, 2021, 06:24:39 PM »
Quote
The alternative possibility was to simply keep the "dive up to 4px" behavior even for climbers, and only attempt to climb in cases where diving would not be possible. This is a simpler overall rule, but it poses a slightly higher risk of breaking existing content.

Could you elaborate how? ;) Keeping more of an existing behaviour would actually lead to more content breaking than changing the existing behaviour? That sounds kind of confusing.

Existing behavior is that climbers will dive up to 3px, otherwise they'll attempt to climb (and turn around if they can't). Normal lemmings will dive up to 4px (and turn around if they can't).

The change will mean that climbers will still dive up to 3px, otherwise attempt to climb - but if this fails, they'll attempt a 4px dive (like a non-climber would) before resorting to turning around. Alternate proposal (that would give more breakage) would mean climbers will attempt the 4px dive first, and only try to climb if that fails.

Both options would break levels which have 4px unclimbable dives encountered by swimmer-climbers; but the "always try to dive 4px" will break levels which have climbable walls (that could also be dived under by 4px) too.
My Lemmings 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)

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« Reply #5 on: January 18, 2021, 01:24:04 AM »
My expected behavior is that if a Swimmer turns around, a Climber/Swimmer would begin climbing if possible, and if a regular swimmer does not turn around, I would not expect a climber/swimmer to begin climbing. I support whichever possibility brings it closer to that behavior.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« Reply #6 on: January 18, 2021, 03:07:40 AM »
My expected behavior is that if a Swimmer turns around, a Climber/Swimmer would begin climbing if possible, and if a regular swimmer does not turn around, I would not expect a climber/swimmer to begin climbing. I support whichever possibility brings it closer to that behavior.

This would be the "always attempt to dive 4px before considering climbing" outcome.

I guess, all things considered, while this could break some levels, it should be rare and easily fixed...
My Lemmings 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)

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
Re: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« Reply #7 on: January 18, 2021, 02:13:51 PM »
Quote
The change will mean that climbers will still dive up to 3px, otherwise attempt to climb - but if this fails, they'll attempt a 4px dive (like a non-climber would) before resorting to turning around. Alternate proposal (that would give more breakage) would mean climbers will attempt the 4px dive first, and only try to climb if that fails.

So this would mean that there just is another thing that they try before turning around: Diving up 4 pixels. This results in an edge case where a climber+swimmer behaves differently from a normal swimmer at an uneven mass of terrain.

This affected case is pretty rare. We would have to look at levels where lemming swimm at a uneven mass of terrain with that exact 4 pixel difference where the lemmings is also a climber.

I would make an exp version and try out the cleaner way "always attempt to dive 4px before considering climbing", then run a bunch of replays of many packs through it. Then assess the breakage. If it's very low or non-existent, stick with it. We could maybe even try to compare with the other way if needed.

I would suspect still that the breakage is very low or non existent as the case is pretty rare - it was even just discovered recently.

So I would carefully try the cleaner way "always attempt to dive 4px before considering climbing" as this case seen very very rare to me. Still, let's be careful and run a test.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [PHYS-BUG][PLAYER] Being a Climber affects Swimmer dive depth
« Reply #8 on: January 18, 2021, 07:37:14 PM »
Okay - in commit e319eb5, I've implemented the simpler behavior. This will be how the swimmer behaves in the initial RC build; if too much breakage arises, I'll revert back to the earlier fix. If not, I'll keep this one.
My Lemmings 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)