0 Favourites

How do I make the AI like the Osmos?

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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?

  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
167 14,515
DMT2005's avatar
DMT2005
Unread sticky
1 Favourites
C2 Games made with CocoonIO
136 89,839
minhcuong's avatar
minhcuong
Unread hot topic
99 10,155
karshinkoff's avatar
karshinkoff