0xdeadbeef
12 Feb 2006 14:43:01
Basher/Digger/Miner break conditions on steel etc.
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?
ccexplore
13 Feb 2006 19:18:57
Re: Basher/Digger/Miner break conditions on steel
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.
0xdeadbeef
14 Feb 2006 00:05:46
Re: Basher/Digger/Miner break conditions on steel
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.


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:

[url=http://home.arcor.de/0xdeadbeef/dollydimple.png]http://home.arcor.de/0xdeadbeef/dollydimple.png[/url]


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.
ccexplore
14 Feb 2006 01:00:58
Re: Basher/Digger/Miner break conditions on steel
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.