Author Topic: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.  (Read 4795 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
[BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« on: August 20, 2019, 07:44:04 PM »
The general setup for these cases: Assign a bomber such that (a) the lemming ohno'es, and (b) the lemming falls into water before exploding.

As far as I'm aware, the bomber can be substituted with a stoner. I haven't tested this, but can't think of any reason why it wouldn't work. I have confirmed that the nuke can be used for this, it doesn't need to be an actual bomber skill.

First, see what happens when the above is done with no further steps. The ohno'er becomes a drowner, and drowns.

Now, try assigning a swimmer to the ohno'er before they hit the water (you can't do this during the ohno, it must be done before assigning the bomber). Notice how instead of drowning (since swimmers can't drown), they continue falling to the bottom of the water, exploding when appropriate. This part, IMO, is fine.

The bug - in general (and this part itself isn't a bug), you can assign a swimmer to a mid-drowning lemming to save him. However, you can do this even when the above bomber hits the water. Becuase the lemming was no longer going to explode, you've now got a fully functional lemming again. Given that a non-drowning but has-swimmer ohnoer will not start swimming, and cannot be saved by water, I feel this is a bug.

I'm not entirely sure what the best resolution for it is, though. Possibilities are:
a) Ohnoers always ignore water, instead of just if they're swimmers.
b) Ohnoers always drown, even if they're swimmers.
c) Specifically prevent the above case - either the swimmer can't be assigned to the drowner in this case, or upon making the assignment the lemming immediately explodes.

I think B might be the most logical course of action here. A feels less natural, while C means we're introducing a specific new rule for an edge case instead of slightly tweaking an existing one - in a way that should have very little if any side effects - to cover the edge case better.

Related thing to check: Do ohnoer-disarmers falling onto traps also avoid exploding? I suspect not - my first prediction is that they'll get eaten by the trap; though "they ignore the trap and explode" is also possible. That's a much more obvious case and I think Nepster would have thought of this one - if I didn't think of it myself when initially implementing the disarmer, which itself is fairly likely.

Here's a level and a replay that illustrates this bug (and cannot be solved without it - activated via the nuke, rather than a bomber skill, in this case).
« Last Edit: August 20, 2019, 07:49:09 PM by namida »
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: 3608
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #1 on: August 20, 2019, 07:56:04 PM »
I would say b) is the most logical case for me. An Oh-Noer uses his hands to explode --> therefore cannot swim if that makes sense.

a) seems very weird for me when they just fall through the water. This would be my least preferred case.

As a result this also seems like the bug for me:

Quote
Now, try assigning a swimmer to the ohno'er before they hit the water (you can't do this during the ohno, it must be done before assigning the bomber). Notice how instead of drowning (since swimmers can't drown), they continue falling to the bottom of the water, exploding when appropriate. This part, IMO, is fine.


Normally traps catch any type of falling Lemming regardles if he is a disarmer or oh-noer.


Online Proxima

  • Posts: 4562
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #2 on: August 20, 2019, 08:14:47 PM »
I would prefer (c). To my mind, an ohnoer is already a dead lemming, and seeing the ohno animation is just flavour. They shouldn't be available for assigning skills. (Can you assign climber to a normal walking ohnoer?)

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #3 on: August 20, 2019, 08:18:59 PM »
I would prefer (c). To my mind, an ohnoer is already a dead lemming, and seeing the ohno animation is just flavour. They shouldn't be available for assigning skills. (Can you assign climber to a normal walking ohnoer?)

You cannot assign any skill to an ohnoer. This situation arises because the ohnoer hits the water and becomes a drowner, which you can assign one skill to - a swimmer. Assigning a swimmer to a drowner, causes them to transition from drowning to swimming immediately.
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: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #4 on: August 21, 2019, 12:31:45 AM »
A fourth possibility might be to make OhNoers instantly explode/stone on contact with water. Certain situations already skip the OhNo animation, it avoids lemmings falling through water, and avoids a specific case in which a drowner cannot be assigned a swimmer.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #5 on: August 21, 2019, 02:40:10 AM »
Quote
Certain situations already skip the OhNo animation

While this is true, there is currently no situation in which the OhNo animation is interrupted mid-way with an immediate explosion. All situations currently either skip the ohnoer entirely, or have the full ohno'ing animation. Not that this outright means that isn't a possible solution - I actually think that's not a bad idea - but just that there isn't a precedent here based on that.
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 ccexplore

  • Posts: 5311
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #6 on: August 21, 2019, 06:39:52 AM »
Interesting corner case.  IIRC in DOS Lemmings, ohno-ers will ignore water and pretty much everything else except terrain.  It cannot transition to anything else except exploding for good at the end of its short lifetime.

Personally I'm okay with A).  I think it's actually already a little strange and inconsistent that the swimmer+ohno-er will effectively ignore water rather than become a swimming lemming like how it'd normally interact with regular lemming, even though the non-swimmer+ohno-er will react to water and drown (and effectively canceling the impending explosion the ohno-er is supposed to guarantee, even though in that case at least it still dies).  It is more consistent if it just plain ignores water always.  Of course, that may be what happens in DOS Lemmings, but it's possible in NeoLemmix maybe the ohno-er can already interact with many other object trigger types in the level?  In which case ignoring water might then become the odd man out in terms of consistency?

If you do decide that ohno-er can transition to other things, then you have a decision as to whether it should still always be destined to explode, or instead you are legitimizing ways to basically cancel an explosion.  I prefer no canceling of explosions, in which case I'd prefer that however you want to deal with transitions out of ohno and further, the lemming must still explode no matter what at the end of 16 or so frames that the ohno-er normally lasts, even if by then it has changed far away from ohno-ing.  Maybe through a new special internal state marking the lemming as destined to explode immediately no matter what once that 16 or so counter runs out.  Admittedly, maybe this will feel as strange as allowing cancelation of explosions.  So again maybe A is the simplest way out.

[edit: fix incorrect number of frames; 48 is the effective max fall distance]

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #7 on: August 21, 2019, 06:52:50 AM »
I'll add that I can probably accept B as well.  If you consider that conceptually the lemming is already broken/sick/malfunctioning at the point of ohno-ing, you can argue that it can no longer manage to swim even if it has the skill, so it's fine if it always drowns no matter what at that point.  That is if you feel strongly that the lemming should still react to water and transition out of ohno rather than ignore it.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #8 on: August 21, 2019, 07:24:13 AM »
Unless Lemmix is not replicating DOS Lemmings accurately, ohnoers will drown in DOS Lemmings.

In both DOS and NL, ohnoers can interact with exits. This is an intentionally accepted behaviour in NL.
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: 1747
  • #RIP Spearer/Grenader (2020 - 2021)
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #9 on: August 21, 2019, 08:31:13 AM »
So at last this seems to be the NeoLemmix equivalent of a trick I've repeatedly outlined about Lemmings Revolution: In LR, Oh-Noers can't splat, so you can use the Oh-Noer to have a lemming survive a drop that would kill him otherwise, even if you don't have a Floater. Then, you assign a Builder to the Oh-Noer standing on the ground, and he "forgets" that he was about to explode.

In NeoLemmix, this never comes up, because Fallers explode instantly when assigned a Bomber or Stoner, and on-the-ground Bombers that are made to fall by removing the terrain under them at just the right moment, they can never fall a distance even remotely close to splat height before exploding. But of course, they can drop into water if they're close enough already.

Quote
I'm not entirely sure what the best resolution for it is, though. Possibilities are:
a) Ohnoers always ignore water, instead of just if they're swimmers.
b) Ohnoers always drown, even if they're swimmers.
c) Specifically prevent the above case - either the swimmer can't be assigned to the drowner in this case, or upon making the assignment the lemming immediately explodes.

First of all, obviously there's a part of me now that wants to construct a level around enforcing the use of this stupid corner case :evil: . But our goal in general should obviously be to make NeoLemmix as logically consistent as possible.

With that said, and with that in mind: The current behaviour actually is somewhat consistent: If you know that lemmings can only have one state at a time, Oh-Noer or Drowner, and the Drowner "overwrites" the Oh-Noer, then it's not that surprising that the Swimmer offers a way to return from the Oh-Noer, given that we know the Swimmer can let a lemming return from being a Drowner.

b) is consistent with the Disarmer behaviour when falling into a trap; however, I'm not sure IchoTolot's explanation "he's using his hands to oh-no" necessarily works to make this apparent to a new player. Mainly because the Disarmer doesn't really need to use his hands for being a Faller, yet the trap still kills him. Sure, the Disarmer lands on the trigger, but the Disarmer always needs to step onto the trigger to disarm the trap anyway; it's not something he can do "in advance" before even moving into what would be the "danger zone" for any other lemming.

I coud offer a similar "in-flavour explanation" for the current behaviour:

A Bomber uses some sort of explosive to bomb himself, and most likely, that explosive requires a fuse. This was even more apparent with timed Bombers, of course, but unless he explodes in mid-air, the Oh-Noer animation implies the lemming still needs to do something in order to activate the bomb.

When he drops into a water pond at the last moment, the water extinguishes the fuse, and therefore, the lemming can't actually explode (even if he wanted to). He will simply start drowning, like any other lemming would, and consequently, you could save him from drowning like any other lemming. However, there's no need to save him from oh-noing anymore, because the water actually does that, and it makes total sense - both mechanically and flavourwise ;) .
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: 12398
    • View Profile
    • NeoLemmix Website
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #10 on: August 21, 2019, 08:45:47 AM »
Quote
When he drops into a water pond at the last moment, the water extinguishes the fuse, and therefore, the lemming can't actually explode (even if he wanted to). He will simply start drowning, like any other lemming would, and consequently, you could save him from drowning like any other lemming. However, there's no need to save him from oh-noing anymore, because the water actually does that, and it makes total sense - both mechanically and flavourwise ;) .

This would only be consistent if (a) an already-existing swimmer also cancelled the exploding upon hitting water, and (b) it was not possible to assign a bomber to a lemming while swimming. Not to mention, that explanation doesn't make so much sense for stoners - I haven't tested, but I'd believe everything mentioned here is equally applicable to them, based on that the ohnoer is the same state either way, just with a flag that determines whether it explodes or stones when finished.
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 ccexplore

  • Posts: 5311
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #11 on: August 21, 2019, 08:47:58 AM »
Wow, how embarrassing, i can't believe I remembered it so wrong. :-[

I do remember that a lemming whose exiting could oh-no, but I wasn't sure if the oh-no could then exit again or not, and thought maybe it couldn't.  But I just checked and that's not the case.

I guess they allowed it because most object triggers either have no meaningful impact to the lemming, or it'll kill them anyway.  Though the exiter case is already kind of weird.  I frankly don't know if that feels right to me, but I guess it's too late to do anything about that.

From looking at the DOS Lemmings code (ie. not just Lemmix, the actual DOS Lemmings assembly code), what happens is that the ohno processing ends by jumping into another part of code that was written for faller handling, which mainly checks for level bottom boundary, but then does end with interactive object detection and procesing.  It definitely saves a few bytes to jump to code already written rather than repeating it for ohno, but it's impossible to know whether they are fully aware that in doing so, this also allows interactions with all objects for ohno-ers.

Given this is the precedent, and at the same time, we most probably don't want to introduce any changes that would actually make it possible to fully cancel an exploding lemming (ie. we probably don't want them be able to turn swimmer and completely skip dying), I guess B (always drown) would then be the most consistent choice.  The ohno lemming will interact with the water just like it apparently can interact with anything, but it's sick and cannot do swimming like it normally could.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #12 on: August 21, 2019, 09:03:53 AM »
To be clear, I'm assuming we don't want to allow canceling an explosion through ohno -> swimmer, but personally I don't care one way or another.  I'm mainly assuming that the ability to cancel an explosion may be too backroute-prone, but this admittedly seems to be a pretty specific setup, and it also seems like there is no clear advantage to waste a bomber just to make this behavior happen, when you could simply not assign bomber to start with.  So maybe it's not even that big a deal from a backroute-prone perspective.  About the only thing interesting you can do puzzle-wise with explosion-canceling that I can think of, is maybe to save some lemmings from a nuke.  This seems tricky to exploit generally, but admittedly could probably be exploited in some cases.

Given that ohno-ers effectively can have the impending explosion be canceled today by all manners of objects, the fact that some cases can then lead the lemming to permanently survive is perhaps not all that strange, if you already accept the canceling as fact.  After all, exiting is also a form of permanent survival and we've allowed that for ohno-ers, apparently!  So in that perspective, maybe the right thing is actually to allow an already-assigned-swimmer lemming to actually go swimming when they hit water during ohno.  After all, that's how they were meant to interact with water, and we allow interactions with water.  But that is probably too backroute-prone to introduce such behavior now when currently they die?

Offline Strato Incendus

  • The King of Shimmiers (crowned by Flopsy ;D )
  • Posts: 1747
  • #RIP Spearer/Grenader (2020 - 2021)
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #13 on: August 21, 2019, 09:04:53 AM »
Quote
This would only be consistent if (a) an already-existing swimmer also cancelled the exploding upon hitting water, and (b) it was not possible to assign a bomber to a lemming while swimming.

Oops... How could I, the creator of the infamous "Dark fate of Atlantis" from Paralems, have forgotten about that? :D

In that case, I think it would actually make more sense for Oh-Noers falling into water to instantly explode if they are Swimmers - given that Swimmers who are assigned Bombers or Stoners also perform the skill immediately.

Yes, that would require stopping the Oh-No animation in the middle, which would be a new thing and probably somewhat challenging to program.

However, without that, we can quickly imagine a new corner case by adding another corner to the scenario, and ccexplore already hinted at it:

Quote
After all, exiting is also a form of permanent survival and we've allowed that for ohno-ers, apparently!

Let's say, you have a Swimmer that is assigned a Bomber while standing on terrain, it starts to Oh-No, then drops into the water - right above the exit, which is also placed in the water. The Swimmer-Oh-Noer drops right onto the trigger of the exit.

Non-Swimmers can't access exits in water, even if they fall into them straight from above, just like Non-Floaters / Non-Gliders can't fall into an exit in mid-air.
Swimmers and Oh-Noers, however, both can access exits.
This lemming is both a Swimmer and an Oh-Noer, so there is absolutely no reason why it should drown, and two reasons why it should enter the exit. ;)
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 IchoTolot

  • Global Moderator
  • Posts: 3608
    • View Profile
Re: [BUG][PLAYER] Swimmer-Drowner-Bomber physics bugs.
« Reply #14 on: August 21, 2019, 02:20:11 PM »
It still feels right to me that the oh-noer should not be a special case that doesn't react to water at all. So I think a reaction should be there.

Now is the question: Explosion, swimming or drowning?

Swimming I think should be out as that would recycle the Lemming. That seems to be in the minds of most people here.

And between an instant explosion (which seems very weird to me) and the drowning I still think the drowning is the answer even if the Lem is a swimmer. The Oh-Noer I think should cancel out the other permanent skills. Also this would create a completely new type of special case where an Oh-Noer can be cut short for a faster explosion.

Let's take the following line of thinking under the basic assumption "Swimming should be out of the question as that would recycle the Lemming":

1.) An oh-noing disarmer should not be able to disarm traps anymore, although he can be eaten by them. (A oh-noing climber also stops climbing for example)

2.) A swimmer being assigned a bomber explodes instantly, but this is a no Oh-No case and he does not swim anymore right after the assignment and just explodes.

3.) In our problem we have the case that the Lemming is already Oh-Noing and does not already swim.

4.) We have situation 3.) now and under the assumption "Swimming should be out of the question as that would recycle the Lemming" the Lemming should NOT behave after 2.) as that would be the exact reaction of a swimmer in water, therefore impling that he briefly switched to swimming in order to interrupt the Oh-Noing to explode instantly.

5.) If the Lemming should not behave like a swimmer that therefore renders out swimming (after the basic assumption) and exploding (as that would imply that he switch to swimming), he should behave like every other Oh-Noing and simply drown, what would be consistant with 1.) on top of that: A oh-noing swimmer should not swim anymore, but again should be "eaten" by the water.

As a result, I would still go with b.) "Ohnoers always drown, even if they're swimmers", as this avoids new special cases where Oh-Noers can prematurely explode and does not have any kind of hint that the Lemmings was recycled from an Oh-Noer to a Swimmer, even if the Swimmer explodes instantly and does not swim. :)