tgstation/-tg-station — pull request #75 by Uristqwerty (2013-03-19 13:07:33+00:00)
Title: Pathing optimization

+ Added Distance_cardinal proc. Should result in slightly more CPU-efficient pathing when used with CardinalTurfsWithAccess, or other adjacent turf procs that do not return diagonals.
+ Changed calls to AStar that used CardinalTurfsWithAccess to use Distance_cardinal instead of Distance

Overall effect: A bit less CPU used during pathing, if a bot has to path around corners. If a bot doesn't have to path around corners, it should be about as fast as before.

Old screenshots of a quick prototype, when I made the same change to baystation (It mattered much more there, because the current map was the Luna, which was more or less a 3D maze of twisty little passages. On the current TG map, it should only matter if someone builds a wall across beepsky's patrol route):
https://dl.dropbox.com/u/26846767/images/SS13/pathing-curdist3.PNG becomes https://dl.dropbox.com/u/26846767/images/SS13/pathing-altdist3.PNG
https://dl.dropbox.com/u/26846767/images/SS13/pathing-curdist2.PNG becomes https://dl.dropbox.com/u/26846767/images/SS13/pathing-altdist2.PNG
https://dl.dropbox.com/u/26846767/images/SS13/pathing-curdist4.PNG becomes https://dl.dropbox.com/u/26846767/images/SS13/pathing-altdist4.PNG