Author Topic: [BUG][EDITOR] Inconsistent trigger areas for inverted/rotated fire/water objects  (Read 3677 times)

0 Members and 1 Guest are viewing this topic.

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
I noticed that the trigger areas of inverted/rotated fire and water objects are a bit off from my expected behavior.

namida told me that this was due to an adjustment made to don't let lemmings walk right under them   ----- but this would be expected and consistent!

Lemmings can walk right under the trigger of normal fire blowers/traps/water and can fit through a 1 pixel high gap! So no adjustments needed here besides the normal inverting/rotating!

Proposal: Remove both adjustments!   Previous adjustment (10 pixels lower for invert; +5/+5 for rotate)


As inverted/rotated fire/water objects are mostly used decorational I doubt that more than 10 levels in total would need adjustments. I have 2 levels I can think of which would need some fixes ("Welcome to the Siper Dance" and a Reunion 2 level) due to inverted water is used as a lemming trap and would probably need moving the water down a bit.

Here the IRC log of the discussion:

<IchoTolot>namida42:  Hm rotating or inverting objects with trigger area seems to place the trigger area a bit weird    when inverting water it seems quite low for example
<namida42>it does modify the position a bit, in an attempt to compensate for that the trigger area is checked at the lemming's foot, not the lemming's center
<IchoTolot>ah ok
<namida42>i don't know if the current change is optimal or not... or what would be optimal if this isn't...
<IchoTolot>maybe just stratch it down but the top of the water beeing not deadly i dont know
<namida42>i insist that the size remains unchanged, only the position may change
<namida42>currently, rotate is +5, +5; while invert is +0, +10
<IchoTolot>currently an inverted fire pit is not deadly where the fire is
<namida42>(iirc)
<namida42>the rotate change works well, but maybe the invert one should be reduced (or removed altogether)...
<IchoTolot>maybe only +5
<IchoTolot>although I would say only +5 and move it to 0 (so a little stretch)
<namida42>no, there's no reason why an inverted object's trigger area should get any larger
<IchoTolot>so fire stays deadly where the fire actually is
<IchoTolot>that's also true
<IchoTolot>the + 5 down on rotate seems also weird
<IchoTolot>the top part of the fire pit is not deadly again
<IchoTolot>I would try removing the adjustments
<namida42>hm
<IchoTolot>as inverted traps are rarely actively used
<IchoTolot>only deco
<namida42>but then, if you build up to a fire pit against a roof, you're probably going to hit your head before getting burned, which is probably not the desired effect...
<IchoTolot>I have some inverted water actively used but that can be adjusted
<IchoTolot>that is alays the case
<IchoTolot>with normal traps
<IchoTolot>like fire blowers
<IchoTolot>i think that that would be ok
<namida42>triggered traps inverted doesn't really make that much sense anyway... primary focus here i think should be on fire and water objects, yeah
<namida42>they're the most likely to actually be used inverted
<namida42>maybe also exits in some weird designs
<namida42>but less likely than fire/water
<IchoTolot>as it is always the case that the lems body/head does not count
<IchoTolot>even in the normal terrain case
<namida42>yeah, that is a good point
<IchoTolot>then it shouldn't fir through 1 pixel hih gaps
<namida42>in the next major update (ie: V1.48n, not V1.47n-D), or an experimental for it, i'll try removing these adjustments altogether
<IchoTolot>a few levels would need a bit of adjustment but I doubt that the number is higher than 10 in total
<IchoTolot>over all designers
<IchoTolot>I think I have 2 or 3 maybe
<namida42>i don't know if i have any at all
<IchoTolot>as water works as a glider trap
<IchoTolot>inverted at a ceiling
<IchoTolot>with updrafts
<namida42>yeah
<namida42>fire can work for this too now
<namida42>in V1.43n-F it wouldn't work because you couldn't have an updraft trigger area and a fire trigger area on the same pixel, but you can in V1.47n
<namida42>(water would work even in V1.43n-F)
<IchoTolot>most of the inverted stuff is more decorative than anything anyway
<IchoTolot>I have used water before yes that worked
<IchoTolot>spider dance and another Reunion 2 level would need adjustments
<IchoTolot>I know that for sure
<namida42>yeah, in V1.43n-F, most objects shared a single trigger map that only allowed one object per pixel; water was on a seperate one to allow exits or pickup skills etc that were only accessible via swimmers
<namida42>but V1.47n has seperate maps for every object type, and in the case where the exact object needs to be identified, a way to do this even when more than one such object exists on the same pixel
« Last Edit: September 23, 2016, 12:35:28 PM by IchoTolot »

Offline Nepster

  • Posts: 1829
    • View Profile
Here are three thoughts on this matter:

1) What exactly is the problem?
You said, that some trigger areas are at unexpected positions. Which objects do cause problems exactly and where would you have expected the trigger area to be?

2) Inverted traps with non-adjusted trigger areas might catch lemmings, which do not intersect the trap sprite at all.
A lot of objects have a trigger area that reaches one pixel below the actual sprite (most of the water objects, lots of the exits and some of the other traps if they stand on the ground like the continuous trap in the marble style). If we just invert the trigger areas, then lemmings walking on top of the trap will get caught, but never meet the trap itself. On the other hand they might be almost totally within the trap and still live (cf. almost all L1 water objects). This would be a very unexpected behavior for me.
Quote
<IchoTolot>as it is always the case that the lems body/head does not count
This is simply incorrect: Consider the jumping ball trap in the L2-sports style. The trigger area reaches not only 1 pixels below the trap, but 4 pixels, so the lemming will still die, even if only the head and body, but not their legs and feet meet the trap. Same for the L2-shadow style squisher trap and the water object in this style.

3) This would lead to more work than just changing 10 levels, even if only 10 levels need to be changed.
I know that one level in NepsterLems and one level I submitted for the community level pack would need changes. But I very much suspect, that I used inverted traps (especially objects like the spikes in the pillar set, where the difference isn't that big) in a few other levels, which I don't remember. So I would have to go through all my levels and check for inverted traps.


The current trigger area placements for inverted objects might not be perfect, but just mirroring it without adjustments is certainly not perfect either. This problem demands a more detailed study where the expected places for the trigger areas are and how we can achieve this in the most consistent way.
Quote
<namida42>in the next major update (ie: V1.48n, not V1.47n-D), or an experimental for it, i'll try removing these adjustments altogether
Please do not simply change this in an official version without having properly thought through it. As a level designer, I certainly don't want to adjust my levels twice in a row, just because the first change turned out to be suboptimal.

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
1)

For example the fire tileset:
Look at the inverted fire (water replacement) and the little fire pit's inverted trigger area. Huge chunks going out of the actual fire and the little fire pit has it's trigger area completly out of the fire.
I don't expect Lems to die when they are not in the actual fire.

2)

Quote
<IchoTolot>as it is always the case that the lems body/head does not count
This is simply incorrect: Consider the jumping ball trap in the L2-sports style. The trigger area reaches not only 1 pixels below the trap, but 4 pixels, so the lemming will still die, even if only the head and body, but not their legs and feet meet the trap. Same for the L2-shadow style squisher trap and the water object in this style.
[/quote]

No, this is correct!
The L2-sports balls trigger + Shadow's stomper + all the water objects trigger areas only go 1 pixel into the ground as I fixed all the trigger areas some time ago. ;)
I even checked in the editor again to be sure.

3)

Ok this might need some more investigations.



Offline Nepster

  • Posts: 1829
    • View Profile
1)
For example the fire tileset:
Look at the inverted fire (water replacement) and the little fire pit's inverted trigger area. Huge chunks going out of the actual fire and the little fire pit has it's trigger area completly out of the fire.
I don't expect Lems to die when they are not in the actual fire.
Ok. But I still don't know where you expected the trigger area to be? Really exactly where it would be if one just mirrors the object? Or two pixels lower? Or 5 pixels lower?
I don't want to critisize you. I just want to learn where exactly you as a user expected the trigger area to be.

No, this is correct!
The L2-sports balls trigger + Shadow's stomper + all the water objects trigger areas only go 1 pixel into the ground as I fixed all the trigger areas some time ago. ;)
I even checked in the editor again to be sure.
Fair enough, but this is only highlights a different problem. Here are a few more cases using LemPlus styles: Almost every radiation, slowfreeze, splitter or force-field trigger area reaches several pixels below the actual object. Moreover look at the horizontal fire/laser trap in the metal style. The trigger area is again several pixels below the actual laser. If we just invert it, this object's trigger area would become totally weird.

Offline Nepster

  • Posts: 1829
    • View Profile
I realize this is totally off-topic, but I'm not inclined to agree with Ichotolot's so-called "fixes" especially as pertained to the L2 tennis ball traps (it makes sense for water and in any case is the least relevant for normal usages of that object anyhow; I don't even remember what the stomper trap is in Shadow).  His assertion about "the lems body/head does not count" feels like a classic case of confusing implementation with design.  It's certainly not a general principle in the game or the builder and climber would not have ceiling checks at all, but let's stick with harmful objects for now.  Take L1's spinning fire trap (in the Marble set) as an example, I very much doubt anyone who has played the game without knowing the details of trigger area mechanics (which is likely the majority of players) would intuitively expect a lemming to be immune merely because it was one pixel below floor level, or that the trap is affecting the lemming through its feet (almost anyone would probably say it's the spinning arms of fire that are deadly).  More generally, how do you determine that a given trigger area was extended below ground level intentionally by design (so that a head/body collision still counts) versus due to limitations or bugs in implementation?

The feet idea may make some sense for triggered traps, especially the few whose graphics include an actual visible (though often buried just below ground level) trigger button that is indeed often only one pixel tall, implying that the trap is triggered due to stepping onto the button.  Intentions are typically less clear for other objects.

(One confounding factor is I don't remember if L2 also has a minimum size for trigger area like L1 did, or instead can support down to 1 pixel.  I want to say the latter but I'm not 100% certain.  If it's the former that maybe you have a slight stronger case that the in-game setup is not intentional but limited by implementation; if it's the latter then it can only be either a mistake or intentional.)

Offline ccexplore

  • Posts: 5311
    • View Profile
Just want to point out that when I made the quoted post above originally from another thread, I had no idea that inversion or rotation was involved.  That seems like a whole other can of worms completely.  It doesn't help that none of the official game engines in the franchise actually supports inversion or rotation of objects, so there are no official examples to examine.  (L1's inversion flag is technically just a rendering option, which for terrain happens to affect gameplay; inverted objects in L1 do not have any behavorial differences like correspondingly transformed trigger areas.)

While I don't necessarily think it's wrong for NeoLemmix to support how rotation and inversion affects objects, I would almost argue that it's perhaps folly to have any expectations on the exact details of trigger areas based on how the non-rotated/non-inverted version is configured.  After all, you still have normally-oriented lemmings interacting with the re-oriented object, not rotated or inverted lemmings, so there is no exact symmetry to maintain.  I haven't played any levels using rotated/inverted objects to say whether NeoLemmix's current approach is good or not, though it sounded like it may be more intuitive or at least avoid certain common cases that may look unintuitive.  I'm tempted to argue that if a set designer care enough and don't trust how NeoLemmix handles rotation and inversion for certain objects, maybe they should just provide their own rotated and inverted copies of the objects with the trigger areas specified more to their liking.

[edit: forgot to add the following below]

Also worth mentioning that trigger areas are not explicitly shown in the level during gameplay.  For better or worse, it has always been the case that the game effectively makes you guess and test to find out exactly how close you can get to a hazard without getting killed, and on the flip side, fortunately in most cases the levels are designed so that the player only needs to have an approximate idea of the range of hazards; the precise details rarely matter except maybe for challenges (or arguably not very well-designed levels).  And of course in the contexts where it actually matters, the player could've simply used the level editor or similar facilities to find out exactly how a trigger area is configured in the level.

As such, I'm inclined to say that adding in adjustments to trigger areas after the rotation or inversion is not necessarily wrong per se.  Given the model that most players probably don't even remember exactly how the trigger areas are configured off top of their head, is it more important to maintain that configuration exactly during re-orientation of the object, or is it more important to maintain intuitive expectations (or at least avoid unintuitive expectations)?  I don't have a confident answer to this, but I can at least sympathize with how namida had decided to handle it at the time.
« Last Edit: September 23, 2016, 09:37:13 PM by ccexplore »

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
1)
For example the fire tileset:
Look at the inverted fire (water replacement) and the little fire pit's inverted trigger area. Huge chunks going out of the actual fire and the little fire pit has it's trigger area completly out of the fire.
I don't expect Lems to die when they are not in the actual fire.
Ok. But I still don't know where you expected the trigger area to be? Really exactly where it would be if one just mirrors the object? Or two pixels lower? Or 5 pixels lower?
I don't want to critisize you. I just want to learn where exactly you as a user expected the trigger area to be.

No, this is correct!
The L2-sports balls trigger + Shadow's stomper + all the water objects trigger areas only go 1 pixel into the ground as I fixed all the trigger areas some time ago. ;)
I even checked in the editor again to be sure.
Fair enough, but this is only highlights a different problem. Here are a few more cases using LemPlus styles: Almost every radiation, slowfreeze, splitter or force-field trigger area reaches several pixels below the actual object. Moreover look at the horizontal fire/laser trap in the metal style. The trigger area is again several pixels below the actual laser. If we just invert it, this object's trigger area would become totally weird.

1)
I want the trigger area at the point where the actual fire = danger is. This would be achieved when the +10 adjustment goes away.

2)
Yes these are problems. I made this fix (yes I call it definitely a fix) quite a long time ago and only one missed post from you and the critical update is missed.

I still stand with the general behavior a lem can walk through a 1 pixel high gap = thats the important part of the lem, even if there are some cases that deviate as you pointed them out.

But the entire trigger area beeing outside of the actual fire I would still call a problem.



I can live with a decision not to change this, don't get me wrong, but it was definitly sth that was irritating to me and I wanted to point it out.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Lemmings mirror well horizontally. Horizontally-mirrored gadgets have an obvious trigger area that satisfies all intuitions from the original gadget.

Gadget rotation or vertical mirroring, I consider both unhealthy.

Claim. There is no linear transformation rule for feet-only TAs that captures all intuition.

Argument. By counterexample.



I assume that everybody considers the TAs in A and B good. The gallows in A trap the lemming when the lemming steps on the switch. The spikes in B impale the lemming when a large portion of the lemming's body overlaps the spikes.

Choose a linear transformation for all TAs under a 90-degree rotation. The gallow's trigger area rotates well. The 90-degree-rotated gallows in C has its switch at the right, and the TA rotated to the right, too. Everything is good.

When we rotate the spikes by 90 degrees, the rotated TA in image D doesn't capture our intuition of deadly spikes anymore. The leftmost spike is harmless. The abstraction breaks down: We can't model freely-rotatable and mirrorable gadgets by relying on feet-only TAs.

Counterargument. You can argue that the problem is in B, not in D. If the lemming model were only one pixel in size, then the trigger area in B becomes badly designed, it should be much taller. D becomes a perfect rotation of the badly designed TA in B. But lemmings aren't one pixel in size. ccx has given this argument w.r.t. the builder and climber, which are much more prevalent than rotated gadgets.

Interpretation. I'd spend more time on other things than beefing up the TA to capture more intuition. I'm sure you can do artsy levels with water at the ceiling, where you swim through. Is that worth the effort? What are the opportunity costs with respect to other features?

-- Simon
« Last Edit: September 24, 2016, 09:50:23 AM by Simon »

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
This might be a terrible idea, but what about allowing tilesets to specify trigger areas for rotated objects? The current system could be used for objects that don't specify, but if the expected trigger area and the actual trigger area don't align properly, then a tileset designer could move it into the expected position.

The graphic set tool could suggest trigger areas for rotations by default to keep things relatively simple for designers.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
This might be a terrible idea, but what about allowing tilesets to specify trigger areas for rotated objects? The current system could be used for objects that don't specify, but if the expected trigger area and the actual trigger area don't align properly, then a tileset designer could move it into the expected position.

The graphic set tool could suggest trigger areas for rotations by default to keep things relatively simple for designers.

I remember thinking about this option at one point. I won't rule it out.
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
I think for now, I'll leave things as-is. When new formats are brought into use, I'll add support for manually specifying the trigger areas for flipped / inverted / rotated objects. (Actually, is it really needed for horizontal flip?)
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)