[FIXED] Gliders in updrafts hitting ceiling [DISCUSSION]

Started by Nepster, June 24, 2016, 08:01:24 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Nepster

Before reading further, please download the attached level, start it and look what happens. This behavior was found by namida.

Explanation

- When hitting the ceiling - even if it is only 1 pixel thick - the glider does not rise further. However at this point almost all of the sprite is above the platform, because the pixel relevant for the glider position is below the lemming's toes. Question: Should the glider directly step onto the 1-pixel platform (note that a swimmer does not do this in the corresponding situation)? Or should the glider not rise quite as high to have his feet stay below the ceiling? Or is everything fine?
- The blocker field extends slightly below the blocker position. So the glider, being directly below the ceiling, meets this blocker field and turns around. Question: Should the glider turn around in this situation?
- At the left end, the glider meets a wall at most 4 pixels high, so he step up onto it. But he ignores the horizontal platform. Question: Should he move through ceiling pixels or rather turn around?

IchoTolot

Point 1: Is fine as it is. The Glider must remain under the platform as the toe is relevant here. Consistant with walking as well (toe is relevant ---> lemmings can walk through 1 pixel high gaps).

Point 2: This can be a bit controversal, but I think it's ok as well. If the blocker field goes a few pixels lower -----> should affect the glider

Point 3: I would call that a big Bug! He must not ignore that 1 pixel horizontal line. Climbers don't do that either ----> they fall down.    If there were 1 pixel at the corner missing then it would be consistant and alright. Vote for turning around and staying under the platform

namida

QuotePoint 3: I would call that a big Bug! He must not ignore that 1 pixel horizontal line. Climbers don't do that either ----> they fall down.    If there were 1 pixel at the corner missing then it would be consistant and alright. Vote for turning around and staying under the platform

If you use an analogy to a climber, this makes sense. However, suppose you think of it as being like a walker or especially a swimmer instead (which an in-updraft Glider is probably more similar to)?

I'm not sure, because it feels a bit awkward that the glider does this. And yet, for a Swimmer, it would be awkward if they don't.

As I mentioned in private to Nepster; I do agree that the blocker should affect the lemming in this case. My instinctive expectation was that the glider should step onto the platform and become a walker, but I see where people are coming from with the argument that he should stay a bit below the platform.

It is also worth noting - it is completely possible for the lemming animations to be slightly tweaked so that the glider doesn't look like he's practically above the platform while gliding along underneath it (this could be as simple as modifying the Foot Y position of the sprite so it doesn't get placed as high). However, I'm not 100% sure what way this situation should be approached - if anything changed at all.
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

Glider has no head check: OK if you keep this, OK if you introduce a head.
Blocker area extends down: A must-have, you want blockers on slopes to function.
Glider passes through lines: Feels buggy.

The solid wall behaves differently than a blocker. That's okay by itself, builders and miners behave differently (when they meet a wall) than (when they meet a blocker).

namida: The behavior of (glider encounters wall in updrafts) doesn't match (walker encounters wall). Problems:
  • We walk on a 1-pixel line. We hit a high wall. Do we fall under the 1-pixel line now?
  • The walker reacts to blockers as it does to vertical walls.
-- Simon

namida

It is consistent however, with that if gliders were to hit one or two pixels below a wall (even if there may be a tiny overhang), they would step through it. So, if we denied it, we'd essentially be saying "this rule no longer applies when in an updraft". It's just far less noticable under normal conditions, especially with the glider sprite being quite high graphically compared to its logical position - whether it should be changed or not could be debated, the reason this was implemented was because gliders tended to often turn around on slopes that look like they'd land on.
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

Show me in pictures!



Left image: Glider comes from the right, gets into the corner, and steps up the ledge.
Right image: Glider comes from the right, and turns at the wall. Doesn't step up.

After watching Nepster's replay, which contains the left scenario, I began writing my first reply above. While writing, I have confused the left and right scenarios. Had the lemming become a walker in the right scenario, that would have been a huge bug.

I withdraw my assessment that getting up the left scenario is an obvious bug. Maybe I'll change my mind again in a few days. Tricky.

-- Simon

Nepster

Here another related problem: Assume the updrafts reach to the very to of the level. Then the glider sprite lies completely outside of the level when reaching the top. However the glider's position is still (correctly) within the level area.

My opinion on the questions I posed in the first post:
1) The mechanics are correct in that the glider stays below the ceiling. Only the position of the sprite is somewhat misleading.
2) While blocker fields extending below their position is correct, intuitively I did not expect that blockers above the ceiling will turn gliders. It is hard to say where this hunch came from, but probably a combination of
- I expected the glider sprite the be some pixels lower
- The blocker sprite is completely in the upper half of the level, so it felt unnatural that he affects lemmings coming from below. Of course the same situation happens, if there is another platform just 1 pixel below the thin ceiling and a lemming walks there. But coming from a big empty space below had a different feel for me than walking on a very close second platform.
3) The current behavior felt natural to me, as I was familiar with the same behavior for swimmers.

So I am in favor of a head-check for glider, which would both solve the blocker issue and the issue with moving too far into the ceiling. Whether it is better to have the head-check really at head-height or at about 5 pixels above the feet, I don't know.

IchoTolot

I would not introduce a headcheck, because:

- It is right now consistant with the general core Lemming behavior. A Lemming can walk through a gap that is only 1 pixel high ----> he has no head check! So it would be more confusing than helping if the glider now suddenly has a headcheck.  It would go against one of the core rules!

- For situation other than straight ceilings, it could cause a lot of glider levels to break/require much more precision. I find myself very often in a situation where my glider glides just under a corner or sth ---> with the change he would now turn around    causing the assign window to shrink + quite a few levels have taken the current behavior into account/ rely on it.
The problems can go much deeper here and would require a lot of testing.

It looks a bit weird at a ceiling yes, but the physic is what matters the most here and it is 100% correct right now (well except point 3 :P)

Nepster

Sorry for having been unclear in my previous post: Head-checks would only decide whether a glider may move up or not. They would not turn gliders around.

IchoTolot

Quote from: Nepster on June 25, 2016, 09:30:30 AM
Sorry for having been unclear in my previous post: Head-checks would only decide whether a glider may move up or not. They would not turn gliders around.

Oh ok, that makes more sense. ;P      Yes that can be possible. It would just cause minor adjustments to some levels and most likely just break a few replays, but nothing major.

namida

That seems like a good solution. I would base the check position on the actual distance between the glider's "foot" (as defined in LemDosAnimationSet.pas) and the top of his head (based on the default graphic). The most logical alternative - but this feels like it would be a bit weird for Lemmings - would be at the top of the hang-glider.
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

I introduced head checks now at the top of the lemming head. These cannot turn the lemming around, but they are able to push the glider downwards (only within updrafts and at most 2 pixels). Otherwise the glider would simply continue forwards when moving from a horizontal ceiling to a diagonal one, which looked pretty weird.

namida's next experimental version will contain this bug-fix. As this is a fairly huge change in the glider-updraft interaction, please give it a try then and see whether you can find bugs or other unexpected behaviors.

PS: I have not based the check position on the distance defined in LemDosAnimationSet.pas, but fixed it to 12 pixels above the lemming position. The reason is that changes in the sprites and their position should not have an impact on the actual game mechanics.