Platform AI help

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I'm new in the game. Checked out tutorials and videos and I'm doin ok making a platform game thats action packed but the challenges starts with enemy AI.

    To describe it, I wanted the AI to walk back and forth on the ground, when its LOS to object, it chases and tries to attack, it can jump, it can die, its animated, it spawns in a set position. If its too much or confusing I'm sorry, I just need some basic AI help for a platform game.

  • Make him walk autommaticaly(bullet behavior)to left when a boolean is true,and when he collides with and object in his way he toggles the boolean to right(false)



    and when he gets next to you(compare values:distace between player and enemy)make he walk to your direction

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey man.

    I'm making an action packed platformer too!

    The way I tackle the platformer AI stuff is with hidden sensors. Having an invisible "Jump" sensor near a ledge, for example, and testing if the player is higher than the AI and if the AI is overlapping the sensor, you would make the AI jump.

    Take a look at this diagram. (The font changes the position of these lines and stuff, so try to understand XD)



    Floors and a wall. Now, placing icons into it.



    If the (AI) touches J(Jump sensor) whilst P(Player) is higher than , then jump ^.^

    Making the AI follow the player, when the AI isn't nearby (to detect "near by" stuff, you could use more sensors, or the "Line of sight" behaviour iirc), should be able to have hidden sensors on each side of where the AI is restricted. Make the AI's direction change when touching the sensors.

    Here is another poorly made diagram. the lines are floors, the is the AI


    Just place the direction sensors close to the wall or in the walls.


    Also, on a side note, if the AI IS chasing you, make sure to disable these direction things, otherwise the AI will not behave properly XD

    To basically make the AI follow you, compare the players position to the AI's and change its direction.

    +If Player.X < AI

    • Set AI direction to LEFT

    +If Player.X > AI

    • Set AI direction to RIGHT

    I don't know how to make decent "Path finding AI" if the player were to be far away and the AI needed to get to you in a fast route >.<

    I'm terrible at explaining things, I'm sorry if this was useless information. Really tired too.

  • Jase00 u are good at explaining things :)

    that was really very useful indeed

  • Thanks :)

    Wonder how gtouch1 is doing with AI now.

  • Thanks :)

    Wonder how gtouch1 is doing with AI now.

    Hey, I came across this thread, and am working on a similar mechanic. However, I wanted to know how you were checking and activating the jump sensors along with the direction changing.

    Could you post a capx possibly?

    Thanks again :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)