Author Topic: Wheel of Misfortune -- inconsistent physics  (Read 3615 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Wheel of Misfortune -- inconsistent physics
« on: August 13, 2016, 06:15:25 PM »
Hi,



Here's a bug level, Wheel of Misfortune. See attachment for level, and for the solving replay.


This level highlights an inconsistency of the engine. Decide whether there is a bug, and if so, what to do!

The inconsistency -- spoiler (click to show/hide)

My proposal -- spoiler (click to show/hide)

-- Simon
« Last Edit: August 13, 2016, 06:34:33 PM by Simon »

Offline IchoTolot

  • Global Moderator
  • Posts: 3608
    • View Profile
Re: Wheel of Misfortune -- inconsistent physics
« Reply #1 on: August 13, 2016, 07:00:34 PM »
I would join Simon's proposal, that the trap should react to the blocker.  The exit does and so should the trap.

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Wheel of Misfortune -- inconsistent physics
« Reply #2 on: August 26, 2016, 06:12:53 PM »
For now I implemented, that blockers react to all trigger types, except to flippers (where the only effect would be a madly dancing flipper and a totally arbitrary walking direction once the blocker is freed). So not only will be blocker be eaten by the Wheel of Misfortune, blockers will also be teleported away,...

Note that this isn't yet a final decision on this matter. If it turns out that there are problems with the new mechanics, or that it is generally disliked, we can easily revert the changes and go back to the V1.43 machanics.

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Wheel of Misfortune -- inconsistent physics
« Reply #3 on: August 27, 2016, 04:42:43 AM »
For now I implemented, that blockers react to all trigger types, except to flippers (where the only effect would be a madly dancing flipper and a totally arbitrary walking direction once the blocker is freed). So not only will be blocker be eaten by the Wheel of Misfortune, blockers will also be teleported away,...

Note that this isn't yet a final decision on this matter. If it turns out that there are problems with the new mechanics, or that it is generally disliked, we can easily revert the changes and go back to the V1.43 machanics.

The one thing that comes to mind is when should the blocker field be removed?

In the case of teleporters, should it disappear immediately and be restored only when the lemming is "freed" from the receiver?

In the case of a trap, should it remain until the trap animation is finished?

The reason for putting this forward is that we already have one special case where a blocker field remains on a non-blocker - when the blocker becomes an OhNoer.

Also - what you describe with splitters would not happen, I don't think. Unless you've changed this, when a lemming enters a splitter's trigger area (regardless of whether or not it causes a change in direction), it gains immunity to that splitter (but not other splitters) until it has spent one frame outside the splitter's trigger area.



Otherwise, one alternative solution could simply be to add Ohnoer to the conditions that are not eligible to disarm (and thus they would get trapped). This already applies for most other states that aren't walkers.
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 Nepster

  • Posts: 1829
    • View Profile
Re: Wheel of Misfortune -- inconsistent physics
« Reply #4 on: August 27, 2016, 08:48:02 AM »
The one thing that comes to mind is when should the blocker field be removed?

In the case of teleporters, should it disappear immediately and be restored only when the lemming is "freed" from the receiver?

In the case of a trap, should it remain until the trap animation is finished?

The reason for putting this forward is that we already have one special case where a blocker field remains on a non-blocker - when the blocker becomes an OhNoer.
There is one difference: OhNoers are still standing at the blocker's position and act of their own will (as much as lemmings ever do that). So they can still communicate to other lemmings that they should turn around.
Teleporting lemmings on the other hand are simply nowhere on the level, so how can they interact with other lemmings? And when would we switch the position of the blocker field to the receiver? If we do when the receiver starts working, then the blocker field appears before the lemming arrives there. If we only add it once the receiver animation is finished, then we have a blocker field in front of a non-working teleporter for a time.
For lemmings that are killed by traps: I personally consider them dead the moment the animation starts, because in the last frames of the animation, the bits and pieces that remain are certainly no longer a living lemming. And I have a hard time believing, that a dead lemming within a trap can still maintain a blocker field, especially if the trap moves the lemming away as e.g. the chameleon or the rope trap (pillar style) do. (On a side note: As we currently remove lemmings when triggering a trap, keeping blocker fields would mean rather big changes in the code here).

For these reasons, the blocker fields for teleported or trapped lemmings are currently removed on encountering the trigger area, and only reset (in the case of teleporters) when the lemming appears again at the receiver.

Also - what you describe with splitters would not happen, I don't think. Unless you've changed this, when a lemming enters a splitter's trigger area (regardless of whether or not it causes a change in direction), it gains immunity to that splitter (but not other splitters) until it has spent one frame outside the splitter's trigger area.
Thanks, I forgot about this. But either way, splitters don't interact with blockers, so no harm in keeping the current code.

Otherwise, one alternative solution could simply be to add Ohnoer to the conditions that are not eligible to disarm (and thus they would get trapped). This already applies for most other states that aren't walkers.
Very good point. OhNoers disarming traps doesn't make any sense. This bug was even present before changing the blocker behavior:
Spoiler for LPIII (click to show/hide)

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Wheel of Misfortune -- inconsistent physics
« Reply #5 on: October 10, 2016, 10:13:17 PM »
This depends on terrain below feet now.

In 1.48:
<Nepster> Lemming can disarm trap if it has a pixel below its feet and is not climbing, swimming or ohnoing.
<SimonN> wtf, since when does stuff
[triggered traps] depend on pixel below

I'm sure this will catch many corner cases, but trap behavior depends on pixels below feet now. Strikes me as odd. Other gadgets never depend on terrain?

-- Simon

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Wheel of Misfortune -- inconsistent physics
« Reply #6 on: October 11, 2016, 01:48:28 AM »
The disarming action depends on having terrain to stand on. The trap's kill effect can still impact a midair lemming.
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 Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Wheel of Misfortune -- inconsistent physics
« Reply #7 on: October 11, 2016, 03:11:44 AM »
The disarming action depends on having terrain to stand on. The trap's kill effect can still impact a midair lemming.

I have understood that from Nepster's description already. The question is about rules design, not how the code handles it.

In 1.48, a hungry trap eats a lem if (the lem is in mid-air, or the lem lacks the disarmer ability, or is climbing/swimming/ohnoing). Otherwise, the lem disarms the trap.

In this formulation, it's obvious how the trap's behavior depends on terrain. Are there any other gadgets whose function you can describe like so? If the triggered trap is the only gadget, what is the rules advantage of terrain dependency particularly for traps?

-- Simon
« Last Edit: October 11, 2016, 03:17:06 AM by Simon »

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Wheel of Misfortune -- inconsistent physics
« Reply #8 on: October 11, 2016, 07:04:36 AM »
Exits, where the lemming must be floating, gliding, or standing on solid ground.

There was discussion about applying the same rule to teleporters, but this didn't happen in the end IIRC.
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)