[FIXED] [BUG] [PLAYER] Triggered traps are checked only during some frames

Started by Nepster, March 22, 2016, 09:01:38 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Nepster

This is again one of the obscurer bugs:

Watch the replay of the attached level. What do we see here? Well, whether a miner triggers a trap is only checked during frames 0, 1, 2, 3 and 15 of the 16-frame cycle of the miner. Although the trap is finished with the first lemming on frame 4 of the miner cycle, the miner may still live for another 11 frames. This delays the second squisher action enough for the third lemming to pass through the trap.
This does not only happen for miners, but also for many other skills and lemming actions, though for most of them the interval between two checks is much smaller.

Why was this behavior introduced in the first place? My only guess is, that this was introduced in L1 to lessen the amount of computations. However walkers (the vast majority of lemmings) are checked every frame, so I am not sure how much sense this makes ???

Question: Does anyone see a reason not to check for traps in each frame (as long as the lemming lives of course)?

IchoTolot

When the trap is idle it should kill any Lemming that is moving into the trigger area!

As this also doesn't seem to break level/replays, because it's very specific and not used in any active way I can think of ----- vote for change for logic and consistancy :)


namida

Yes, it makes sense to change this. I would guess the original logic behind it (followed by me not noticing this was the case) was "the miner doesn't move at all, so it doesn't need to be re-checked". A lot of cases like this don't / didn't give trigger area tricks, which makes sense because on L1 trigger areas never moved. Some of these got tidied up when for a while trigger areas on NeoLemmix could move - generally due to rising water.
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)

ccexplore

Yeah, the original L1/ONML mechanics is fairly consistent in only checking for trigger areas during the frames for which the lemming's position actually changes (the builder may be one notable exception, I don't remember for sure), but it is not clear at all why they chose to do it like that instead of just checking every frame.  Even for actual triggered traps, a lot of them have visible trigger areas that look more pressure- or position-based rather than motion-activated, and then when you get to things like exits and water they clearly are not motion-activated contraptions.