The Daily Click ::. Forums ::. Klik Coding Help ::. Creating AI
 

Post Reply  Post Oekaki 
 

Posted By Message

Pontus Lundin



Registered
  31/05/2006
Points
  18
12th April, 2007 at 15:16:41 -

Hello.
I am trying to create AI in my game that I am making with "The games factory V. 1.06" program.
I want monsters to follow the player. When the monster collide with the player, the player takes damage and loses health. When the monsters walks into backdrops or active objects that are not ment to pass trhough, the monsters should only bounce, or rahter looking like they are doing the moonwalk (like in real pro games you know) And when they are boucning into each other they shall not combine with eachother either. It would be prefered if I could learn how to build a pathfinding system, but not so much needed.

I hope someone could help me out, without this problem being solved I'm stuck in my work and cannot go any further.
I would be happy if someone could create a simple example gam file but a simple explanation is okay.

I have tried alot and I cannot get the Boucning of backdrop to work. they keep walking passed the backdrops from time to time and I cannot figure out how to correct this error, PLEASE help!

Thanks in advance, hope to get helped soon.

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
12th April, 2007 at 15:47:19 -

Enemy collides with background
-Bounce
Did you set the backgrounds to Obstacle - Yes
Simple AI tutorial i found on my computer (topdown): www.solcon.nl/s.tennapel/aiandpathfinding.zip

Image Edited by the Author.

 
Oh sweet mary.

Bo Fu



Registered
  02/04/2004
Points
  413

VIP Member
12th April, 2007 at 22:51:31 -

In addition, to stop the enemies from overlapping one another:

Enemy collides with Enemy
-Enemy: Bounce

 
If wishes were fishes then we'd all smell like ladies' underwear.

Pontus Lundin



Registered
  31/05/2006
Points
  18
13th April, 2007 at 09:08:26 -

The thing I downloaded failed to work. something called "gffloop.gox" is missing!
And I have tried the bounce thing. Unfortunate the enemy tends to pass through the obsticals sometimes and even themselfs sometimes despite that boucing. Dunno what to do.


Image Edited by the Author.

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
13th April, 2007 at 10:19:43 -

Download Fastloop foor TGF.

 
Old member (~2004-2007).

Aptennap



Registered
  23/04/2004
Points
  916
13th April, 2007 at 11:38:02 -

What are the events of the enemies?
Fastloop : http://files.cellosoft.com/extensions/FastLoop16.zip

Image Edited by the Author.

 
Oh sweet mary.

Pontus Lundin



Registered
  31/05/2006
Points
  18
14th April, 2007 at 01:57:01 -

The Idea.
The idea is to make monsters follow you around the frame.
preferbly that they can look the player up. I dont know how to do so, so I havent done much about the AI so far.

I have set so that:
ALWAYS monster (that is a ball moving object) is looking at hero.
When collliding with backdrop, bounce.
When colliding with active object "Wall", bounce

That is pretty much what I have done really.

BTW When I tried to open that pathfinding thing they program complained that it is missing more files. This time it was "gfdirect.gox". any webpage where I can find these files. Might be more files that I need.

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
14th April, 2007 at 03:09:20 -

That's Direction Calculator : http://www.clickteam.info/extensions/extview.php?id=185

No wonder, the enemy is going through the wall, he always faces the player so when he bounces he will just face the player again and go through the wall. You would have to make that when the enemy faces a wall he must find a way around it...

The tutorial I gave you is just waht you need it will find the player and then begin to shoot it (but you can change that part in anything you like, ofcourse). One qeustion : why do you have an active object 'wall'?

Image Edited by the Author.

 
Oh sweet mary.

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
14th April, 2007 at 07:04:05 -

I have set so that:
ALWAYS monster (that is a ball moving object) is looking at hero.
When collliding with backdrop, bounce.
When colliding with active object "Wall", bounce



Careful, I did this a lot back in the day and what you'll get is the famous Michael J. Fox movement for your foes. They'll continuously bounce and stutter haplessly into the walls and you may not want that.

I used the equally famous but much better "Last Known Location Pursuit Method" for Lab Rat #37 and it is a really cool way to get enemies to follow your hero around. The article is at or near the top of the best articles on TDC, you should take a look.

P.S: Sorry Michael J. Fox, but it's what I could come up with upon short notice.


 
--

"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!

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
14th April, 2007 at 07:07:17 -

Oh, and Aptennap it's possible that he has an active object for a wall because he plans on doing something cool with it in game. For example, Hasslevania's main walls are obstacled backdrops but there are also active objects in there for secret walls you can break and etc.

 
--

"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!

Pontus Lundin



Registered
  31/05/2006
Points
  18
14th April, 2007 at 14:14:42 -

Thank you all so much. This gave me a much better view upon how to solve things. I hate to ask, but the example could be easier to understand if there was some info to read how it really works.




Image Edited by the Author.

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
14th April, 2007 at 15:33:45 -

Well i didn't make the example i just found it on my pc, i have a lot tgf tutorials and examples on my pc (72meg).

 
Oh sweet mary.

Pontus Lundin



Registered
  31/05/2006
Points
  18
14th April, 2007 at 15:42:38 -

Oh okay. Well Im gonna get how these things works eventualy
Would be faster if there were mre info. Again thanks it's enough to be able to continue

What more example games do you have?
I have been playing with KnP and TGF a very long while in my life, but it isnt until now (since I found communities) that I have begun to expand my knowledge. Feel like a total newbie

 
n/a

Aptennap



Registered
  23/04/2004
Points
  916
15th April, 2007 at 01:09:22 -

Platform, mario, radar, paralex, zelda scroller, 32 dir shooting, 360 dir shooting and some other stuff...

 
Oh sweet mary.

Pontus Lundin



Registered
  31/05/2006
Points
  18
15th April, 2007 at 04:34:11 -

Could you upload some or is there a place you know where I can get these examplefiles?

 
n/a
   

Post Reply



 



Advertisement

Worth A Click