Author Topic: [FIXED] Splatting lemmings mid-air [BUG] [PLAYER]  (Read 3042 times)

0 Members and 1 Guest are viewing this topic.

Offline Nepster

  • Posts: 1829
    • View Profile
[FIXED] Splatting lemmings mid-air [BUG] [PLAYER]
« on: October 12, 2016, 06:59:18 PM »
I found a way to let lemmings splat in mid-air using teleporters. See the attached level: The first three parts work as desired, but the last does something unexpected :-\

The bug occurs because one first checks for transitioning into a splatter, before checking for teleporter trigger areas. So a splatting lemming gets teleported around.
« Last Edit: October 16, 2016, 11:48:36 AM by Nepster »

Offline Minim

  • Posts: 1724
    • View Profile
Re: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #1 on: October 12, 2016, 07:59:19 PM »
I tried downloading it but I can't seem to load this level in the editor. Instead I get an error message stating that the "space" graphic set could not be found. Is there anything I'm doing wrong?
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #2 on: October 12, 2016, 08:09:03 PM »
Do you have the style "space.dat" in the subdirectory "styles" of your editor directory? Contrary to V1.43, it should not lie in the subdirectory "styles//NeoLemmix".
Do you use one of the recent editor versions? If you are still using V1.43, I would try loading it with a new editor version.

Offline Minim

  • Posts: 1724
    • View Profile
Re: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #3 on: October 12, 2016, 08:37:18 PM »
I am using the most recent editor. I've figured out how to get rid of the initial error message - by renaming 'lpiv_space' to space. However, I get a 'List index out of bounds' message in return, meaning that I still can't see the level.
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #4 on: October 12, 2016, 08:39:37 PM »
It uses the L2 (Tribes) space style, not the LPIV one. You can get it here: http://www.lemmingsforums.net/index.php?topic=2228.0.

Offline Minim

  • Posts: 1724
    • View Profile
Re: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #5 on: October 12, 2016, 09:21:25 PM »
Ah. That's where the confusion came in, because I knew lpiv_space had teleporters. Thanks.

That fourth one is quite weird! :lem-shocked: So the lemmings lands from a great height onto the topmost trigger area, enters the teleporter and then splats as it comes out. The second one it weird too, as I thought it would've splatted before entering the teleporter. I think I worked out the problem now - the lemmings seem to be taking into account the land of the trigger area as they fall, so that must be why the third set of lemmings went safely into the exit.
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #6 on: October 13, 2016, 02:40:01 AM »
Minim: For future reference, a lot of the more-commonly-used graphic sets can be obtained via the Tools -> Download Graphic Sets option in the editor. :)
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #7 on: October 13, 2016, 02:43:13 AM »
After looking at it, it'd appear that both the 2nd and 4th are a case of that a splatter has entered the teleporter; rather than the lemming is splatting in midair.

So, the simple fix: Don't allow splatters to enter teleporters. In fact, is there any case where they should react to objects at all? (Unlock buttons could make sense, I guess - I'd very much expect a lemming landing on them, even if it splats, to trigger them; considering that a lemming merely walking over them does.)
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: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #8 on: October 13, 2016, 04:45:24 PM »
Unfortunately, the fix isn't as simple. To explain this, I have added a fifth setup to the example level. Here the lemming enters the teleporter while still being in the air (as the trigger area now reaches one pixel above the ground). But the teleporting lemming still splats, while he should actually survive.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #9 on: October 14, 2016, 01:19:35 AM »
Why does this happen? If I'm understanding your changes correctly in regards to mid-move object checks, shouldn't he detect the teleporter, and not fall that last pixel to hit the ground? Or does he complete the entire move but just "remember" trigger areas encountered along the way?
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: Splatting lemmings mid-air [BUG] [PLAYER]
« Reply #10 on: October 14, 2016, 04:29:18 PM »
Current algorithm is (mainly because the global structure wasn't changed when introducing intermediate checks):
1) Check for lemming movement: This (among other things) determines the end position for the lemming and does transitions to other actions (like becoming a walker/splatter when reaching the ground)
2) Determine the path the lemming took based on the starting and end position.
3) Check all intermediate pixels for trigger areas.

So in the fifth setup, the lemming transitions to a splatter, because he would reach the ground and splat if there wouldn't be a trigger area (cf. step 1). Then in step 3 the intermediate pixels are checked and the teleporter is found. But the lemming is already a splatter due to step 1.

The current algorithm works so well, because almost all objects fall into one of the following three categories:
- Objects that remove the lemming (like traps and exits). So it doesn't matter at all if there is a wrong transition that shouldn't happen.
- Objects that don't have any effect on the lemming movement (like buttons, pick-up skills) are obviously fine.
- Objects that only do changes that can be made before or after the movement and don't change anything (like flippers, due to never moving more than one pixel horizontally).


To fix this issue properly, I plan to implement the following changes:
- If a lemming will transition to a different action only at the end of his movement (e.g. splatting after falling, fallling after moving as a miner, ... contrary to starting a newly assigned skill or exploding), this is not applied immediately, but saved for the moment.
- The transition to the new action will only be applied after having checked all intermediate positions, except the very last position. The end position will then be checked after transitioning. If the lemming stops before reaching the expected end position, the transition will not be made.