Author Topic: Miner hovers, can cancel with blocker/batter assignment  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Online Simon

  • Administrator
  • Posts: 3961
    • View Profile
    • Lix
Miner hovers, can cancel with blocker/batter assignment
« on: June 07, 2024, 06:15:33 PM »


I found this in the current Lix 0.10.23, but this bug must have been in the physics forever, at least since I've presented C++ Lix in 2009 to the Lemmings Forums.

Expected: When you assign blocker to a miner, the lix starts blocking.

Observed: Timed well, on the right terrain, the blocker assignment cancels the miner and makes the lix walk again.

This cancelling works with a batter assignment (instead of a blocker assignment), too.

Explanation: The floor must be shaped like a builder bridge. In the physics, the builder bricks are 2 hi-res pixels high, i.e., 2 units of distance. Naively, this is too high a drop for the miner to continue, therefore the miner has leeway in its code to continue mining along such a bridge. To trigger the bug, assign blocker while the miner is hovering over an air pixel, i.e., while the miner's foot is at Foot1 or Foot3 here:

                          Foot0
                         +--+--+--+--+--+--+--+--+--+--+--+--+
                    Foot1|  |  |  |  |  |  |  |  |  |  |  |  |
                         +--+--+--+--+--+--+--+--+--+--+--+--+
              Foot2      |  |  |  |  |  |  |  |  |  |  |  |  |
             +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        Foot3|  |  |  |  |  |  |  |  |  |  |  |  |
             +--+--+--+--+--+--+--+--+--+--+--+--+
  Foot4      |  |  |  |  |  |  |  |  |  |  |  |  |
 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
 |  |  |  |  |  |  |  |  |  |  |  |  |
 +--+--+--+--+--+--+--+--+--+--+--+--+
 |  |  |  |  |  |  |  |  |  |  |  |  |
 +--+--+--+--+--+--+--+--+--+--+--+--+




Bug! Bug! Bug!

-- Simon