AI Football

0 favourites
  • 4 posts
From the Asset Store
Let’s kick the ball through the boy’s legs and show him how good you are!
  • I've never attempted to do any AI behaviour before, I have a 2 player game which is a little bit like football but with two opposing spaceships. I'm thinking of attempting a single player version of this but I don't really know where to start.

    Can anyone point me in the direction of where I can learn any of this stuff. I think I need an AI that can navigate the level (avoiding obstacles), and also attacking the ball when it's free, defending the goal when it is being attacked, plus picking up and using power-ups.

    I could work out how to tell something to go to pick up the ball and defend but it's just the navigation I don't know, would you set up a series of waypoint paths for the AI to travel across around the level?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can't create actual AI behaviors in C2 yet.

    But you can fake the AI by giving the object a series of logical things to do in response to what.

    Things that will be useful in making your AI navigate and avoid obstacles would be the distance() function. Just check if the object is within too close proximity from the obstacle, if it is, make it dodge it or jump etc.

  • Interesting, I did not know about the distance function. Thanks!

  • No problem, hope you manage to get what you want :)

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