User Tag List

Results 1 to 10 of 10

Thread: How do I make a platformer AI?

  1. #1
    No Products Registered

    Join Date
    Oct 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I make a platformer AI?

    im trying to make a platformer with enymies that will always move twords you and when they are close enough, start shooting at you. PLEAZE HELP ME!!!!!

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    What are you having trouble with?

    What you asked falls just barely short of 'make my game for me'...

    Are you having trouble making them move, or are you having trouble making them move around obstacles (pathfinding) are you trying to figure out how to do line of sight... come on help me out here man!

    EDIT: Also, people are going to take you more seriously if you DON'T put all the extra crap in the post title.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Dec 2006
    Location
    Finland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    1. Add some kind of platform engine to the enemy's Behaviour
    -search for Mario Style Platform Engine, it's good for this purpose (no detectors for moving the object etc.)

    2. Change the engine so that the enemy moves by itself (replace "when move left key is pressed" with something like always etc.).
    When player's x-position < enemy's x-position, then set enemy's movement direction to left and vice versa.

    3. You might want to add an detector to detect when the player is on decent range, restrict actions for some time (like 0.5sec if you want the enemy to shoot every 0.5 sec) and add that "shoot an object" there..

    ... And that's it.

  4. #4
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    I would do it something like that:

    1. Custom movement for enemy, like Teknikaali said
    2. Now add event which will detect enemy in player zone:

    -Every 00:01
    +X("Enemy") > X("Player") - 256
    +X("Enemy") < X("Player") + 256
    +Y("Enemy") > Y("Player") - 256
    +Y("Enemy") < Y("Player") + 256

    and then enemy have to stop and shoot :P

  5. #5
    No Products Registered

    Join Date
    Oct 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    where do I find a Mario style platform engine

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Dec 2006
    Location
    Finland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    I meant this one:
    Mario-Style Moving Objects (Improved) by Parth Dalal

    Edit:
    It's made using MMF 1.5, but it is possible to open it with MMF2.
    Ahh.. it was archived, so I had to use Google to find it
    It's not completely ready for what you are going to do, but with a little tweaking with the shooting events etc. you should get a fine enemy AI out of it. (using Pasiunia's and mine advices as help)

    Edit edit:
    There really are some nice examples in the archives.. you could find some diamonds from there if you look hard enough :>

  7. #7
    No Products Registered

    Join Date
    Oct 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    what do I change to make it move towards me!!!!

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Dec 2006
    Location
    Finland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    Quote Originally Posted by Beginier
    what do I change to make it move towards me!!!!
    I replied to here, try to keep one thing in one thread, so I don't have to answer 2 times in 2 different threads ;p

    The object turns direction when its alterable value "Speed" is changed from positive to negative (positive goes right, negative goes left).. so setting it always -5 would make the object go always left and vice versa. hope this made things clear..

  9. #9
    No Products Registered

    Join Date
    Oct 2007
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    THX alot but is thier anyway i can make the enemy jump? and out of curiosity, how does it know when it hits a wall? also is thier anyway to make it jump if it hits an edge and the player is above it? also I want to make a wepon that is not part of the enemy that allways aims at you, I know how to do this for a player but when I have tried it with a enemy it ends up just setting them all at one enemy.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Dec 2006
    Location
    Finland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make a platformer AI?

    Jump (every 1sec for instance..) :

    Every 00:01:00
    -Set "Gravity" to -10

    So:
    "Gravity" is an Alterable value of the enemy (falling enemy = positive numbers so negative = going upwards). You could add your own events like "enemy hitting an object -> jump" and so on..

    The wall detection: no idea, but it works..

    Weapon: I think you need to use Spread Value here.. but I don't know about that enough to teach it. There has to be many threads about it..

Similar Threads

  1. How do I make a simple platformer?
    By 122334shadow in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 11th January 2011, 04:31 PM
  2. Platformer help
    By Beginier in forum File Archive
    Replies: 4
    Last Post: 28th April 2009, 03:01 PM
  3. How to Make a Platformer
    By Raylax in forum Articles
    Replies: 6
    Last Post: 16th January 2009, 01:11 PM
  4. platformer
    By SamG in forum File Archive
    Replies: 4
    Last Post: 17th August 2008, 11:57 PM
  5. 3D Platformer help
    By Karasu in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 25th July 2007, 01:13 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
  •