Game Mechanics - Lemmings Fused Together

Started by Clam, March 31, 2008, 12:04:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Clam

You know how, when a group of lemmings falls into a pit 1 pixel wide (like in "Lock up your Lemmings"/"All or Nothing"), they kind of 'fuse' together and you get a whole lot of them in one spot? Well, you'd think that it would be pretty hard to separate them again, short of giving one of them a skill to get it out of the group, right?

Turns out that's not quite true. When you get another lemming from the outside to bash through this pit to release the trapped lemmings, sometimes (not every time, but most) the fused lemmings split up into two groups :o Sometimes, only one lemming gets separated, but I have seen up to 12 lemmings in the smaller group, and I suspect many more could be possible. Also, they can end up anywhere from 1 pixel to about two 'lemming widths' apart.

I noticed this in a newly created level of mine (in Lemmix and Custlemm) and also in the aforementioned levels in DOS lemmings.

Can anyone explain what is going on here? I for one am totally stumped.

zennehoy

I'm not sure what you mean with the "lemming width" separation, but basically what's happening (I guess) is that lemmings always update in a certain order, and the bashing lemming is somewhere in the middle of the list of lemmings kept by the game. So the first few lemmings move, with the wall still intact, and turn around. Then it's the basher's turn, and he breaks the last bit of wall. All further lemmings will now not turn back. In the case of a single pixel gap, I would expect this to lead to an offset of 4 pixels, since lemmings actually enter the wall by one pixel on each side before turning around (so one group of lemmings will need to go back two pixels, while the other group moves forward two pixels).
It could become more complex if the basher bashes "through" the gap, breaking the wall on both sides in one go. Not sure what the distance between lemmings would be then.
If you ensure that the basher is the first lemming out, the group should stay intact. Taking the second lemming out as the basher should split off one lemming, etc.
Note that I didn't try any of this out, it's just what would happen in my Pocket Lemmings clone (which hopefully models the real game...)
Cheers,
Zen

Clam

Thanks, Zen! That makes a lot of sense. See, I figured that they would all move at exactly the same time (since that's what you usually see) rather than in order. However, this explanation seems to fit with what I have seen when testing this phenomenon - the later the basher lemming fell from the trapdoor, the more lemmings broke off when they were released.

By "lemming width" I meant the space taken up (horizontally) by the lemming sprite - about 5 pixels I think, so 2 lemming widths means that you could fit a lemming in between the two with no overlap. This width is more than the 4 pixels you suggest. I suspect this is because sometimes the basher will go through the gap and into the wall on the other side in one swing. So, the group of lemmings will turn and walk away from the basher, then the basher will take a swing, the second group will leave through the newly created gap, and the first group will walk a little before turning back because the basher has taken a little out of the wall on this side. This would account for the 10-or-so pixel gap I have seen between the groups.

Once again, thanks! :thumbsup: It all makes sense now!