PDA

View Full Version : beat em up enemy ai design


MooreInteractive
09-21-2009, 07:48 PM
Im looking for some input from the community for a game Im working on.

I don't really need any code help, just design concepts.

I'm not a very clear communicator, so sorry if you have trouble understanding what Im getting at. feel free to ask questions, I will check back daily to answer.

I have a player that moves around and enemies that, right now, simply move toward the player by a certain amount every frame. The problem with this is that it's fairly easy to get them all to be on top of each other and therefor only needing to hit one spot on the stage to hit every enemy. Im trying to figure out a new ai scheme for the enemies so that they don't just move toward the player exactly. Some ideas I've had are:

some type of aggro distance, so if they are not within that distance they just wander aimlessly.

not letting the enemies overlap, so if three enemies are on the stage they would look like they stack vertically instead of going directly on top of each other.

also, in castle crashers, some of the enemies kind of take a formation around the player instead of going straight to the player.

Im mostly looking for a kind of vote on which of these might work well, or anything that might help improve upon one of these. if you have another solution that might work well, I am welcome to hearing that.

Thanks guys...if there is a demand for it, I will post what I have so far on my webpage so everyone can see what I mean exactly, but if not, then Ill just wait for a more complete tech demo before posting it.

rrh
09-21-2009, 10:19 PM
Well, the formation thing sounds promising. Like, you have a list of positions relative to the player, and they first head towards those positions. Only once they've reached those positions do they switch into the mode of heading towards the player.

Pacman might also be a potential reference. Four ghosts, each has slightly different behaviour.

MooreInteractive
09-25-2009, 06:47 PM
yes, maybe layers of all of them would work well...

rrh
09-25-2009, 08:26 PM
Layers of what? What do you mean?

MooreInteractive
09-26-2009, 10:16 PM
layers, as in the first layer of their ai would be kind of wander aimlessly, then once they get inside a radius start to move toward a formation, then once there a new layer of either shooting a projectile, or moving in for an attack.

basically i was thinking each enemy would have one set of rules for its movement, but it would be better if they had 3 or 4 layers which are activated the closer thy get to the player or once reaching a certain point, like the formation. then of course they could vary a little bit within that overall structure like you were saying with the ghosts.

maybe layers isnt a good description of what i meant, but thats the word that came to mind.