Message Board


Message Board > Fenix / Bennu / Gemix / DIV > pathfind

April 7, 2006, 16:26
pluim
Beardless
1 posts
We were starting with a pacman game but we have a problem.
We don't know how to let the ghosts follow pacman. Do you know the commands for patfinding and how to use them?

We are quite young, Dutch, and just started with Fenix, please keep it simple!

[Edited on April 7, 2006 by pluim]
____________
#
April 7, 2006, 16:43
Fiona
games are terrible
-9616558 posts

Fenix does not have any in-built pathfinding unfortunatly.

Welcome to Boolean Soup. :)
____________
laffo
#
April 7, 2006, 17:10
Woody
HEAD BLACK MAN
722 posts

Quoting Ferret:
Fenix does not have any in-built pathfinding unfortunatly.

Yes it does.
____________
boredome is the bitter fruit of too much routine
#
April 7, 2006, 17:24
Fiona
games are terrible
-9616558 posts

Well when did that pop-up?
____________
laffo
#
April 7, 2006, 17:25
Eckolin
Quite Whiskered
388 posts

The Pathfinding is used in the Fenix demo.

[Edited on April 7, 2006 by Eckolin]
____________
Maker of Games...
Wisdom is supreme; therefore get wisdom.
Need help with coding? I probably wrote something similar.
#
April 7, 2006, 17:29
Fiona
games are terrible
-9616558 posts

:FFFFFFFFF
____________
laffo
#
April 7, 2006, 17:30
PEader
お前はもう死んでいる
1486 posts

Ferret was just testing you all.
____________
I see 57,005 people.
#
April 8, 2006, 20:41
MadMax
None
18 posts
I have the feeling Pacman didn't use pathfinding.
____________
#
April 8, 2006, 21:13
Fiona
games are terrible
-9616558 posts

I'm pretty sure it does follow the player in some shape or form. When you get a power pill the ghosts start running away too.
____________
laffo
#
April 9, 2006, 16:06
Rhovanion
Exterminated
666 posts
I once made pacman... it's off div-arena because div-arena is deleted by God. At each crosspoint in the level I calculated the distance from that ghost to pacman. If the X distance was negative, pacman was left of the ghost. If the Y distance was negative, pacman was above the ghost. Then I just used some random statement for the ghost to go in the direction of pacman or another random direction. The higher the odds the more "intelligent" the ghosts were. If the direction was not possible I used the next anti-clockwise direction posible. For the power pills I reversed the statement.
I'm sure there are more efficient ways for programming AI (like 2 ghosts working together to close-in pacman) which was not possible with my system...

commands I used:

get_distx(pacman_id);
get_disty(paxman_id);
rand();

[Edited on April 9, 2006 by Rhovanion]
____________
#
April 9, 2006, 17:15
Deadmaster
Where is Johnny?
458 posts
Quote:
it's off div-arena because div-arena is deleted by God.


LOL. :lol:
____________
My site still needs updating and redesigning. My last.fm page.

GO TO TEXTUAL ANARCHY II YOU FISHDOG YOU
#
April 9, 2006, 19:04
Frimkron
Frustrated Megalomaniac
703 posts

Yeah Rhovanion I doubt Pacman uses anything more elaborate than what you have there, considering the limitations of the technology when it was written.
____________
#
April 9, 2006, 21:07
Rincewind
programmer
1545 posts

The starters of this thread are 2 very young people which I've been teaching a bit of Fenix at school. :) I have never used the built-in Fenix pathfinding myself nor understood immediatly from the command docs, so I sent them to Booleansoup hoping any of you could show them a small example. Hence my cited edit on the last line of their message :P . At this very point I'm their only resource and their project kind of seems to stand or fall with my participation so sending them to Booleansoup might make them a bit less dependent.

Their game does not make use of tiles and the pacman/ghosts are allowed 360 degrees free movement in the paths, so some fenix pathfinding is actually required to overcome the obstacles. My thanks goes out to anyone who knows how it works and can explain it to them!
____________
Personal website: http://www.loijson.com
#
April 10, 2006, 10:07
PEader
お前はもう死んでいる
1486 posts

Quoting Frimkron:
Yeah Rhovanion I doubt Pacman uses anything more elaborate than what you have there, considering the limitations of the technology when it was written.

So you've never played PACMAN then? Each ghost does a differnt thing and they use path finding to find the shortest distance to the player. It's pretty elaborate.

The wikipeadia article on PACman is pretty elaborate, I suggest you read it.

[Edited on April 10, 2006 by PEader]
____________
I see 57,005 people.
#
April 10, 2006, 10:13
PEader
お前はもう死んでいる
1486 posts

Quoting pluim:
We were starting with a pacman game but we have a problem.
We don't know how to let the ghosts follow pacman. Do you know the commands for patfinding and how to use them?

We are quite young, Dutch, and just started with Fenix, please keep it simple!

You're going to need to ask a more precise question then that.
____________
I see 57,005 people.
#
April 10, 2006, 12:07
Moogle
Enterprise Edition
239 posts

As someone above said, check out the example code that came with Fenix, check the documentation, Google around for a bit and you should be fine. No?
____________
I am Moogle and I approve this message.

Quoting (. )( .) in the Bugs topic:
Everytime I login the threads with new posts are by Dennis.
#
April 10, 2006, 20:20
Frimkron
Frustrated Megalomaniac
703 posts

Quoting Peter:
So you've never played PACMAN then? Each ghost does a differnt thing and they use path finding to find the shortest distance to the player. It's pretty elaborate.

The wikipeadia article on PACman is pretty elaborate, I suggest you read it.
I have now read it and nowhere can I find where it says the pathfinding is "elaborate" or that the ghosts behave in different ways. Just that they have nicknames and that their navigation algorithm is deterministic.

The point I was trying to make was that I don't think (correct me if I'm wrong) that the original pacman ghosts use A*.
____________
#
April 10, 2006, 21:09
PEader
お前はもう死んでいる
1486 posts

Quoting Frimkron:
Quoting Peter:
So you've never played PACMAN then? Each ghost does a differnt thing and they use path finding to find the shortest distance to the player. It's pretty elaborate.

The wikipeadia article on PACman is pretty elaborate, I suggest you read it.
I have now read it and nowhere can I find where it says the pathfinding is "elaborate" or that the ghosts behave in different ways. Just that they have nicknames and that their navigation algorithm is deterministic.

The point I was trying to make was that I don't think (correct me if I'm wrong) that the original pacman ghosts use A*.

My point is that they do use a pathfinding algorrithm I'm not sure which one but the ghosts have more intelligence then you give them credit for. One of them chases you, another one tries to ambush you, another is juts dumb and I don't know what the other one does. it sneaks after you or something.

Anyway without some sort of "elaborate" pathfinding the intercept ghost can't predicate where you will be, init.


Oh yeah, I just linked to the pac-man page because it was informative.

[Edited on April 10, 2006 by PEader]
____________
I see 57,005 people.
#
April 10, 2006, 22:25
Moogle
Enterprise Edition
239 posts

Quoting the internet:
To give the game some tension, some clever AI was programmed into the game. The ghosts would group up, attack the player, then disperse. Each ghost had its own AI. Blinky chases Pacman, Pinky is positioned a few dots in front of Pacman's mouth. The others move randomly.

____________
I am Moogle and I approve this message.

Quoting (. )( .) in the Bugs topic:
Everytime I login the threads with new posts are by Dennis.
#
April 10, 2006, 23:56
Rhovanion
Exterminated
666 posts
Can someone run a query on the forum database and look for posts concerning A* pathfinding, please? I'm utmost interested, and I can't find decent links with "google" because I suck :(
____________
#
April 11, 2006, 01:48
Moogle
Enterprise Edition
239 posts

A* for Beginners (gamedev.net)
Beginners Guide to Pathfinding Algorithms (ai-depot.com)
A* algorithm tutorial (J Heyes Jones)
A* search algorithm (wikipedia.org)

Knock yourself out!
____________
I am Moogle and I approve this message.

Quoting (. )( .) in the Bugs topic:
Everytime I login the threads with new posts are by Dennis.
#
April 11, 2006, 12:30
PEader
お前はもう死んでいる
1486 posts

Quoting Moogle:
A* for Beginners (gamedev.net)
Beginners Guide to Pathfinding Algorithms (ai-depot.com)
A* algorithm tutorial (J Heyes Jones)
A* search algorithm (wikipedia.org)

Knock yourself out!

Such a nice guy.
____________
I see 57,005 people.
#
April 15, 2006, 00:57
Sandman
F3n!x0r
1194 posts

WPF.dll (http://sandman.xdcccatcher.com/Fenix/WPFv1.07.zip) is perfect for this type of game. It gains more advantage over other methods, when more paths to the same point (your pacman) are required. It is quite easy to use, but maybe some things in it are pushing it a bit (pointers, words, arrays). If you are somewhat familiar with these you will have no problem (otherwise just take a good look at the examples).
____________
BennuWiki
Yes, my avatar has grey borders in IE (so get a decent browser)
ROOFLEZ ROOFLEZ
#
April 15, 2006, 15:42
Rhovanion
Exterminated
666 posts
Quoting Moogle:
A* for Beginners (gamedev.net)
Beginners Guide to Pathfinding Algorithms (ai-depot.com)
A* algorithm tutorial (J Heyes Jones)
A* search algorithm (wikipedia.org)

Knock yourself out!
:praise:

I would give you reputation points but that was on an other forum :P
____________
#

Message Board > Fenix / Bennu / Gemix / DIV > pathfind

Quick reply


You must log in or register to post.
Copyright © 2005 Booleansoup.com
Questions? Comments? Bug reports? Contact us!