Skip to content

Improve performance

Compare
Choose a tag to compare
@demonnic demonnic released this 28 Oct 18:34
· 25 commits to master since this release

In larger areas Mudlet would sometimes stall for a brief half second while trying to calculate the closest room, especially in the beginning of the walk as it would need to cycle every room until it tripped upon right next to it, or had checked each room to find the closest.

With this it will check all of the adjacent rooms first to see if any are unvisited and go to the first of these it finds. If it doesn't find any, it will then check all the rooms adjacent to -those- (so within two moves of your current location). These are the two most common scenarios, especially when the list of unvisited rooms is larger. As you visit more rooms and it becomes less likely you will find a match within 2 rooms, the number of rooms you have to check is significantly shortened for the vast majority of the checks.

In testing I experienced far fewer moments of hesitation due to calculating route. In any use where you don't immediately move on from each room it should be almost entirely smoothed out.