Lemmings Forums

Lemmings Boards => Lemmings Main => Topic started by: 0xdeadbeef on February 12, 2006, 02:43:01 PM

Title: Basher/Digger/Miner break conditions on steel etc.
Post by: 0xdeadbeef on February 12, 2006, 02:43:01 PM
Testing my Superlemming feature on "Introducing SUPERLEMMING", I noticed my basher stops bashing after one move because it seems to detect the steel in the floor below. Indeed the bashing mask doesn't reach beneath the lemming, but in this level, the steel area seems to overlap one or two pixel(s) of the obstacle that the level bashes into.
My condition for stopping bashing (mining and digging) at this moment was to stop if at least one indestructible pixel was found in the mask. This blows the named level, I changed it to a greater number of pixels.
I'd guess the original rule is easier - most probably only one pixel is checked just before the basher or below the digger/miner.
Comments?
Title: Re: Basher/Digger/Miner break conditions on steel
Post by: ccexplore on February 13, 2006, 07:18:57 PM
Steel detection in Lemmings is somewhat of a can of worms.  Its inaccuracy is well known.  Consider, for example, that if you are not standing on steel area and you explode, the explosion will take out all pixels, steel or not.  Conversely, if you are standing on steel, the explosion doesn't take out anything, even if there are non-steel pixels nearby.

When I have time, I'll PM you with the way it works in the actual game (well, the DOS version at least; it's of note that some versions, such as the Mac which is hi-res, is known to have slightly different steel detection), and you can decide how exactly you want to follow the game.  For reasons I'll mention in the PM, you might also want to actually consider adjusting the steel areas used in the game so that they align exactly with the actual steel plate terrain pieces.
Title: Re: Basher/Digger/Miner break conditions on steel
Post by: 0xdeadbeef on February 14, 2006, 12:05:46 AM
Quote from: ccexplore link=1139755382/0#1 date=1139858337
Steel detection in Lemmings is somewhat of a can of worms.  Its inaccuracy is well known.  Consider, for example, that if you are not standing on steel area and you explode, the explosion will take out all pixels, steel or not.  Conversely, if you are standing on steel, the explosion doesn't take out anything, even if there are non-steel pixels nearby.
I can detect any indestructable pixel in the collision mask, so at first I implemented explosions that never destroyed steel tiles. As I became aware that this is a glitch/feature of the original, I implemented it this way. It's strange and inferior to my original implementation, but I don't want to keep compatibility as good as possible.

Quote
When I have time, I'll PM you with the way it works in the actual game (well, the DOS version at least; it's of note that some versions, such as the Mac which is hi-res, is known to have slightly different steel detection), and you can decide how exactly you want to follow the game.  For reasons I'll mention in the PM, you might also want to actually consider adjusting the steel areas used in the game so that they align exactly with the actual steel plate terrain pieces.
I thought about adjusting the steel areas, which would be no problem since I don't have the value limitations of the original levels (as far as I remember, steel tiles coordinates are multiples of 4). However, it would be quite a lot of work to check/fix about 200 levels for overlapping steel tiles. Also I think the engine should be robust enough to handle such small overlaps.
For the moment, I use the half value of the active pixels of a mask to detect collision. Works ok. Maybe I'll cut it down to a third or so. Depends if people will complain in beta testing ...  which will start soon, I hope  :-/

Until then a little teaser:
(http://
http://home.arcor.de/0xdeadbeef/dollydimple.png
)

Note the original Amiga font. Was some work to rip it, colors might be a little off, but I like it much better than the one used in WinLemmings.
Title: Re: Basher/Digger/Miner break conditions on steel
Post by: ccexplore on February 14, 2006, 01:00:58 AM
Quote from: 0xdeadbeef link=1139755382/0#2 date=1139875546
I thought about adjusting the steel areas, which would be no problem since I don't have the value limitations of the original levels (as far as I remember, steel tiles coordinates are multiples of 4).
Well, if you're willing to take compatability to the extent of implementing the pseudo-detection of steel as in the original, I guess there's really no point in adjusting the steel areas.