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.

Program Announcements / IanM's A* library [DBC]

Author
Message
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 14th Jun 2004 18:24 Edited at: 14th Jun 2004 23:56
I succesfully converted IanM's A* library from DBP to DBC (Dang types!)

Have fun with it!
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 14th Jun 2004 19:03
Quote: "use integers (1.0,2.0,etc.)"


1.0, 2.0 is a float - But I know what you mean.

BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games. - Plus URL download, win dialogs.
Over 140 new commands
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 14th Jun 2004 19:47 Edited at: 14th Jun 2004 23:56
whoops, thanks Rob, i just used # instead of whatever as integer. thanks
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Jun 2004 20:45
Nice one matt

You should be able to remove all the # signs though - the original code was totally integer based.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 14th Jun 2004 20:49 Edited at: 14th Jun 2004 20:50
Mattman's back...

I was wondering, I downloaded Ian's A* library but I didn't quite get the hang on it - can you explain the controls (pathetic I know, but hey )?

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Jun 2004 22:18
It's fairly simple

- Use the CreateSearchPath function to set the maps size
- Use the CreateSearchPathLists function to set a number of paths to store
- Use a series of SetSearchPath calls to set up areas of the map as unpassable

Everything is set up and ready to use at this point.

Then you can just call the SearchMap* function of your choice, specifying the start and end points on the grid, and a path number to store the path under.

You can also use the SetSearchRestrictDiagonals and SetSearchMaximumCost functions to set specific limits on the paths found.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 14th Jun 2004 23:22
Thanks, I'll have a look at it in due course

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 14th Jun 2004 23:28 Edited at: 14th Jun 2004 23:58
Ya, in DBC go to edit, replace, then put # in the first box then nothing in the second one and it should work!

I was having some trouble using it though, all path data (path length, and the x and y coordinates of all the spaces) end up being -1 Any possible ideas why? I set up the map, creates a path, then ran a search with path number 1.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Jun 2004 16:04
Is this what you wanted to chat about last night? In that case, I'd better reinstall DBC ready for when the little blue alert box pops up tonight then

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 16th Jun 2004 16:09
Thanks ya, i let you sleep though, we can talk later today

"Could you do something where you don't need a video card cause i don't have one" - Program Expert
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 17th Jun 2004 06:03
Pardon me for posting like an idiot, but I never looked at IanM's A* library since it was for Pro and I use Classic. After looking at a few commands, and remembering old articles on A* AI routines, is this a set of commands for setting up AI?

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 17th Jun 2004 06:08
yes indeed, A* is a popular method of AI pathfinding

"Could you do something where you don't need a video card cause i don't have one" - Program Expert
Astar
19
Years of Service
User Offline
Joined: 8th Jul 2004
Location:
Posted: 1st Aug 2004 10:12
I still didnot get it running in my game...

Who can give some demo code in DBc to demonstrate how the A* works?
The function things are not straightforward for new comes

Other words, who can use these functions to run the A* pathfinding?

just need a executable code!

Many thanks!

Login to post a reply

Server time is: 2024-05-19 15:13:21
Your offset time is: 2024-05-19 15:13:21