How do I make the AI like the Osmos?

0 favourites
  • 4 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hi, I am very interested in whether to implement the AI like in Osmos or agar.io. Well, you know, top view, the cells were strolling on the field, and devoured what I will command them. Is this possible?

  • Not familiar with Osmos, but isn't everything that moves in agar.io a player?

    If you're looking for some random movement, you could use the bullet behavior and have a condition every x seconds to set angle to random(360).

    For some AI that heads towards the player when close, you can use the condition that checks distance between player and object, and action that set object angle towards player.

    If you add another condition to check if the player or object is "larger", you can set up the inverse action/angle to run away from the player as well.

  • Not familiar with Osmos, but isn't everything that moves in agar.io a player?

    If you're looking for some random movement, you could use the bullet behavior and have a condition every x seconds to set angle to random(360).

    For some AI that heads towards the player when close, you can use the condition that checks distance between player and object, and action that set object angle towards player.

    If you add another condition to check if the player or object is "larger", you can set up the inverse action/angle to run away from the player as well.

    Very thanks for advices. I just don't know which side to this approach. That is, if I understand correctly, the entire development of AI of this type can be carried out only through the angles and Bullet behavior?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For movement, I think the bullet behavior will cover most your needs in a top down environment.

    Then it just a matter of setting up the logic and conditions for when you want the object to act, and act by changing the direction (angle) and speed of the bullet object.

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