0 registered members (),
16,643
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: ez_path -- for alpha testing! Simple Pathfind
[Re: clone45]
#44601
04/20/05 05:29
04/20/05 05:29
|
Joined: Aug 2003
Posts: 7,440 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,440
Red Dwarf
|
Thanks for seeing what you can do. regards p.s.: i know that feeling 
Last edited by Michael_Schwarz; 04/20/05 05:29.
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: ez_path -- for alpha testing! Simple Pathfind
[Re: clone45]
#44602
04/21/05 03:05
04/21/05 03:05
|
Joined: Nov 2000
Posts: 1,534 hamburg
Samb
Serious User
|
Serious User
Joined: Nov 2000
Posts: 1,534
hamburg
|
well I think that are too much nodes: the engine freezes at the position on the picture here you can download the level: CLICK HERE
|
|
|
Re: ez_path -- for alpha testing! Simple Pathfind
[Re: mk_1]
#44604
04/21/05 05:12
04/21/05 05:12
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
Expert
|
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
Good job Bret,
I wish I had more time to play around with it. I did find one minor problem. If the moving entity can't see the first node the program crashes. This could be a problem if someone has wondering monsters that might somehow not be able to see the first node in some circumstance or a moveable object blocks the entity's view to the first node. The program really should just not move the entity and return a 0 or something for move not being possible in that case instead of the program crashing. I suppose this could be tested for in C-Script, but it would be better if the dll handled it I think, or maybe not, but your sample program should show how not to have this happen, because it will eventually happen somewhere when people use the dll.
I do like how simple you made it to use. Very nice.
Loco
Professional A8.30 Spoils of War - East Coast Games
|
|
|
Re: ez_path -- for alpha testing! Simple Pathfind
[Re: clone45]
#44606
04/21/05 13:06
04/21/05 13:06
|
Joined: Nov 2000
Posts: 1,534 hamburg
Samb
Serious User
|
Serious User
Joined: Nov 2000
Posts: 1,534
hamburg
|
well I hope you can fix it then I make a little pacman clon  but very good work the easiest pathfinding I'd ever seen here
|
|
|
Re: ez_path -- for alpha testing! Simple Pathfind
[Re: Samb]
#44607
04/21/05 17:21
04/21/05 17:21
|
Joined: Mar 2002
Posts: 580 San Francisco
clone45
OP
User
|
OP
User
Joined: Mar 2002
Posts: 580
San Francisco
|
Samb, This problem turns out to be VERY difficult to solve. I woke up numerous times last night thinking about a solution, and most of them weren't adequate. The question is, how do you know which neighbors you should connect to? "All of them" isn't always a good idea. Check out this example:  The green lines represent neighbors connected to our source node. The red lines represent a possible path that could be choosen to reach the goal. I might be able to fix this by following closer neighbor nodes first. Yeah... maybe that's the ticket. It would require sorting the neighbor nodes by distance, which might slow down the initialization a bit... I'll keep thinking on it. - Bret
|
|
|
Re: ez_path -- for alpha testing! Simple Pathfinding.
[Re: clone45]
#44609
04/24/05 06:50
04/24/05 06:50
|
Joined: Mar 2002
Posts: 580 San Francisco
clone45
OP
User
|
OP
User
Joined: Mar 2002
Posts: 580
San Francisco
|
Ok!! I think that I ironed out some of those bugs. Download the new version at the same url: http://www.gamebeep.com/freebies/ez_path_src.zipThere are a few changes, but the most important ones are: 1) The function pf_to_ent() doesn't crash if there's no start node in sight. Instead, it returns "1" if everything is ok and "0" otherwise. It'll return 0 if there's no available start node. 2) After some intense programming, I fixed the "neighbor" problem that was causing some issues. It's ready for round #2 of testing!! I also added these .dll functions: DLLFUNC long pf_set_node_collision_distance(var dist)An entity will reach a node when they get a certain distance to it. This method can set that distance, which defaults to 20 quants.DLLFUNC long pf_set_max_path(var dist)Defines the maximum path search distance.DLLFUNC long pf_set_ent_collision_distance(var dist)Defines the distance that an entity has to be within its target to trigger the my._PF_REACHED_TARGET flag. Defaults to 10 quants.I'll write more about these functions later once I update the documentation. Have fun!! - Bret
|
|
|
|