User Tag List

Results 1 to 9 of 9

Thread: AI Enemy movement.

  1. #1
    No Products Registered

    Join Date
    Feb 2008
    Location
    Weston-super-mare
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AI Enemy movement.

    I now feel like a right twit having used clickteam products for 4 years and not know all the advanced stuff.

    Well i guess i do but just don't know what to do with it.

    To see some of th creatures on my game move by there self would look pretty cool.

    So if anyone knows the basics of AI on MMF2, then i'm all ears.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Jun 2006
    Location
    UK
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI Enemy movement.

    Why make another post about this, people have given you what you need from the previous post you made.

    You simply have to look at it, learn from it, and understand what it's doing. What they told you works and works well.

    No one is going to make the entire thing for you. Thers nothing wrong in not knowing things, but you really need to read at what people are telling you, and look at the examples they give you. If you can't run the examples because you don't have the extension, use Neatwares extension list to find it (link on the right side of the page).

  3. #3
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI Enemy movement.

    The first step to learning things is to get a humble mind.

    My advice is to look through the files archive (also the old one for MMF 1.5) and look at some AI / platform stuff people made. You might also find some nice articles at the daily click.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI Enemy movement.

    Basics of AI? Values. That's what AI is based on.

  5. #5
    No Products Registered

    Join Date
    Feb 2008
    Location
    Weston-super-mare
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI Enemy movement.

    Quote Originally Posted by Spike
    Why make another post about this, people have given you what you need from the previous post you made.

    You simply have to look at it, learn from it, and understand what it's doing. What they told you works and works well.

    No one is going to make the entire thing for you. Thers nothing wrong in not knowing things, but you really need to read at what people are telling you, and look at the examples they give you. If you can't run the examples because you don't have the extension, use Neatwares extension list to find it (link on the right side of the page).
    I don't want people to do it for me, the reason why i made another post is because the other one disspeared.

    And random is the best person who i can think can help me.

    So far (Because of his help) the enemys are moving and jumping, which is fantastic, but of course i'm still stuck with just having one for it to go smoothly.

    I understand all the basics now, but to know more would make my games more fun.

    Without random i would still be stuck, but all i need to know now is how to have more than enemys without having the whole AI thing screw up.

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI Enemy movement.

    Well you saw the example. What else do you need to know about AI?
    If it shall be very advanced, you will sooner or later need a pathfinding extension. Although in your case that might be too much right now.

    As mentioned in the example thread, the platform movement is bugged right now, so you should avoid using it, and write your own gravity code. This is a bit annoying, as it introduces more problems. So I recommend using the advanced platform object (or so) to handle the collisions.

    If you want enemies that can do different things, you'd use a finite state machine. This is commonly the basis of most AIs, as Tiles or someone already mentioned.
    In MMF you'd do it roughly like this:
    You use an alterable value (I prefer alterable strings, for readability). E.g. you'd take one and call it "State". Default could be "Idle".
    Now lets say the enemy can also be "Snooping around", "Charging", "Attacking" and "Fleeing". You would now specify "transitions" between the different states, depending on the current state and various conditions. Example:

    "Idle":
    +random(100)=0
    >state="Snooping around"

    "Snooping around":
    +random(100)=0
    >state="Idle"

    "Idle" or "Snooping around":
    +player at the height of the enemy
    +no obstacle in between
    +player further away than 50 pixel
    >state="Charging"

    "Charging":
    +reached player
    >state="Attacking"

    "Attacking" or "Charging":
    +player disappeared
    >state="Snooping around" or "Idle"

    "Idle" or "Snooping around" or "Charging":
    +player right in front
    >state="Attacking"

    "Idle" or "Snooping around" or "Attacking":
    +health < 30%
    >state="Fleeing"

    "Fleeing":
    +player disappeared
    >state="Idle"

    You get the picture. You could draw this out nicely like on the wikipedia article.
    Now each state can be used to make the enemy behave different.
    E.g. in "Idle" he'd just stand there, in "Snooping around" he'd walk left or right, in "Charging" he'd run at the player, in "Attacking" he'd bash around and in "Fleeing" he'd run away from the player.

    Of course more complex AIs might have multiple states or substates. Things like health or ammo can also be considered a state, but I prefer to treat them just a condition for transitions.

    Hm. I think I might write a tutorial about this. I bet more people could benefit from some AI knowledge

  7. #7
    No Products Registered

    Join Date
    Feb 2008
    Location
    Weston-super-mare
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI Enemy movement.

    Actually thats seems pretty easy to understand.obviosly when the alterable string are acctivated a certainevent is carried out to insure thats it snooping around or preparing an attack.

    Pretty basic to me, sorry im quite complicated.

  8. #8
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI Enemy movement.

    That's not basic. That what good games with a good AI are designed on.

    Take Crysis ( http://www.crytek.com/games/crysis/overview/ ) as example. Now all those Enemies you approach have their own business. The stand around, they are roaming an area, some of them are sleeping, eating etc.

    They all do their regular "job" until you take action, and shoot some of them, they are alerted, will flee, call for help, try to surround you, hunt you etc. These are all behaviors which are life like and make a good AI. They all can hear and see. You can sneak up to them, you will be hard to see in the jungle and they spot you on a 200 meters when you walk on the street.

    That is very realistic and in no way basic. That is what makes a good AI.

  9. #9
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AI Enemy movement.

    Quote Originally Posted by Martin_etc.
    Pretty basic to me, sorry im quite complicated.
    Quote Originally Posted by someone wise
    Keep it simple, stupid!
    Well believe it or not, but most often, the AI behind "intelligent looking" enemies can be quite simple. What makes them seem smart or natural are good animations (they have animations like looking around etc.), matching sound effects ("where aaaare yoouu?"), proper pathfinding (they don't get stuck between two trees or keep running against a wall) and limited senses (even though in the back of their head they know exactly where you are and what you're doing, they pretend not to hear/see you unless you're within line of sight or make a lot of noise).
    The actual behavior behind all that stuff can probably be described with a rather simple finine state machine.


    For the sake of playability they pretend not to see Mr Sam "I glow in the dark" Fisher


    Oh, the guy next to me just dropped dead. Hm. "Must have been the wind."

Similar Threads

  1. Enemy Movement
    By jbrown2177 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th August 2012, 10:07 PM
  2. Enemy Movement
    By CamWin in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 14th April 2011, 05:44 AM
  3. help on enemy movement
    By Pixzel in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th February 2011, 10:30 PM
  4. Enemy Movement
    By Na in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 29th April 2010, 12:27 AM
  5. Enemy Movement
    By LuZeke in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 28th May 2008, 10:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •