The Daily Click ::. Forums ::. Klik Coding Help ::. Help with pathfinding on TGF
 

Post Reply  Post Oekaki 
 

Posted By Message

Callum



Registered
  06/06/2003
Points
  10
26th January, 2005 at 15:58:26 -

I like to make game on TGF, but one thing that has bothered me for many years is the fact that I can't seem to get pathfinding to work. I've tried everything but I can't seem to get it right. Im not too bothered if its not perfect, its just that I want my games to have enemies that don't walk into walls and bounce off them like idiots. Im hopeless with any programming so please don't shower me with stuff ive never heard of.

Thanks!

 
Image

pickleman22



Registered
  06/12/2004
Points
  154
26th January, 2005 at 16:04:36 -

pathfinding? you mean path movement? or do you mean when an AI dude walks int something he turns and goes past it?

 
Ze Pickle's projects:
Not working on any right now. Aw, man.

Callum



Registered
  06/06/2003
Points
  10
26th January, 2005 at 16:06:28 -

I mean that if the player is behind a wall (obstacle) the ememy will not walk into the wall, he will go around it.

 
Image

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
26th January, 2005 at 16:23:49 -

It's bloody hard to do in MMF. Have a look for some articles here or at the CT site, and I think there's a pathfinding extension--never used it though.

 
n/a

Callum



Registered
  06/06/2003
Points
  10
26th January, 2005 at 16:43:22 -

From what I have seen now ive searched, its impossible to to pathfinding in TGF. How do you make it so the enemy follows you and somehow finds its way around obstacles?

 
Image

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
26th January, 2005 at 16:59:30 -

It's certainly possible, just real hard, and kinda depends on the specifics of your game. I half-finished an example once that used invisible node objects scattered over the playfield. It determined which node the player was closest to, then which the enemy was closest to, then moved the enemy to the next node along that path. Within a certain distance from the player, the enemy goes into normal seek and destroy ball movement. I'm sure there's plenty of other ways to do it, all equally cumbersome.

 
n/a

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
26th January, 2005 at 17:08:26 -

A* (pathfinding system) is technically possible in TGF but it's a bastard to get working, so I wouldn't waste my time with it

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
26th January, 2005 at 17:26:44 -

You can kind of fake pathfinding pretty well in both MMF and TGF easily. All you really need is two detector actives, one sticking out left and one right, both 45 degrees, from each object. If the left detector hits an obstacle steer the object right, and vice versa. Of course this method is not going to work out the shortest/best method to get anywhere, but it certainly looks more intelligent than slamming your face in to a wall repeatedly.
In TGF this method is more limiting because each object now requires an additional 2 objects, so you'll hit that 256 object limit faster.

 
- Tigerworks

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
26th January, 2005 at 23:31:44 -

Funny, I've just been reading about A* pathfinding. I really wish I could find a good article written in click.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

pickleman22



Registered
  06/12/2004
Points
  154
27th January, 2005 at 06:42:33 -

Yeah, it's possible, i've seen it. like Radix said though it's bloody hard.

 
Ze Pickle's projects:
Not working on any right now. Aw, man.

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
27th January, 2005 at 14:39:51 -

If:
a) it can be done in MMF
b) doing it in TGF is ridiculously complicated
c) the need for pathfinding occurs in games that tend to have lots of objects

then you'd be lucky to find someone that uses TGF, has a need for it, and is capable of working round the limits to do so.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click