Non-Overlapping AI for Top-Down Games

  • 27 favourites

Attached Files

The following files have been attached to this tutorial:



Download now 174.67 KB


4,354 visits, 6,425 views



This tutorial hasn't been translated.


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!



Download now 174.67 KB

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