Lemmings Forums

Lix => Lix Main => Topic started by: mobius on July 10, 2022, 01:11:15 AM

Title: trampoline bug? unexpected behavoir?
Post by: mobius on July 10, 2022, 01:11:15 AM
it's been a while since I've played Lix so I have no idea if what I encountered here is a bug or just expected behavior I'm not familiar with. I'm using 0.9.41. I attached a replay from the level "Recycling Plant" from the community pack. Near the end when the pack of lix are going into the trampoline toward the exit; around 90% or more of them (all coming from the same direction and no runners or anything) land precisely in the same spot, as expected, but for some reason several of them hit a different spot and subsequently get turned around.
Title: Re: trampoline bug? unexpected behavoir?
Post by: Simon on July 10, 2022, 03:18:44 AM
Thanks! Explanation:

The flinger flings one lix at a time and has a cooldown period before it can fling the next lix. Whenever it flings a lix, it always assigns the same speed.

The different arcs in the replay come from (the lix' own locations, which is not the same for every lix) of where the lix have walked (inside the trigger area of the flinger) when the flinger finally has cooled down to fling them. For most lix, the flinger flings the lix immediately when that lix enters the trigger area. With denser clustering, some lix walk further into the trigger area during cooldown (from flinging a previous lix), then get flung from a different spot, producing the different arc.

Here's an excerpt from debugging to prove it:

Becoming flinger at (234, 270), flingXY = (-3, -16)
Becoming flinger at (228, 270), flingXY = (-3, -16)

Fling speed is always the same (3 into facing x-direction, 16 upward) and starting point is different.

It's not a bug to me. Or would you expect the flinger to always move the lix to the flinger's center, and only then assign the speed, to always guarantee the same arc?

-- Simon



(Hmm, Interesting that the tumbler/ballistic flyer code accepts odd x-speeds, and that code breaks it down to substeps of 2 in x-direction, and I don't understood the 13-year-old arcing code anymore. It probably makes only 1 substep of 2 in x-direction then, to keep everything at even x-coordinates. But I haven't examined it. That parts of the code are candidates for for a local rewriting, and for speed optimization, when I get back to physics. It's not related with how we see different fling arcs in mobius's replay.)
Title: Re: trampoline bug? unexpected behavoir?
Post by: mobius on July 16, 2022, 01:16:47 AM
ah turns out it had a [somewhat] simple explanation!

Thanks! Explanation:
It's not a bug to me. Or would you expect the flinger to always move the lix to the flinger's center, and only then assign the speed, to always guarantee the same arc?


Honestly; I would expect the latter; that would be my but reaction in this particular case. Trampoline seems to me like something static but then I don't have experience with L2; where it operates very finnicky.
Title: Re: trampoline bug? unexpected behavoir?
Post by: namida on July 17, 2022, 02:12:29 AM
I would personally think that vertically, it should always produce the same arc, or at least that levels should be designed so that slight differences don't have significant impact on the result. I'm a bit less decided on horizontal offsets. Different arc depending on the distance fallen onto it and/or whether the lix is a floater is something I could see going either way.
Title: Re: trampoline bug? unexpected behavoir?
Post by: Simon on July 17, 2022, 09:21:06 PM
Thanks! I'll mull over the behavior.

Recycling Plant doesn't depend on this finnicky design. But yes, at the very least, we can make that particular landing area in Recycling Plant even clearer to show that it doesn't matter where exactly the lix is inside that flinger's trigger area.

-- Simon
Title: Re: trampoline bug? unexpected behavoir?
Post by: mobius on July 18, 2022, 01:42:45 AM
I would personally think that vertically, it should always produce the same arc, or at least that levels should be designed so that slight differences don't have significant impact on the result. I'm a bit less decided on horizontal offsets. Different arc depending on the distance fallen onto it and/or whether the lix is a floater is something I could see going either way.

interesting cause my intuition is the opposite; "realistically speaking" [which i don't know if that's what you're going for anyway] falling from higher means bouncing higher so a higher fall/floaters would effect vertical height. I'm not so sure about horizontal movement. Simplicity is probably best here, imo. Honestly up until now nothing about Lix's tumbling and bouncing behavior seemed off to me; felt natural, intuitive and understood quickly, so :thumbsup:

It could be that a lix coming into contact with a trampoline always follows the exact same arc, and goes to the same spot. That would be simple and intuitive (maybe not so much) but idk if that's best. From what I remember of L2; going different places with the trampoline can get finicky real quick.