Awesome job bro, I’ll be taking inspiration from your stuff
Originally Posted by DownGrade
Don't let these no life creeps get to you, its always the same on here. They'd rather spend hours upon hours in the rune-server spam section then getting laid! ha ha!Its honestly pathetic i haven't seen so many lowlifes in my life its actually insane i wish that this section would just vanish its probably the only way to get these people out of the community...
PLEASE BE AWARE OF IMPOSTERS MY DISCORD ID: 362240000760348683
I'm not planning on making this pfer as extensible as that. I'll give it some thought, but unless I can add it without any perf hit/cost, I probably won't make it a priority.
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 for 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
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 for fun reached(...): Boolean
I'll have to test out those scenarios on rs before doing any big changes, but good call
Why? Because currently your only supporting player movement on land, you'll need support for flying and swimming npcs too which means checking against different collision flags.
This is something we have no information about, as it's solely server-sided.
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. ], 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.
This is something we have no information about, as it's solely server-sided.
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. ], 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 inversed
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 to XPathFinder::findPath now taking a CollisionStrategy param 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)
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 to XPathFinder::findPath now taking a CollisionStrategy param 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 in 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 think serverPathCoroutineDispatcherThreadLocal is working, it's probably just resetting the instance 2k times then calculating the path once?