Multithreaded PAWN using just standard NPCs
#9

Quote:
Originally Posted by Mauzen
View Post
An usage example would be path finding with lots of nodes. This might take several 100ms or even seconds and so cant be used efficiently. Putting this in a NPC process is no problem then, you just need to wait for it to finish.
Node data needs to be reloaded in the NPC script which wastes some RAM but I think thats worth the speed boost.
I recently finished a GPS script that uses A* for path finding, it runs between 40-60ms each route, the only exception being if it can't find a path and is forced to check all nodes in which case it takes about 400ms.
This is a long time for a script to run however I feel it could be greatly optimized if some one with more path finding knowledge was to work on it.
For example the nodes in gta are split into 64 sections, I believe these grids were used initially to create a rough path and then it would be refined more.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)