Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 12,885 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 5 of 11 1 2 3 4 5 6 7 10 11
Re: Intense Ai: Free Pathfinding [Re: LarryLaffer] #70700
04/18/06 07:13
04/18/06 07:13
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
THANK YOU!! what an easter egg

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 Offline OP
Serious User
LarryLaffer  Offline 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


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: Intense Ai: Free Pathfinding [Re: LarryLaffer] #70702
04/18/06 14:37
04/18/06 14:37
Joined: Feb 2005
Posts: 190
Greece
immersionfx Offline
Member
immersionfx  Offline
Member

Joined: Feb 2005
Posts: 190
Greece
Ari,

very generous contribution indeed! THANK YOU man.

P.S. Xathikame alla xairomai pou to project sou zei kai basileuei. Tous exeis kanei na paramiloun, twra oloi perimenoun th synexeia! Na'sai kala kai filia apo thn patrida, opou kai na'sai..

Re: Intense Ai: Free Pathfinding [Re: immersionfx] #70703
04/18/06 17:25
04/18/06 17:25
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Here's a weird one:

http://www.geocities.com/hainesrs/game/ai1.jpg
http://www.geocities.com/hainesrs/game/ai2.jpg
http://www.geocities.com/hainesrs/game/ai3.jpg
http://www.geocities.com/hainesrs/game/ai4.jpg

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).

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: immersionfx] #70704
04/18/06 17:26
04/18/06 17:26
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
That's very very generous!!!

Perhaps, only a small step for you, but surely a big step for the community!!!!

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 Offline
Expert
frazzle  Offline
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
B
beegee Offline
User
beegee  Offline
User
B

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: beegee] #70707
04/18/06 19:42
04/18/06 19:42
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Thanks alot Aris!

I've been learning about pathfinding lately, and this will hopefully help me understand it better. The code seems to be documented/commented pretty good so that's great.

PS. why did you choose the dijkstra algorithm? What are the advantages over say, A*? Is it faster? Easyer to implement? How is performance for long and short paths compared to other algorithms?

Re: Intense Ai: Free Pathfinding [Re: Excessus] #70708
04/18/06 19:52
04/18/06 19:52
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
A* is the better sollution for RTS type of 2D Pathfinding, with thousands of nodes.
It would not be the optimal sollution for 3D "Shooter" Type of games,
as it is unnessicarily complicated too for this purpose.

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 Offline OP
Serious User
LarryLaffer  Offline 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

Page 5 of 11 1 2 3 4 5 6 7 10 11

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1