Tpathfinding --a tiny pathfinding plugin

Posted By: tzw

Tpathfinding --a tiny pathfinding plugin - 08/30/11 02:41

Tpathfinding(TINY PATHFINDING)---an easy to use and tiny pathfinding plugin...

new features(v0.04):
the new version can let your control the pathfinding more deeply and wisely and flexibly . and also can speed up your pathfinding noticeable in a large map or huge number of waypoints.(though the pathfinding is already very fast....)
see new tpf_FindPath's document for details.

http://www.mediafire.com/?3kggr5katp3gmad

http://www.mediafire.com/?8cy3pzl2986icwo (v0.03)
http://www.mediafire.com/?cth1rotc412f304 (v0.02)
http://www.mediafire.com/?l119cb9rr8e711n (v0.01)

Hope some of you think the plugin is useful , which will make me verry happy !! laugh
best regards. tangziwen
Posted By: darkinferno

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 12:11

looks like you forgot to include entmove.c .. can you post it here in code tags ?
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 12:14

uh................. the entmove.c is just for my old test demo.... the header will not be used anymore.

just comment or del it , the sample work fine too..
Posted By: darkinferno

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 12:25

well in that case, i take it that it just doesnt work for A7 then laugh ok
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 12:30

em.. laugh i hope you can have fun with it....
Posted By: darkinferno

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 13:48

ya i use A7 and it doesnt work for me but hope others have fun with it laugh
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 14:07

can you tell what the error you get??
i test in a8,and build the plugin in vs2010. everything is ok.
Posted By: 3dgs_snake

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 14:23

Hi,

Tested and worked fine with A7 and A8, Perhaps you compiled your DLL against Multi-Threaded DLL (/MD), so it requires msvcr100.dll/msvcp100.dll (VS2010 Runtime)?

That's just a hit, but I don't really know (cause A8 already have VS2010 Runtime I think, and you already have it installed with VS2010).

Best regards.
Posted By: darkinferno

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 14:35

ok, ran it with A7.86, works, i was running A7.84 before, thanks, i think i'll be making good use of this
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 15:21

i'm glad to hear the plugin can help you
laugh
Posted By: Pappenheimer

Re: Tpathfinding ----just another pathfinding plugin - 08/30/11 18:57

As far as I can see from the demo script, it is very easy to use this.
Thank you a lot!
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 08:42

tiny pathfinding v0.02 is realesd .
now you can use the findingpathing plugin more flexibly.
new features:
*the plugin let the path linked list and array like.
*you can use new interfaces : tpf_InsertPrev , tpf_InsertNextr, tpf_RemoveNode,tpf_GetPos,tpf_SetPos ... directly access the path.
*the "tpf_SetWayPoint" function change a bit, so you can use it read postion info from external files and precaculate waypoints(if you wish)
*the "tpf_printpath"(in "tpf_extra.c") can print the path from pathfinder to ENTITY 's path, let you combine such as path_spline , path_length.
hope some of you think the new version is more useful and easy.

download link :
http://www.mediafire.com/?cth1rotc412f304
Posted By: WretchedSid

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 12:37

Great work, thanks a lot for the contribution!
Also: Happy Birthday mate!
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 12:40

thanks!
Posted By: darkinferno

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 12:50

Error in 'tpf_extra.c' line 39; 'path_create' undeclared identifier
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 12:58

well.... it's A8 feature.... in A7 , you can not create path at runtime.....
"V8.20.1 - released April 20, 2011

Actor paths can be created by script with the path_create function. The path_set function can be used to retrieve the path name.
"

Posted By: darkinferno

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 13:02

ah okay
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 13:04

it just a way to handle the path which the plugin create. I think you can directly use tpf_InsertPrev ;tpf_InsertNextr ; tpf_RemoveNode;tpf_GetPos; to do your own pathfinding.
or simply use the "tpf_NextPos"("tpf_extra.c") for your pathfinding.
Posted By: Redeemer

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 13:42

Happy birthday, and nice contribution!
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 13:44

thank you!
Posted By: swerning

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 16:33

Thanks a lot for this very useful plugin, the demo works like a charm and the system is quite easy to implement (I think :)).

Just one question: is it possible to use multiple PathFinder*s at the same time (e.g. to have an enemy chase the player)?
I tried to quickly adapt the demo script (cf. http://pixellation.de/demo_enemy.c) by duplicating and modifying the player script using a second Pathfinder* called enemy_finder. However, I get an error saying Script crash in aEnemy: SYS when I try it; the regular player script is still working.

Probably I made another mistake but I just wanted to check briefly if it's possible in the first place to use multiple pathfinders.

Thanks a lot in advance and have a nice birthday,

Stefan
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 09/01/11 23:58

hello!!
well the tpf_NextPos is not the native function in my plugin but a optinal function . it's defined in "tpf_extra.c".

if you look into the function you will see this function shall combine a ENTITY pf_obj->ent.

the tpf_NextPos's Algorithm is that this function use thepf_obj->ent' postion to check if the entity is enough closed to the first node in the path ,if yes then remove the first node. then check if the entity is enough closed the new first node ( the post second node) and so on............

so obviously for use this optional function , you should bind a entiy to the pathfinder first.
for example:
enemy_finder.ent =me;

hope you think my plugin is a bit useful....

best regards tang ziwen
Posted By: swerning

Re: Tpathfinding ----just another pathfinding plugin - 09/03/11 12:01

Hi,
that's very good to know, thanks! I'll look into the script again and see if I can get it to work like that.
All in all, I think the plugin works really well and (at least for me) has been the easiest and most stable way to implement pathfinding that I found on the forum so far.
Posted By: tzw

Re: Tpathfinding ----just another pathfinding plugin - 09/03/11 12:23

thanks,
by the way if you download the ver 0.03, it already include a very (maybe very very .....)simple sample for showing how to let some guys chase the player......
Posted By: tzw

Tpathfinding v0.04 out-more flexible & performance - 09/04/11 14:18

now you will get 0.04 version.
the new version can let your control the pathfinding more deeply and wisely and speed up your pathfinding noticeable in a large map or huge number of waypoints.(though the pathfinding is already very fast....)

http://www.mediafire.com/?3kggr5katp3gmad
Posted By: snake67

Re: Tpathfinding v0.04 out-more flexible & performance - 09/08/11 14:37

Hi tzw

Great plugin, thanks a lot! I tested it in my project where i had an own pathfinding allready. Since i got a big lag with my routine i am glad to get yours. It works very well and fast.
Posted By: tzw

Re: Tpathfinding v0.04 out-more flexible & performance - 09/09/11 01:42

thanks for your kind words.
after my college' military trainning , i'll make a full manual for the plugin.(the current one is 2 simple )
Posted By: snake67

Re: Tpathfinding v0.04 out-more flexible & performance - 09/09/11 02:45

Hi

Great. I tested your pathfinding in a level with platforms and recognized some problems. Do you use a trace to determine a free way to a waypoint? If yes, do you use USE_BOX? And it would be great to be able to mark waypoints on platforms - f.e. with a flag - to help the pathfinding using them in a different way. So it would be possible to handle stairs and platforms. Btw stairs with walls on both sides work great.
Posted By: tzw

Re: Tpathfinding v0.04 out-more flexible & performance - 09/09/11 03:06

yes .
nope, from the manual , we can see "speed: Slow (especially with USE_BOX) "., so you should place the waypoint wisely(in my next version help document , i'll give you some hints ).

emm..............it's a very useful feature. i will add this (or use a sample to show a workaround). but do not ask me when. laugh
Posted By: darkinferno

Re: Tpathfinding v0.04 out-more flexible & performance - 09/09/11 14:54

My wish would be that you maintain an A7 version also but i understand why you wouldnt want to, plus i dont know how many other users would use it, i for one would use it though !
Posted By: tzw

Re: Tpathfinding v0.04 out-more flexible & performance - 09/09/11 23:48

thanks your reply.
in fact,except some functions,it works on a7 too.
of course ,i'll look into it and let it more compatible.
well, from the download statistics.there are over 130 140 men download it in a week.
it've made me very happy already!!
i just treat the plugin as my private try in plugin developing and for my team's project(a FPS game, i work as coder).
this plugin doesn't cost me lots of time(i've only spend 4days, 3 hours each day)in the first version and of course doesn't cost lots of time to upgrade it.

i just hope some guys ues it and some of them think it's useful . it's enough laugh
Posted By: Altarius

Re: Tpathfinding --a tiny pathfinding plugin - 09/17/11 14:44

Hi,

Can anyone tell me what the key for make the character start walking too the destination in the demo?

lolll

thx
Posted By: tzw

Re: Tpathfinding --a tiny pathfinding plugin - 09/19/11 03:17

ok,the plugin caculated a path that contain some nodes. the char rotate to the direct node then move to it. if char get close to node enough, then remove the node, rotate &move to the new one and so on........
after my military trainning, i'll upload new version. it'll be more powerful and contain some new demo
Posted By: codeChallenged

Re: Tpathfinding --a tiny pathfinding plugin - 10/05/11 02:37

I'm running v.7.86.6 and get this error..

E1512
Empty prototype called in tpf_WayPoint

if everyone else's is working okay I assume its a version 7 problem. Any suggestions?
Posted By: tzw

Re: Tpathfinding --a tiny pathfinding plugin - 10/05/11 15:05

i'll back & look into it in this week.
Posted By: codeChallenged

Re: Tpathfinding --a tiny pathfinding plugin - 10/06/11 03:10

Sorry, its not the program it must be my obsolete version of XP. Compiled version works fine on newer computer.

M
© 2024 lite-C Forums