Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411654 Posts in 69395 Topics- by 58451 Members - Latest Member: Monkey Nuts

May 15, 2024, 12:13:58 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Making good enemy AI in MMF2
Pages: [1]
Print
Author Topic: Making good enemy AI in MMF2  (Read 2662 times)
Demon Lizardman
Level 3
***


View Profile
« on: August 06, 2010, 12:25:36 PM »

I've recently started a game which involves platforming and such. One of those enemies is oddly enough, a goomba. But I want the goomba to also hop at the edge of ledges and have gravity and turn around at walls. I really suck at enemy AI in MMF2, I understand lots of you guys here have made pretty amazing games, so I need some help.
Logged

___
Vice President of Marketing, Romeo Pie Software
Level 10
*


View Profile
« Reply #1 on: August 09, 2010, 06:03:35 PM »

You want it to jump up small ledges, and turn around when it hits a wall.  Both of these things are fairly easy by having it check where walls are near it.

In MMF, you can accomplish this by setting the object's position to where you want to check the collision, then check to see if "goomba is overlapping a wall" (or whatever).  If it is colliding, you can set a flag to on to keep track of it.  Then move the object back to its original position.  Then using the flag you can run some code on the goomba to make it turn around or jump.
Logged
MrGando
Level 0
***



View Profile WWW
« Reply #2 on: August 14, 2010, 11:04:13 PM »

What's MMF2? ( sorry for my ignorance, tried google and failed )
Logged

Lead Programmer
Gando Games
Twitter
nikki
Level 10
*****


View Profile
« Reply #3 on: August 15, 2010, 03:08:05 AM »

Quote
What's MMF2?
http://lmgtfy.com/?q=MMF2

and/or try the demo



« Last Edit: August 15, 2010, 03:11:12 AM by nikki » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic