Author Topic: [FIXED] [BUG] [PLAYER] Cloned miner moves into terrain  (Read 2266 times)

0 Members and 1 Guest are viewing this topic.

Offline Nepster

  • Posts: 1829
    • View Profile
[FIXED] [BUG] [PLAYER] Cloned miner moves into terrain
« on: March 11, 2016, 05:53:24 PM »
This bug report is a joint work with IchoTolot and Simon.

If you clone a miner during the first frames after removing terrain, the cloned lemming moves into terrain. This causes problems if the underlying slope is very thin, as the cloned miner will just move through the slope and revert to a faller, without removing any terrain. This way the cloned lemming gets separated from the crowd.
See the attached replay for an example of the behavior.

There are a few possibilities to fix this, unfortunately none of them is perfect:
A) Naive cloning of latest miner mask: Just add the terrain removal mask at the position of the cloned lemming, if he has not yet finished moving. The problem appears when the lemming is in the middle of moving down: Then the mask is farther down than it should be and the cloned lemming will not move to the end of the tunnel.
B) Intelligent cloning of miner mask: If the lemming is still at position (0, 0), then just copy the mask at this position. If the lemming is at his final position (4, 2), then don't apply the terrain removal mask at all. If the lemming is at the intermediate position (2, 1), then add the terrain removal mask at position (4, 0), i.e. where the cloned lemming would have started his own cycle. Probably only the lower half of the terrain removal mask has to be used at position (4, 0) (i.e. when the lemming is at position (2, 1)), to avoid removing terrain from the ceiling of the miner tunnel.
C) Naive cloning of latest miner mask and teleporting the cloned lemming: Same as fix A), but if the lemming is at the intermediate position (2, 1), the cloned lemming is teleported to position (-2, 1), i.e. appears at this position instead of the position (2, 1). There are two problems with this: First of all this breaks the rule "cloned lemmings appear at the same position as original lemming". Secondly if the pixel (-1, 2) is non-solid, the cloned lemming should fall down this pixel, but due to the teleporting it will not (at least not automatically).
D) Starting a new cycle for cloned lemming: The cloned lemming starts at the very beginning of the miner cycle, i.e. with removing abother bit of terrain. The main problem is, that this is behavior is not seen for any other skills and allows to go down faster by spamming cloners during the right frames.
E) Stalling the miner: This would be similar to the basher mechanics. One modifies the miner movement, such that the miner stays in his current position in all cases where he would move into solid terrain. The problem here is, that the movement would look pretty weird and the miner actions of original lemming and cloned lemming are no longer symmetrical.

Summary: Fixes A) and C) create additional problems. Fix D) is inconsistent with the other behavior of cloners. Fix B) should (hopefully) not create any problems with the game mechanics, but might be difficult to implement. So fix E) might be the best solution.
« Last Edit: June 15, 2016, 05:26:00 PM by Nepster »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG] [PLAYER] Cloned miner moves into terrain
« Reply #1 on: March 11, 2016, 11:16:37 PM »
E would be harder to implement (at least neatly) than B would - we have info on which animation frame a lemming is on, and the position can be deduced from that. Therefore, no change to how miners work is needed, nor much change to how cloners work - just a check if the cloned lemming is mining, and if so, a check for which frame they're on, with the appropriate actions performed.
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: [BUG] [PLAYER] Cloned miner moves into terrain
« Reply #2 on: March 12, 2016, 10:03:50 AM »
One more possible problem with suggestion E: Starting a builder or platformer (using a different lemming) at the end of the miner tunnel one could stall the miner for one cycle. By repeating this the player could delay the miner almost indefinitely.