Thank you for the great work you’ve done with RAIN! It’s taking some time to wrap my head around it all, but damn if this isn’t the most elegant AI solution I’ve had the pleasure of working with.
If you’d be so kind, I could use some advice on implementing specific behavior for a 2D game I’m working on. In essence, a large number of enemies attempt to converge on the player from all sides—but in a highly abstract/systematic manner: Enemies pause after a move to a Waypoint, and rather than approaching the player position directly, they attempt to occupy one of eight “staging points” surrounding the player at close range, from which they can launch melee attacks.
This is the Waypoint Network I created to control their movement (the player position is the circle in the center, and the staging points are in red):
Ideally, I would like each Waypoint to only be able to contain a single enemy at a time. So, if the closest staging point (red node) to an enemy is already occupied, I want that enemy to find a new path through the Waypoint Network to an “open” red node—or, if all red nodes are occupied, I want that enemy to hang back in the second or third rings, waiting for an opportunity to move in.
Unfortunately, I can’t figure out how to restrict enemy movement in that manner: Enemies always seek the shortest path to the center, even when that results in multiple enemies pushing against each other, trying to occupy the same node:
What options do I have to make my Waypoints act more like the squares of a boardgame, where occupied nodes appear as “closed” to other enemies, prompting them to navigate around each other (following the Waypoint Connections) rather than clump up? I’m not necessarily wedded to using a Waypoint Network, either, I just assumed it would be the easiest way to make this work—I’m definitely open to any suggestions/solutions!
Thanks again for your fantastic work, and thanks in advance for any assistance you can provide!