Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / A* Pathfinding

Author
Message
Agent
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 30th Nov 2004 09:36
Hey all.

Tried to get a solution for this problem for the last couple of months now, but the thread is attracting comments only (which don't help).

I need an A* Pathfinding algorithm within a two dimensional grid; preferably one that calculates the entire path in one routine call but doesn't return the entire path - only the next direction in which to go.

Now I've tried to have a go at such a routine but I just can't fathom it. I understand the concept and theory behind it, but I can't get the code to reality.

Does anyone have a functional 2D A* Pathfinding routine they would be happy to share? Full credit in my programs to anyone who can provide working code.
Tapewormz
23
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 30th Nov 2004 12:12
You have to return the whole path...then just move into that one grid and start the routine again.

Elthan
22
Years of Service
User Offline
Joined: 29th Jul 2003
Location: Spain
Posted: 30th Nov 2004 15:43
http://forum.thegamecreators.com/?m=forum_view&t=42787&b=6

Easy pathfinding but no A*.
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 1st Dec 2004 15:56
A couple of months of trying and you still didn't think to search the codebase?

IanM has two routines in the codebase for a* pathfinding. I will save you the trouble of searching ... just click here

Agent
21
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 1st Dec 2004 17:25
Oh. Heh.

No, the codebase never occurred to me. I'm not used to having a resource like that around; I've never needed it before

Ta.

Login to post a reply

Server time is: 2026-06-11 14:48:48
Your offset time is: 2026-06-11 14:48:48