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
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,253 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 4 of 11 1 2 3 4 5 6 10 11
Re: Intense Ai: Free Pathfinding [Re: Damocles] #70690
04/15/06 18:19
04/15/06 18:19
Joined: Feb 2003
Posts: 195
slacker Offline
Member
slacker  Offline
Member

Joined: Feb 2003
Posts: 195
sweet.

Re: Intense Ai: Free Pathfinding [Re: Damocles] #70691
04/16/06 19:55
04/16/06 19:55
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
That document just explains the theory, u don't actually do a c_trace to determine a path between two points. I've talked about that before in this thread.

In detail, I've used a method explained in this site and looks a bit like this:



What you do is, simulate the NPC actually walking along the path, using c_traces with use_box of course. If there's an obstacle, you try again a bit higher to simulate the NPC's ability to climb, and if there's a gap below, more c_traces are used to drop the virtual 'npc' on the ground. The NPC's actual forward movement in pixels is used as well as it's MinMoveZ value(climb ability), to give accurate results.



Of course, a less accurate simulated walk is made in runtime checks for links. Runtime checks include:

Npc-->Target Point (check for direct link, to avoid engaging pathfinding)
Npc-->Closest Waypoint(find nearest point to pathfind from)
Target Point-->Closest Waypoint(same here)
String pulling:Npc-->2nd Waypoint(Try to eliminate 1st waypoint)
String pulling:2nd to last-->Target Point(Try to eliminate last waypoint)

Every other Waypoint in the path is pre-checked and pre-optimized(no string pulling) using Dijkstra on a pre-compiled automatically generated graph.


For these 5 functions, an optimized and more lose version of the simulated walk costs about 1000 microseconds on my machine (2.4ghz, 512mb, ati radeon 7500 mobility). So all 5 of them for each Pathfind take 5000 microseconds plus 10000ms to do Dijkstra in a huge level with about 250 waypoints(the bigger the search space the slower the algorithm). 15000ms is a pretty good speed and moves 30 NPCs simutaneously with no problems in my machine..

Here's a String Pulling example



The Npc has already made it to the Target Spot. The original path generated is illustrated with the thick red line(Red Waypoint-->Blue Waypoint-->Target Point).

Before attempting to move on path, it tried to do some StringPulling and remove the blue waypoint altogether. So a check for the link between the Red Waypoint and the Target Point was attempted. You can see the simulated walk drawn in the blue lines, making step by step and dropping to the ground every step. At some point it fell down the bridge, kept going on the ground below and collided with the gray box(if you observe you see an additional blue line a little higher also colliding to the gray box which is an extra raised attempt to check if the obstacle is climbable(it wasn't, it's a really tall gray box). So the String Pulling is discarded and the original path was taken(or the Npc would fall off the bridge)

I hope I made some sense...

The Wikipedia link you sent me was about NavMeshes and is a whole different thing. NavMeshes are by far superior to my approach(Points of Visibility). I made a go on NavMeshes some time ago, in co-operation with Dr. Scott Goodwin from CIDER, for an implementation on GameStudio, but it proved very hard. (Support for terrains and model-only levels would be overwhelmingly hard). Maybe some time in the future, I could give it another go. If you or anyone else is interested in helping in this, send me a PM, it would be a nice experience.


Btw, the contribution is ready. I'll get some sleep and then write some documentation and upload it when I wake up.

Cheers,
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] #70692
04/16/06 22:03
04/16/06 22:03
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
Ok, sounds reasonable to check it that way.
You should (but I guess you already have)
include the option to switch off the string pulling calculations
for performance issues in large levels.

I still go for pure node to node movement
to avoid situations, where the bot might get stuck on
corners and other obstacles. It looks more "on rails",
but the movement of the bot is smoothed by some other means to,
so he does not have a choppy movement.
(similar to watersking with a rubberband)

Realizing a nav-mesh would work out really cool in
a game, but of course the creation of such a mesh
would be very hard to realize by an automated script.
A very skilled level-mapper could do that by hand,
(but lots of work of course)

Re: Intense Ai: Free Pathfinding [Re: Damocles] #70693
04/17/06 09:59
04/17/06 09:59
Joined: May 2005
Posts: 138
jamrud khatulistiwa
Kotakide Offline
Member
Kotakide  Offline
Member

Joined: May 2005
Posts: 138
jamrud khatulistiwa
i just can't wait any longer, c'mon wake up ! and give me your nice code.

Re: Intense Ai: Free Pathfinding [Re: Kotakide] #70694
04/17/06 18:08
04/17/06 18:08
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
WOW dude... If you would give out your pathfinding dll for free!, with documentation!, you'd be the coolest dude in this forum. Thats an amazing pathfinding plugin. PLEASE post it man. More than half of the people that use 3dgs need that. I believe in posting things for free, such as I do with everything i make. Like Kotakide sayed, "We can't wait..."


xXxGuitar511
- Programmer
Re: Intense Ai: Free Pathfinding [Re: xXxGuitar511] #70695
04/17/06 23:54
04/17/06 23:54
Joined: Sep 2005
Posts: 357
Florida
Hellcrypt Offline
Senior Member
Hellcrypt  Offline
Senior Member

Joined: Sep 2005
Posts: 357
Florida
Ella malaka, Grigora


I do not solve problems.... I prevent them.
Re: Intense Ai: Free Pathfinding [Re: xXxGuitar511] #70696
04/18/06 00:31
04/18/06 00:31
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 everybody,

Today was a busy day for me so I haven't even started on the documentation, but I did promised to publish this today, so here it is.

Intense Pathfinding - 2.6MB

Post all your questions here so I'll know what to include in the documentation. I'll start on it first thing tomorrow morning..

In the meantime, I have a question myself to all Standard and Extra users. Do you see a red line which draws the Path that the Npc takes, like there is one in my screenshots above, when you run it from WED?

And here's some quick info on the controls:


I J K L: Moves the camera around.
Right Mouse button Pressed: Rotates the camera
Left Click Anywhere: Orders the Npc to walk there
Enter: Switches through the 3 Debug modes
ESC: Exits


Running the Graph Maker bat file lets you re-create and examine the Graph


Thanks to DexSoft for their theme park models


Aris

Re: Intense Ai: Free Pathfinding [Re: LarryLaffer] #70697
04/18/06 01:52
04/18/06 01:52
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
DUDE!!!! THANK YOU!!!!!!!!!!!

Going to go test it out right now.................

THANKZ DUDE...................... SERIOUSLY..................


xXxGuitar511
- Programmer
Re: Intense Ai: Free Pathfinding [Re: xXxGuitar511] #70698
04/18/06 02:44
04/18/06 02:44
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
It seems to be quite indestuctible. The only hiccup was when the player got stuck under the stairs. 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.

Anyway, congratulations...this is perfect for a point & click game..adventure or otherwise.


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: LarryLaffer] #70699
04/18/06 02:57
04/18/06 02:57
Joined: May 2005
Posts: 138
jamrud khatulistiwa
Kotakide Offline
Member
Kotakide  Offline
Member

Joined: May 2005
Posts: 138
jamrud khatulistiwa
Finally, You're awake
your contribution is very nice and very useful for me, and the red line when I click the ground is remind me to Command And Conquer game, yeah it's good...
but I have a little complain about these...

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?

http://i56.photobucket.com/albums/g182/obinkmalmsteen/Clip_3.jpg

he's not takes the shorter way!

the rest is nice and very good contribution.

Page 4 of 11 1 2 3 4 5 6 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