1

**Tech & Research / Breaking Down the Classic 5 100% Solution**

« **on:**May 13, 2017, 04:49:38 PM »

A little over a year ago, I achieved a 100% solution to Classic 5, thereby confirming that 100% is possible on all levels in Lemmings 2. In this post, I'm going to break down the mechanics and the logic I used to achieve that solution. I'll warn everyone that this post will be a bit long-winded, but it really shows how precise knowledge of the game's mechanics can help immensely with crowd control.

Although the mechanics in this case are specific to Lemmings 2, many of the methods described below can easily be adapted for Lemmings/ONML mechanics, as well.

The key to saving 100% on Classic 5 is to avoid the blocker/bomber combination for crowd control. Ordinarily, this would result in several lemmings pacing back and forth in the digger's hole, and approximately half of them would be facing left when he finishes, resulting in their deaths. Therefore to have a shot at 100%, I needed to minimize the number of lemmings pacing back and forth in the diggerâ€™s hole by managing the crowd efficiently.

I began by studying the characteristics of the floor on which the digger is placed. This area has a horizontal length of 7 blocks, and there are 16 pixels to a block, so the area is 16*7=112 pixels wide. The lemmings can either be walking right or left at each of these pixels, for a total of 224 possible positions. (Note: Unlike in Lemmings/ONML, a Lemming does NOT move one pixel into the wall upon turning around in L2.)

For simplicity, I will notate a lemmingâ€™s position in this area with a number from 1 to 112, starting from the far right, followed by either an L or R to indicate which direction the lemming is heading. So a lemming who just turned around at the right wall would be notated as 1L, and a lemming who just turned around at the left wall will be notated as 112R.

Now consider the following Lemmings 2 mechanics:

Therefore all of the lemmings between positions 31R and 100L when the digger is assigned will be saved (a total of 131 out of 224 possible positions). Any lemmings who are outside of this range will have approximately a 50-50 chance of being saved, depending on which way they are facing when the digger finishes.

The rest of the solution focused on getting as many lemmings as possible bunched up into a group no more than 131 pixels wide. The entrance area is 5 blocks (80 pixels) wide (screenshot b), which means initially the crowd will be spread out across 160 possible positions. Since 160 is greater than 131, I needed to find a way to compress them further. In Lemmings/ONML, this could be done using the release rate, but that is not an option in Lemmings 2. I therefore focused my attention on the five skill assignments that are required to get from the entrance to the staging area at the bottom of the level.

I considered doing a computer simulation to map out how each skill assignment would alter the spacing of the lemmings, but I ended up getting extremely lucky and found a solution fairly quickly through trial and error. The initial basher resulted in several lemmings turning around in the basher's tunnel and separating from the crowd, but I managed to get most of them to rejoin the crowd later on. The first basher also had the side benefit of reducing the size of the rest of the crowd from ten blocks to eight and a half blocks, at which point I was able to get them under the 131 pixel limit by assigning floaters to the front four lemmings, thus slowing them down.

In the end, only two stragglers failed to rejoin the crowd. One of them was used to do the work on the right side of the level, but the other one ended up pacing back and forth in the final digger's tunnel. Fortunately, through careful skill placement and a bit of luck, I was able to get him facing right when the digger finished. It was satisfaction of the moment that I realized that all sixty lemmings were heading toward the exit that made all the hours of hard work worthwhile.

Although the mechanics in this case are specific to Lemmings 2, many of the methods described below can easily be adapted for Lemmings/ONML mechanics, as well.

The key to saving 100% on Classic 5 is to avoid the blocker/bomber combination for crowd control. Ordinarily, this would result in several lemmings pacing back and forth in the digger's hole, and approximately half of them would be facing left when he finishes, resulting in their deaths. Therefore to have a shot at 100%, I needed to minimize the number of lemmings pacing back and forth in the diggerâ€™s hole by managing the crowd efficiently.

I began by studying the characteristics of the floor on which the digger is placed. This area has a horizontal length of 7 blocks, and there are 16 pixels to a block, so the area is 16*7=112 pixels wide. The lemmings can either be walking right or left at each of these pixels, for a total of 224 possible positions. (Note: Unlike in Lemmings/ONML, a Lemming does NOT move one pixel into the wall upon turning around in L2.)

For simplicity, I will notate a lemmingâ€™s position in this area with a number from 1 to 112, starting from the far right, followed by either an L or R to indicate which direction the lemming is heading. So a lemming who just turned around at the right wall would be notated as 1L, and a lemming who just turned around at the left wall will be notated as 112R.

Now consider the following Lemmings 2 mechanics:

- A walker advances one pixel every frame.
- The digger will dig a 9-pixel wide hole.
- The optimal placement for the digger is at position 5R, which will place the hole at pixels 1-9. If the digger is placed any farther right, he will hit steel and abort.
- The digger digs down one pixel every eight frames. Since the floor is 16 pixels thick, he will take 16*8=128 frames to finish.
- After the digger removes five rows of terrain, the lemmings can no longer walk out of his hole.
- When dropping into the digger's hole, the number of frames a lemming spends falling can be expressed by FLOOR((X-1)/3), where X is the depth of the hole in pixels and X > 0.

Therefore all of the lemmings between positions 31R and 100L when the digger is assigned will be saved (a total of 131 out of 224 possible positions). Any lemmings who are outside of this range will have approximately a 50-50 chance of being saved, depending on which way they are facing when the digger finishes.

The rest of the solution focused on getting as many lemmings as possible bunched up into a group no more than 131 pixels wide. The entrance area is 5 blocks (80 pixels) wide (screenshot b), which means initially the crowd will be spread out across 160 possible positions. Since 160 is greater than 131, I needed to find a way to compress them further. In Lemmings/ONML, this could be done using the release rate, but that is not an option in Lemmings 2. I therefore focused my attention on the five skill assignments that are required to get from the entrance to the staging area at the bottom of the level.

I considered doing a computer simulation to map out how each skill assignment would alter the spacing of the lemmings, but I ended up getting extremely lucky and found a solution fairly quickly through trial and error. The initial basher resulted in several lemmings turning around in the basher's tunnel and separating from the crowd, but I managed to get most of them to rejoin the crowd later on. The first basher also had the side benefit of reducing the size of the rest of the crowd from ten blocks to eight and a half blocks, at which point I was able to get them under the 131 pixel limit by assigning floaters to the front four lemmings, thus slowing them down.

In the end, only two stragglers failed to rejoin the crowd. One of them was used to do the work on the right side of the level, but the other one ended up pacing back and forth in the final digger's tunnel. Fortunately, through careful skill placement and a bit of luck, I was able to get him facing right when the digger finished. It was satisfaction of the moment that I realized that all sixty lemmings were heading toward the exit that made all the hours of hard work worthwhile.