|
Re: Intense Ai: Free Pathfinding
[Re: Kotakide]
#70701
04/18/06 12:46
04/18/06 12:46
|
Joined: Jul 2004
Posts: 1,205 Greece
LarryLaffer
OP
Serious User
|
OP
Serious User
Joined: Jul 2004
Posts: 1,205
Greece
|
Hiya, Glad you all liked it.. Now about your 'little complains'..  Quote:
The only hiccup was when the player got stuck under the stairs.
Yeah I got that once as well. In your game, a layer above the Pathfinding should detect this(I set the is_bIsStuck flag of the Npc when he gets stuck by any reason) and attempt to get him unstuck and do to pathdfind again
Quote:
Also, if you continuously click the left mouse button, it will increase the function count by one for each click. So, if I press the button 50 times before the player gets to the spot, there will be 50 functions running on top of whatever runs all the time. If you click a null spot, it zeros out(except for those 6-7 always running functions), and the player stops moving.
Good catch.. I fixed it.
Quote:
Anyway, congratulations...this is perfect for a point & click game..adventure or otherwise.
Thanks 
Quote:
http://i56.photobucket.com/albums/g182/obinkmalmsteen/Clip_2.jpg
When I click the ground bellow Why he pick the straight line and jump, instead the stairs?
Because falling down makes a shorter path than going down the stairs. In a game like Quake3 would you jump directly off a platform or try to find the stairs?
Anyhow, I hear what u say.. Sometimes it might be preferable for the NPCs to take the longer but safer route.(might take damage if they fall down big distances). So I made an is_ai_MaximumFall constant that you can define the maximum that your NPCs are ready to fall down.
Graph re-made with is_ai_MaximumFall==100 pixels (instead of 500)
And here's a path
However, I like it better when the NPC takes the shortest route in this level, so is_ai_MaximumFall is originally set to 500, but feel free to change it to whatever, it's in the is_IPathfinding.wdl(don't forget to re-build the graph, when you do). More on this on the Documentation coming up..
Quote:
http://i56.photobucket.com/albums/g182/obinkmalmsteen/Clip_3.jpg
he's not takes the shorter way!
That's a case where String Pulling (responsible for making smoother paths) fails due to tricky ground(bridges and all), exactly like we talked with Damocles a few posts ago. You can usually overcome this by re-arranging the waypoints in the level.
I fixed that for the case you found. But maybe it can happen somewhere else as well. I'll give out some good tips on laying out your waypoints in the Documentation.
And a new version with the new fixes.. The original link a few posts ago is updated as well though.
Intense Pathfinding 1.01
Code:
Fixes from 1.0 ------------------ Fixed function leakage when attempting to take a new path before the old one is finished. Added functionality to choose between falling from big distances to take the shortest path, or take a longer but safer(no falls) path. Rearranged the Waypoints of the level for smoother paths.
Thanks all for your comments. Keep ep coming!
Aris
|
|
|
Re: Intense Ai: Free Pathfinding
[Re: immersionfx]
#70703
04/18/06 17:25
04/18/06 17:25
|
Joined: Aug 2000
Posts: 7,490
Orange Brat

Senior Expert
|

Senior Expert
Joined: Aug 2000
Posts: 7,490
|
Here's a weird one: http://www.geocities.com/hainesrs/game/ai1.jpghttp://www.geocities.com/hainesrs/game/ai2.jpghttp://www.geocities.com/hainesrs/game/ai3.jpghttp://www.geocities.com/hainesrs/game/ai4.jpgSometimes, if you click on the side of a block, the player will try to move there and sometimes it won't. Ideally, you're going to want it to never do it or do it everytime(unless certain conditions are met...see below). I think it would be nice to be able to toggle this behavior. If it's turned on then when a wall(or any object) is clicked, the player will move to the closet "legal" spot to the point. Of course, it won't be able to get to the clicked spot, but it should be smart enough to stop short of it if it can reach anywhere near that area. If an area is truly off limits, then the AI should know this and then a null function could activate(the red "X" stuff).
My User Contributions master list - my initial post links are down but scroll down page to find list to active links
|
|
|
Re: Intense Ai: Free Pathfinding
[Re: Pappenheimer]
#70705
04/18/06 19:03
04/18/06 19:03
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
Nice contribution !! This looks very promicing  You are comming closer and closer to the perfect AI, keep it up !!
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
Re: Intense Ai: Free Pathfinding
[Re: frazzle]
#70706
04/18/06 19:04
04/18/06 19:04
|
Joined: Nov 2004
Posts: 888
beegee
User
|
User
Joined: Nov 2004
Posts: 888
|
Hey, very much thanks for this nice constribution!
Regards, #benny#
--------- GenuineMotors.de
Fratch - Newer statistics panel for GameStudio
|
|
|
Re: Intense Ai: Free Pathfinding
[Re: Damocles]
#70709
04/18/06 20:57
04/18/06 20:57
|
Joined: Jul 2004
Posts: 1,205 Greece
LarryLaffer
OP
Serious User
|
OP
Serious User
Joined: Jul 2004
Posts: 1,205
Greece
|
Hello! thank you for your comments everyone. I'm glad I've published this already, cause I've yet to start on that stupid documentation. Hopefully, I'll get some free time tomorrow. You get some idea from the comments anyway, but I also want to give you some good tips that would save you a couple of hours looking around.. So, tomorrow then... sorry Quote:
Sometimes, if you click on the side of a block, the player will try to move there and sometimes it won't. Ideally, you're going to want it to never do it or do it everytime(unless certain conditions are met...see below).
You're a hell of a beta tester.. I'll see what I can do about that, probably drop the target spot to the ground and attempt to pathfind there, if there is a path. Nice catch again..
Quote:
PS. why did you choose the dijkstra algorithm? What are the advantages over say, A*?
There aren't any. A* is better, it's as simple as that. The reason I haven't upgraded from Dijkstra to A* yet(it won't be more than 3-4 extra lines of code), is that Dijkstra is doing ok. You won't get any decrease in the performance from running that algorithm several times per frame, so I put my effort into optimizing other things instead.
Don't forget though, that the actual search algorithm(breadth-first, depth-first, Floyd, Dijkstra, A*) is only half the picture. The underlying data structure is also critical, if not the most important part. The first pathfinding I made for 3dgs was inspired by Philipp Walser's tutorial and did a run-time A* search on a dynamic square-grid search space around the NPC. Needless to say, all these useless nodes that were being placed in stupid positions and flooded the whole level made up for a terrible search space and it's no wonder that no real game ever used this kind of technique. Intense Pathfinding is at least 100 times faster than my earliest attempt because of it's improved Search Space, even though it uses a slower search algorithm(Dijkstra instead of A*).
Hope I made some sense. I never know for sure when I ramble like that.. Good luck in your research on pathfinding anyway. It's hell.. you're gonna love it 
immersionfx, geia sou file mou (ksexasa to onoma sou, lol ), pos paei to paixnidi?? Eides vlakeia, tora eimoun 1 mhna ellada, kai de sinenoi8ikame na pame kamia volta. Prox8es gurisa pali skotia alla ama einai kanonizoume kati gia to kalokairi Ego esy kai o Hellcrypt 
Cheers all,
Aris
|
|
|
|