Non-Overlapping AI for Top-Down Games

5
  • 27 favourites

Attached Files

The following files have been attached to this tutorial:

.capx

top-down-ai.capx

Download now 174.67 KB

Stats

4,300 visits, 6,331 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Hi, everyone!

I bet that you ran into a little problem at least once, while developing top-down game. I'm talking about enemies that overlap each other while chasing player. So after a few minutes of gameplay we'll get 10 enemy sprites that move and act like one.

It's definitely very inconvenient and looks awful. That's why I created a simple AI (based on state machine) which make enemies scatter after collision and continue to chase player or whatever they're supposed to do.

All the details you'll find in the heavily commented .capx file that was included in this tutorial.

Hope that you'll find my algorithm useful. Good luck and have fun!

.CAPX

top-down-ai.capx

Download now 174.67 KB
  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!