Awesome job bro, I’ll be taking inspiration from your stuff :)
Printable View
Awesome job bro, I’ll be taking inspiration from your stuff :)
Not just for external customisation, you'll need it for floor items and possibly following depending on how you do it, 0 additional cost; just replace it with an interface forQuote:
Originally Posted by Tomm0017 [Only registered and activated users can see links. Click Here To Register...]
fun reached(...): Boolean
There's also a debate to be had about whether the path finding should be incorporating distance checking for combat (which can also be done in place of the interaction), which would be a performance improvement over doing the full path and checking the distance every tick and cancel when within distance.
And another debate of whether line of sight should be implemented as a pathfinding algorithm
I'll have to test out those scenarios on rs before doing any big changes, but good callQuote:
Originally Posted by Greg [Only registered and activated users can see links. Click Here To Register...]
This is something we have no information about, as it's solely server-sided.Quote:
Originally Posted by Greg [Only registered and activated users can see links. Click Here To Register...]
Do you have any theories on how either of what you just mentioned would work? And is there any way to confirm those theories?
I have theories of my own, but I have no means to confirm any of it.
---
Edit: Looked closer into these, and found some new info.
(Credits to Cjay for insight on the swimming part)
I believe swimming is done with just the floor flag inversed(the flag that's set in map loading, outside of object spawning(since water isn't an object!). Looked into it in OSRS and any ducks and other similar creatures which spawn on water, could never leave water. In Lumbridge, there is a farm in which there are also ducks on the main land, however those ducks have a different npc id, and can never enter the water. They also have a custom script where they flee from any player that walks near them.
As for the implings and other flying creatures, I believe it would be done through projectile checks. There [Only registered and activated users can see links. Click Here To Register...], where the walls aren't projectile clipped, thus allowing creatures such as implings to wander inside, however I believe there's a further check down the line that checks for certain area controllers which prohibit unwanted creatures from entering said area.
Yeah that's exactly what I was about to say, 0x200000 inversedQuote:
Originally Posted by Kris [Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
Have you benchmarked this? I’m interested in how it performs in comparison to past solutions.
Yes there is a jmh package and clear details in the project readme of his results...Quote:
Originally Posted by Tyluur [Only registered and activated users can see links. Click Here To Register...]
Sorry lol I was reading this after just waking up :PQuote:
Originally Posted by Fire Cape [Only registered and activated users can see links. Click Here To Register...]
Added support for custom "Collision Strategies." Along with this, added an "inverse collision flag" strategy, which works for npcs such as ducks and krakens (can't go outside of water and vise-versa).
There was trade-off with performance (due toXPathFinder::findPathnow taking aCollisionStrategyparam and being used in collision checks for each tile). This hit is only noticeable for long routes, i.e GameClickLongPath (avg +0.0053ms/request) and GameClickAltPath (avg +0.009ms/request)
Spoiler for duck:
I don't see the point inQuote:
Originally Posted by Tomm0017 [Only registered and activated users can see links. Click Here To Register...]
serverPathConstructOnIteration,serverPathCoroutineDispatcherThreadLocal&serverPathCoroutineDispatcherConstruct
Surely you wouldn't recommend creating a path finding instance for each search or sharing one between multiple coroutines, so what's the benefit from benchmarking them?
Also I don't thinkserverPathCoroutineDispatcherThreadLocalis working, it's probably just resetting the instance 2k times then calculating the path once?