Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Intel Mac 38c] Pathfinding error due to ramp access bei  (Read 724 times)

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
[Intel Mac 38c] Pathfinding error due to ramp access bei
« on: March 08, 2008, 03:28:00 am »

This bug took place about a week ago, but I had a pretty clear idea of what I think caused it, so I feel pretty safe reciting it from memory.

code:
Level z:

#####
..v##
#####
#####

v - ramp down

Level z-1:

#####
#%^..
#%..@
###%%

^ - ramp up
% - ore deposits
@ - miner


This is how I had it at first, as part of a downward sloping mine tunnel following an ore vein. Works great, until I mine out the ore to the left of the ramp:

code:
Level z:

#####
..v##
#####
#####

v - ramp down

Level z-1:

#####
#@^..
#%...
###%%

^ - ramp up
% - ore deposits
@ - troublemaking miner who just caused some serious trouble


1) The ramp does not collapse because it is facing a wall on the north side.

2) The upper level is no longer accessible via the ramp, because the ramp leads up to a wall rather than open floor. Similarly, the lower level is no longer reachable from the upper level.

3) The pathfinding zones aren't updated to reflect the loss of connection triggered by the ramp being undermined on the side that maintained the connection. Of course, I'm guessing about this, but it seems the obvious explanation for the chaos that followed...

4) En masse pathfinding failures are triggered -- a miner on the higher level floods the message queue with failure messages about reaching mining designations on the lower level. Like dominos, all of the mining designations reachable from the lower level are canceled as FPS drops to a crawl.

5) Assigning new designations on the lower level to replace the lost ones simply spams the world with cancellation messages, clears the new designations, and continues to slow the game down horrendously.

6) Re-establishing the connection between the upper and lower levels fixes everything, and the game continues normally like nothing happened.

Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: [Intel Mac 38c] Pathfinding error due to ramp access bei
« Reply #1 on: March 09, 2008, 12:00:00 am »

Okay, I'll check it out.  Probably a case I missed when I homogenized the ramp movement code back whenever I did that.
Logged
The Toad, a Natural Resource:  Preserve yours today!