Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Pathfinding; need help of people who've done it with u3d
Topic Started: Sep 2 2010, 01:37 AM (369 Views)
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
EDIT: Solved, sorta...

okay well i am doing pathfinding with u3d based on this example: http://host-a.net/Mark13673/Other_MP_Grid_Example.gmk

except when i tried porting it to my game it doesn't work. Could someone make a quick demo of how to use it?

Note: For object block, in the create event put this: Step() y-=y and DON'T put anything in the Step event. Also, the enemy speed must be 1 or greater.

Still can't get it to work. It only follows me when I am outside of the maze.

And I'm not going to use MysteriXYZ's Tangram engine...way too much work just to create the world...with this you just place blocks in gm's native editor. Besides he hasn't been around the forum's in a while, where is he anyway? :think:
Edited by Eansis, Sep 2 2010, 03:07 AM.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
Cofee Machines Rock
[ *  *  *  *  *  * ]
Not gonna work so well.
Node GRAPHS! it's the only efficeint way!
I cannot stress this at a higher level. it worked for every game since 1996....
it was used in HL2 it's used in the U, U2 & U3 engines
Posted Image

For your perception no.
But my universe has no such limits.


www.recall.co.nr
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
luenardi
Sep 2 2010, 07:47 AM
Not gonna work so well.
Node GRAPHS! it's the only efficeint way!
I cannot stress this at a higher level. it worked for every game since 1996....
it was used in HL2 it's used in the U, U2 & U3 engines
Not only just commercial games

Posted Image
Blog|EHS
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
luenardi
Sep 2 2010, 07:47 AM
Not gonna work so well.
Node GRAPHS! it's the only efficeint way!
I cannot stress this at a higher level. it worked for every game since 1996....
it was used in HL2 it's used in the U, U2 & U3 engines
What are node graphs? Do you place nodes on the map? Could you share the code? Have you used it any of your games?
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
Cofee Machines Rock
[ *  *  *  *  *  * ]
You'll laugh how easy it is..
You create alot of nodes in key area's.. maping out the paths.
Then you connect them with a simple visibility & distance test..
Then you just get the nearest node to the enemy and nearest node to player.

{
Then you just cycle thru connected nodes till you get the shortest distace from node A to node B..
and make the enemy follow that node and repeat when node B is reached.
}

Me and reikyyr are busy sorting somthing like this out.. but i'm realy too lazy to write simple code like this.


:mysteryXYZ
His pentagram path find engine is .. slow... no offence ment buddy.. where ever you are.
Edited by luenardi, Sep 3 2010, 05:30 PM.
Posted Image

For your perception no.
But my universe has no such limits.


www.recall.co.nr
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
@ luenardi
Your approach is based upon depth first search and is basically brute-force. It is not efficient. To get a good performance you should use optimizations based upon heuristics. In simple words this means that you iterate through the "most promising" nodes first. The most common heuristic is the distance along the beeline. The most common algorithm that makes use of a heuristic for improved average case performance during path finding is A*. Implementing it in Game Maker would be tough, but possible.
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
Cofee Machines Rock
[ *  *  *  *  *  * ]
"The most common heuristic is the distance along the beeline"


That basicaly what i'm upto.. ^_^
Posted Image

For your perception no.
But my universe has no such limits.


www.recall.co.nr
Offline Profile Quote Post Goto Top
 
« Previous Topic · Off-topic · Next Topic »
Add Reply