Non-Overlapping AI for Top-Down Games

5

Attached Files

The following files have been attached to this tutorial:

.capx

top-down-ai.capx

Download now 174.67 KB

Stats

4,569 visits, 6,699 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.

Published on 27 May, 2016. Last updated 19 Feb, 2019

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!