Hi, I started making a 2D beat em up game, hoping I can create a sort of Renegade / Streets of Rage style experience where the player walks along a scrolling street and kills enemies with a few strikes, until reaching boss level enemies which require more hits. I’m wondering how do you program different Enemy AI? For example if I want one enemy to quickly walk to the player and attack with a punch, kick, punch… Another group of enemies might wait until the player is close by and then they might try to surround him… 2 on his left, 2 on his right… If possible I’d like the AI to be unpredictable and not too repetitive…
I’ve recently seen a tutorial on The Gem Dev channel about hitboxes for melee and it’s very useful. I think you can fine tune strike areas quite precisely using different hitboxes. So I think I understand a little bit, the basics, about collisions. But I’m stuck at actually programming the Enemy AI to do certain strikes and attacks on the player. By any chance does anyone have example code out which shows some Enemy AI fight code for a scrolling 2D Beat Em Up?