[✓][SUG] Prioritise exits over other objects | [DISC] Lemmini bit handling

Started by WillLem, February 09, 2025, 11:55:09 PM

Previous topic - Next topic

hrb264 and 1 Guest are viewing this topic.

WillLem

#15
Quote from: WillLem on February 22, 2025, 02:07:15 AMOWWs ... are always written into physics as-is; they are unaffected by this update.

Well, as it turns out, OWWs themselves weren't included in the list of trigger types that bypass the new hierarchy check. The updated physics only allows a single gadget trigger per-pixel for certain types, allowing us to decide which to prioritise; OWWs were supposed to be able to bypass this because (a) they have no effect on other gadgets, and (b) overlapping them creates vertical-destruction-only terrain, which is known to be used in a handful of Lemmini levels.

The affected levels are few and far between though, and the chances of this bug being discovered this soon are extremely slim. However, thanks to ericderkovits' diligent replay testing, it's been spotted and I've been able to ensure that OWWs are (once again) allowed to overlap.

The oversight is down to another OWW-related variable being included in the check originally (specifically, the check for OWW-allowed-terrain) having been moved over from the original procedure in an effort to preserve current special-case handling; I was simply unaware that this variable didn't refer to OWW gadgets themselves. The more you know.

Anyway, it's good and fixed for 2.2, which will be released in due course.

WillLem

OK, I've had to revert allowing overlapping OWWs, at least for now.

The new bit handling system requires certain mask types to bypass prioritisation, and in order to preserve OWW overlapping behaviour from previous versions of Lemmini, I added OWW objects to the bypass list.

Doing so unfortunately created a side effect where terrain with overlapping OWWs would sometimes not be erased (correct), but the lem could still move through it (obviously not correct). I'm not sure exactly why this was happening, but removing OWW objects from the bypass list instantly restores good behaviour.

This fix does mean that it's once again not possible to overlap OWWs in RetroLemmini and have them all be effective. Instead, a OWW can only be guaranteed effective wherever it doesn't overlap with another. In fact, the built-in priority is (highest to lowest): Up > Down > Left > Right.

Any existing Lemmini levels which use overlapping OWWs to create Bash/Mine-proof terrain will therefore need to use individual Upwards-facing OWWs, rather than overlapping Left and Right OWWs, to get essentially the same effect (that is, if they're ported to RetroLemmini).

Overall, I think this is correct engine behaviour. Overlapping Left and Right to create a makeshift "Up" OWW, whilst ingenious, looks messy and shouldn't be necessary. It can also be confusing to players, who wouldn't necessarily be sure how the setup should be interpreted. Whilst in Lemmini it meant that Bashing/Mining in either direction was not possible, it would be equally reasonable to assume that the OWWs would cancel each other out.

So... let's remove the doubt, restore the ability to prioritise engine-side, and ensure that levels look less messy and are easier to interpret at first glance.

I'll supplement this fix with the addition of Upwards & Downwards-facing OWWs to all of the OG styles in due course. Any levels which require this effect will therefore have a purpose-specific object at the ready.

Fixed in RLPlayer commit 90c90ee.