Author Topic: Cloning a platformer: leaves gap  (Read 3653 times)

0 Members and 1 Guest are viewing this topic.

Offline Nepster

  • Posts: 1829
    • View Profile
Cloning a platformer: leaves gap
« on: October 31, 2015, 09:47:01 PM »
Here is a glitch concerning a platformer+cloner interaction:
Start a platformer. After placing the first brick, but before he starts moving forward, clone the lemming. Then the cloned lemming moves forward through the air and places his first brick midair. This is an unwanted behaviour, because it allows the player to separate one lemming from all others in a rather glitchy way.
Example level with example replay attached (for V1.35C).

PS: This glitch does not work for cloning builders (as far as I can tell).

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Cloning a platformer: leaves gap
« Reply #1 on: October 31, 2015, 10:07:06 PM »
Hmm... it's a tough call on that one, because the Cloner is doing exactly what it should do - but the result is somewhat unexpected. It also requires a fairly specific setup (a narrow or pointy place to start from) like that...

Similar strange behaviour can also occur with Stackers too if cloned or even just turned around mid-stack.

I think it might be better to wait until 2.00 to address these issues - and in the meantime of course, advise people not to make levels relying on them. One other potential solution is to put a "standing on terrain" check on every frame of a platformer's action - but then that raises other questions like, why will a platformer stop if he's got nothing to stand on yet a builder won't (perhaps because the terrain he was standing on is destroyed). Alternatively, it requires an exception to "exact clone, except facing opposite direction" rule. Arguably a precedent exists, albeit a weak one, in the form of lemmings not being clonable during certain actions (most notably, climbing). Extending that to Platforming though... I'm not sure about... (I also believe there are levels out there that require cloning a Platformer).
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: Cloning a platformer: leaves gap
« Reply #2 on: October 31, 2015, 10:24:26 PM »
One other potential solution is to put a "standing on terrain" check on every frame of a platformer's action - but then that raises other questions like, why will a platformer stop if he's got nothing to stand on yet a builder won't (perhaps because the terrain he was standing on is destroyed). Alternatively, it requires an exception to "exact clone, except facing opposite direction" rule. Arguably a precedent exists, albeit a weak one, ...
There is also the precedent of the builder: Assume a builder has already placed his brick and is on his way stepping up. If he is cloned, then the previous brick is cloned with him. This is why the same trick does not work for builders, btw. So I would implement the same behaviour for platformers, i.e. cloning the last brick as well (if applicable).

Similar strange behaviour can also occur with Stackers too if cloned...
There is one big difference: The stacker remains standing on the ground and is only adding terrain somewhere. Addition of terrain does generally not need any supporting terrain, cf. stoning in midair. So the stacker behaviour is perfectly fine.
However on the other hand, the platformer is standing midair and performing a task, which is seen nowhere else in the game. And it is precisely this walking in midair without falling that is the unexpected behaviour - not that some brick is placed midair.

... or even just turned around mid-stack.
I don't understand, what you want to say here.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Cloning a platformer: leaves gap
« Reply #3 on: October 31, 2015, 11:28:42 PM »
One other potential solution is to put a "standing on terrain" check on every frame of a platformer's action - but then that raises other questions like, why will a platformer stop if he's got nothing to stand on yet a builder won't (perhaps because the terrain he was standing on is destroyed). Alternatively, it requires an exception to "exact clone, except facing opposite direction" rule. Arguably a precedent exists, albeit a weak one, ...
There is also the precedent of the builder: Assume a builder has already placed his brick and is on his way stepping up. If he is cloned, then the previous brick is cloned with him. This is why the same trick does not work for builders, btw. So I would implement the same behaviour for platformers, i.e. cloning the last brick as well (if applicable).

That could work. That's actually to fix the behaviour when a builder is turned around mid-build (by placing a blocker, for example).

Quote
Similar strange behaviour can also occur with Stackers too if cloned...
There is one big difference: The stacker remains standing on the ground and is only adding terrain somewhere. Addition of terrain does generally not need any supporting terrain, cf. stoning in midair. So the stacker behaviour is perfectly fine.
However on the other hand, the platformer is standing midair and performing a task, which is seen nowhere else in the game. And it is precisely this walking in midair without falling that is the unexpected behaviour - not that some brick is placed midair.

Good point.

Quote
... or even just turned around mid-stack.
I don't understand, what you want to say here.
[/quote]

Similar behaviour exists in both cases. In fact, the Cloner can almost be thought of as that the lemming both turns around and doesn't turn around at the same time - the two are very closely related for sure. That's why I mentioned this.
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)

Online Simon

  • Administrator
  • Posts: 3876
    • View Profile
    • Lix
Re: Cloning a platformer: leaves gap
« Reply #4 on: November 01, 2015, 09:39:16 AM »
Exciting, exciting.

Another idea #1a: Gaps below (where a terrain-adder would move) don't cancel the terrain-adder. Instead, the terrain-adder will not move over that pixel, but refuse to move. The pixel will probably be filled by the next cycle of terrain-adding anyway.

Another idea #1b: Like #1a, but stall movement only after being blocked/cloned.

Another idea #2: Currently, you add the terrain once, and then later move onto it. Instead, continually add the same terrain again and again each frame, until the worker has finished the movement or subsequent brick, whatever is appropriate.

Idea #1b is equivalent to current proposal for fixing Lix blocker-basher interaction.

Both #1a and #2 don't mention the cloner at all. I like how the cloner does exactly what it does. The cloner is a very simple skill with vast emergent game depth.

Idea #1a affects builder-(terrain-remover) interaction, and will feel slightly different than L1 for those. I may be possible to design levels around this, where you have to shorten a bridge by mining into the working builder.

Idea #1a/#1b work nicely for terrain-removers, too. Idea #2 would be a little weird, were it for terrain-removers instead of terrain-adders. It would make terrain-removers even more powerful in multiplayer.

Quote from: Nepster
However on the other hand, the platformer is standing midair and performing a task, which is seen nowhere else in the game. And it is precisely this walking in midair without falling that is the unexpected behaviour - not that some brick is placed midair.

This is seen At least the variant for builders is seen somewhere in the game: Builder loses ground by terrain-remover. The builder will continue to remain in mid-air, and move onto other air pixels.

I'm seeing more of a problem in the possible separation of crowd and worker.

-- Simon
« Last Edit: November 01, 2015, 10:08:22 AM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Cloning a platformer: leaves gap
« Reply #5 on: November 01, 2015, 10:08:47 AM »
This is seen At least the variant for builders is seen somewhere in the game: Builder loses ground by terrain-remover. The builder will continue to remain in mid-air, and move onto other air pixels.

The same thing can also happen with a platformer (or stacker, although it's arguably a slightly different case here as the stacker doesn't stand on the terrain he places). This is why I'm seeing it more as a slightly unusual combination of intended mechanics, rather than a glitch as such.

Idea #1 seems like it would have a very strong potential to break existing levels - also, it still allows the lemming to hang in midair, just without moving at the same time (currently, they would move, including if the terrain was removed by a destructive skill). #1b in particular I don't like the sound of, as the situation is essentially the same; the only difference is how the situation arose, so it's questionable whether the behavior should be different.

Idea #2 sounds more viable; indeed something like this is done to avoid the "gap in staircase" issue (even though it's not strictly speaking a glitch) when builders are blocked on certain frames. It's probably also less likely to break levels.
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)

Online Simon

  • Administrator
  • Posts: 3876
    • View Profile
    • Lix
Re: Cloning a platformer: leaves gap
« Reply #6 on: November 01, 2015, 10:18:27 AM »
Idea #2 sounds more viable; indeed something like this is done to avoid the "gap in staircase" issue (even though it's not strictly speaking a glitch) when builders are blocked on certain frames. It's probably also less likely to break levels.

So you have something similar already somewhere else. I suspected it from your previous post, but it wasn't 100 % clear whether it was implemented or planned.

Then yeah, if something is to be changed here, consider something similar to the current implementation.

-- Simon

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Cloning a platformer: leaves gap
« Reply #7 on: November 01, 2015, 01:44:32 PM »
This is seen At least the variant for builders is seen somewhere in the game: Builder loses ground by terrain-remover. The builder will continue to remain in mid-air, and move onto other air pixels.
Good catch. And I realized only now, that a stacker will continue stacking, even when the terrain, he is standing on, is removed. Until namida's remark, I automatically assumed that stackers would fall down and their work is interrupted. Actually, what is the reason behind letting stackers continue their work?

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Cloning a platformer: leaves gap
« Reply #8 on: November 12, 2015, 10:41:07 PM »
This is seen At least the variant for builders is seen somewhere in the game: Builder loses ground by terrain-remover. The builder will continue to remain in mid-air, and move onto other air pixels.
Good catch. And I realized only now, that a stacker will continue stacking, even when the terrain, he is standing on, is removed. Until namida's remark, I automatically assumed that stackers would fall down and their work is interrupted. Actually, what is the reason behind letting stackers continue their work?

Basically, that no code exists to stop them. The Stacker, Platformer and Builder code are all almost identical. Whether or not this should be changed is another matter.
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)