How many for you is a ton? I asked players on Aardwolf and many have about 100 portals in inventory. I think one person had over 200. But is that a ton?Vadi wrote:I most certainly don't recommend creating a ton of portals.
Global exits
Re: Global exits
Re: Global exits
What I described is the most efficient way to implement this in Mudlet, currently. Give it a go and see if the performance is acceptable?
Re: Global exits
I've been using Aardwolf Mudlet Module for a few weeks, and have implemented a portals system as described here, ie just before path finding add all portal destinations as special exits out of the current room then after path finding remove them. I have less than 30 portals at the moment and I have about 26K mapped rooms.
When running mudlet from a shell it shows some debug information:
[update 16-03-2021]
I updated to using the newly released 4.11.1 and now there is a noticeable delay when doing speedwalking:
When running mudlet from a shell it shows some debug information:
So a fraction of a second, which is more than acceptable for me, since it saves having to manually choose which portal to use, and also even for destinations that don't have a direct portal the path finder will choose a portal that is nearest to your destination, use it then speedwalk the rest of the way.TMap::initGraph() INFO: built graph with: 26074 ( 26074 ) locations(roomCount), and discarded 0 other NOT useable rooms and found: 79490 distinct, usable edges in: 0.141929 seconds.
TMap::findPath( 30528 , 28336 ) INFO: time elapsed in A*: 0.000553348 seconds.
TMap::findPath( 30528 , 28336 ) INFO: found path in: 5.067e-06 seconds.
[update 16-03-2021]
I updated to using the newly released 4.11.1 and now there is a noticeable delay when doing speedwalking:
TMap::initGraph() INFO: built graph with: 26347 ( 26347 ) locations(roomCount), and discarded 0 other NOT useable rooms and found: 80055 distinct, usable edges in: 327.375 ms.
TMap::findPath( 30528 , 24089 ) INFO: time elapsed in A*: 99.9877 ms.
TMap::findPath( 30528 , 24089 ) INFO: found path in: 0.035415 ms.
TMap::initGraph() INFO: built graph with: 26347 ( 26347 ) locations(roomCount), and discarded 0 other NOT useable rooms and found: 80027 distinct, usable edges in: 323.152 ms.
TMap::findPath( 24089 , 24113 ) INFO: time elapsed in A*: 6.36206 ms.
TMap::findPath( 24089 , 24113 ) INFO: found path in: 0.043912 ms.
TMap::initGraph() INFO: built graph with: 26347 ( 26347 ) locations(roomCount), and discarded 0 other NOT useable rooms and found: 80027 distinct, usable edges in: 566.849 ms.
TMap::findPath( 24112 , 24114 ) INFO: time elapsed in A*: 9.30509 ms.
TMap::findPath( 24112 , 24114 ) INFO: found path in: 0.060784 ms.
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Global exits
There was a bug in Mudlet 4.11.0 (but not in the previous 4.10.x versions) in the generation of the Boost Graph Library graph that Mudlet needs for pathfinding and it particular concerned locked special exits - it might be that in correcting that bug (done by 4.11.1) it takes longer to produce a valid route. A side by side comparison finding routes from/to the same rooms in the same map file in the two Mudlet versions might be informative - as would checking that the routes found for the older (if it is the bugged) version are actually usable - they do not try and make a route through a locked special exit.
Re: Global exits
So I've been using 4.11.1 for about a week now. In at least the first day or so the initGraph() time has been around the 300-500ms range.
Now with the addition of some more rooms the time is around 200ms:
Also I had gone up quite a few levels and unlocked about 20-30 areas so I did some tests on exit locks - they are all normal exits and only 1 special exit. The difference between about 100 locked exits and 200 locked exits is again not noticeable. The time is still around 200ms.
I am curious as to why the time for initGraph() has decreased![Question :?:](./images/smilies/icon_question.gif)
Now with the addition of some more rooms the time is around 200ms:
Also during this time I have acquired a few more portals for a total of 35. I did some tests to see whether number of portals have a noticeable effect (I reduced the number of portals down to 3). The time is still around 200ms.TMap::initGraph() INFO: built graph with: 27785 ( 27785 ) locations(roomCount), and discarded 0 other NOT useable rooms and found: 83311 distinct, usable edges in: 215.1 ms.
TMap::findPath( 30518 , 10375 ) INFO: time elapsed in A*: 65.1764 ms.
TMap::findPath( 30518 , 10375 ) INFO: found path in: 0.045248 ms.
TMap::initGraph() INFO: built graph with: 27785 ( 27785 ) locations(roomCount), and discarded 0 other NOT useable rooms and found: 83311 distinct, usable edges in: 196.791 ms.
TMap::findPath( 10310 , 32418 ) INFO: time elapsed in A*: 3.57053 ms.
TMap::findPath( 10310 , 32418 ) INFO: found path in: 0.014048 ms.
TMap::initGraph() INFO: built graph with: 27785 ( 27785 ) locations(roomCount), and discarded 0 other NOT useable rooms and found: 83311 distinct, usable edges in: 193.79 ms.
TMap::findPath( 30528 , 30418 ) INFO: time elapsed in A*: 4.81433 ms.
TMap::findPath( 30528 , 30418 ) INFO: found path in: 0.011029 ms.
Also I had gone up quite a few levels and unlocked about 20-30 areas so I did some tests on exit locks - they are all normal exits and only 1 special exit. The difference between about 100 locked exits and 200 locked exits is again not noticeable. The time is still around 200ms.
I am curious as to why the time for initGraph() has decreased
![Question :?:](./images/smilies/icon_question.gif)