The Daily Click ::. Forums ::. Klik Coding Help ::. Path Finding?
 

Post Reply  Post Oekaki 
 

Posted By Message

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
4th March, 2006 at 22:10:01 -

Hey, for no in particular reason, I just thought about 1 of the many things I have no idea how to do in MMF, and that is... path finding. The kind you find in various RTS games. Well I decided to give a crack at it, and just as I suspected, I cant do it without making the NCP's first run into the wall, then walk around it. Thus I decided I would come out and ask this simple question. How can you do advanced path finding, where as soon as you tell the NCP a spot to reach, he will then calculate a path that will allow him to take the shortest route, without running into anything? A threw around a few idea's, such as the method that most games tend to use, and that’s path nodes (I got this idea from working with UnrealEd), where the bot has a map of the entire level, through path nodes that link to one another, but then I figured... in a game such as a RTS, your going to want your bots to go to places that are far less restricting, and lets face it... it would take way to long to make sure that there were hundreds of nodes in every crack of the level, just so the bot could be as close as he can to where the player told him to go. So that’s where I'm left wondering, is there a way to set it up so that when you select a spot for a bot to go, MMF will then have a path formed between this spot & the bot, for the bot to fallow, while avoiding all obstacles?
Example:
Image

 
http://www.facebook.com/truediamondgame

Matt Boothman

The Nissan Micra of forum members

Registered
  20/09/2002
Points
  109

Game of the Week Winner
4th March, 2006 at 22:16:35 -

Short answer: No.
Long answer: Noooo.

 
http://soundcloud.com/normbo - Listen to my music.

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
4th March, 2006 at 22:18:53 -

You might want to look into Radix's article about random dungeons, perhaps you could adapt something from that to get what you want. Or you can try and ask Tigs.

 
Craps, I'm an old man!

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
4th March, 2006 at 22:20:32 -

I really have no idea. Pathfind object maybe?

 
n/a

DanielRehn



Registered
  18/09/2002
Points
  139
4th March, 2006 at 22:46:38 -

Yes, the pathfinding object is the key here (Grid object / Advanced pathmovement may also work)...
1. Setup a map by defining size (in squares) and what weight every square should have.
2. Find path
3. Move along path! (If you're using multiple objects which follow different paths, save the found path in an array instead of using multiple Pathfinding objects)

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
4th March, 2006 at 22:54:59 -

I'm trying to get the Path Finding object to work, I'm going to look around for example examples, but in the mean time, could you guys throw me some links to examples? Thanks.

 
http://www.facebook.com/truediamondgame

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
5th March, 2006 at 02:17:26 -

Brandon, Although I can't help you with this, I give you props for the creative use of Christmas cookies! Kudos!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
5th March, 2006 at 02:24:49 -

After checking out all the sources I could find, I found that all of them are based off of grid movement. Is there any way in MMF to do this without grid movement?

 
http://www.facebook.com/truediamondgame

DanielRehn



Registered
  18/09/2002
Points
  139
5th March, 2006 at 11:37:59 -

Advanced Path Movement... But it's sort of like the same here.. you make nodes which the object moves between..

 
n/a

DanielRehn



Registered
  18/09/2002
Points
  139
5th March, 2006 at 12:02:44 -

Advanced Path Movement... But it's sort of like the same here.. you make nodes which the object moves between..

 
n/a

DanielRehn



Registered
  18/09/2002
Points
  139
5th March, 2006 at 12:02:59 -

Argh...

 
n/a

Tiles

Possibly Insane

Registered
  06/12/2002
Points
  2339

GOTM 3TH PLACE WINNER - JANUARY 2010
5th March, 2006 at 14:34:17 -

What about this: sensors, a target, and always look at target when sensors donīt overlap an obstacle. When sensors overlap obstacle --> rotate. No path calculated. Just walking around obstacles that are between the target and the sprite.

Needs tow sensor objects and direction calculator. Four lines for that:

left sensor is overlapping obstacle
+right sensor is not overlapping obstacle
---> rotate towards itself -1

right sensor is overlapping obstacle
+left sensor is not overlapping obstacle
---> rotate towards itself +1

left sensor is overlapping obstacle
+right sensor is overlapping obstacle
---> rotate towards itself -16

left sensor is not overlapping obstacle
+right sensor is not overlapping obstacle
---> rotate towards 0/0 of target

I found this example in the file archive eons ago. But i canīt remember the name of the thread ...



Image Edited by the Author.

Image Edited by the Author.

 
Free graphics,Free Games
http://www.reinerstilesets.de

en kerro



Registered
  21/10/2004
Points
  578
7th March, 2006 at 09:18:47 -

This was in one big tutorial archive...

Pacman path finding.
Click somewhere in level to put there a goal...

Edited by en kerro

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%
   

Post Reply



 



Advertisement

Worth A Click