Posts: 618
Threads: 31
Joined: Feb 2011
Reputation:
0
Well i think its still better then the regular npc we have. Anyway should i rather use the gps plugin from Gamer_Z
or wait until this awesome plugin from pamdex totaly suits RNPC ? I obviously want rnpc's calculating the closest route and drive the road properly
Posts: 1,047
Threads: 23
Joined: Jun 2009
Quote:
Originally Posted by AIped
Well i think its still better then the regular npc we have. Anyway should i rather use the gps plugin from Gamer_Z
or wait until this awesome plugin from pamdex totaly suits RNPC ? I obviously want rnpc's calculating the closest route and drive the road properly
|
if you want to drive the road you are better off using my plugin, this iplugin is allo ver SA, not "just the roads" :P
Posts: 1,781
Threads: 13
Joined: Sep 2009
Reputation:
0
i dont get it whats wrong with the current RNPC plugin - it works fine for me. o.O
i have to "admit" that i some glitches like bots teleporting, too (still happens rarely, but thats fixed due to the nature of the "host" script running them).
may i ask you all if you can provide the max. NPC amounts your server can handle, regardless if they're moving on foot/vehicle or everywhere/road nodes only?
iam afraid that the current NPC system is guilty for wasting 1 thread for each npc, therefore there seems to be a limit like 250 of them.
add the A* algorithm for calculating their routes, and consider each nanosecond used as too-much already.
balancing the amount of npcs (lowering) in trade for some CPU time for just calculating their routes, is a pain in the butt, considering that they will not be able to react on environment changes like reacting on each other - that needs to be done aswell...
i noticed this thread changed into a discussion (and that there is a thread in the advanced scripting section), so why not move to there instead going offtopic here? ^^
ontopic: i will check this plugin out for sure. as far i can see from the videos, it seems to be in the state like my "64 RNPCs test" video, where i stopped developping the script due to the vast amount of CPUtime it eats. maybe i lend some of the multithreading code, if i ever understand it lol
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
I just thought of another feature which would be helpful when generating a path. It would be nice if you could tell the plugin how many nodes to return so it stops calculating the path after (n) nodes this would be really useful for following players as it would save some CPU by stopping when enough nodes are calculated for the user I understand you can use PathFinder_Init (maxnodes) but this should really be a dynamic feature. Additionally I mentioned before the paths sometimes calculate too close to walls can this be improved to generate greater tolerance from walls?
Edit - tried using PathFinder_Init (2.0, 3); but every calculations fails I'm assuming as there is more than 3 nodes but shouldn't return the path anyways even if it is not complete?
Posts: 15,941
Threads: 0
Joined: Jun 2008
Quote:
Originally Posted by AIped
If its possible to calculate that difference then it should also be possible to calculate the difference between
a road and a pavement (if there is one) amongst it...correct?.
|
As I say, I've not looked at the code, but I do know that the resolution of the MapAndreas plugin will make this not possible. A kerb is a very small height difference and points are only sampled once every 1 GTA unit. Assuming a kerb is 0.1 units high that means the plugin will show a difference of 0.1 between two points 1 unit apart - that is a very small gradient and there's no way to know if it is from a step or a slope.
Speaking of which, are there any points in the world where the low resolution of the MapAndreas plugin mean that thin walls are not represented at all? And if so, does this mean that the bots just walk straight through them after route calculation?
Posts: 618
Threads: 31
Joined: Feb 2011
Reputation:
0
i dont think thin walls are presented cuz i saw an npc just walks threw thin fences and low walls like the ones between small bungalow/houses from LV
Posts: 15,941
Threads: 0
Joined: Jun 2008
Thought so, that is a shame. I just posted something relevant here that you might be interested in:
http://forum.sa-mp.com/showthread.ph...94#post2461594
Also, have you considered ray-tracing instead of nodes for finding the best route? Would seem to require less nodes and calculations to me.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
Thanks pamdex, that will be useful!
Posts: 45
Threads: 7
Joined: Mar 2012
Reputation:
0
Hi,
This PathFinder is really awesome, although I have some questions about it. Would you be able to add my skype:
Skype: descodetm
Thanks