Feedback on enemy AI

0 favourites
  • 4 posts
From the Asset Store
Pixel Enemies for SHMUP consists of 45 enemy ship sprites to be used in your game.
  • Making a game for a project at school and I need help figuring out how to make the enemies attack the player better in my top down game. :)

    Been using this for the enemy attacks.

    It makes the enemies move to a random position on a sprite I made that acts as a zone around the player.

    https://1drv.ms/v/c/d6500b828056d3a9/EVZH7-rmMmhHsOZPY1jaYrkB62fI8l9U_4UMqnerUO2bfg?e=4MZ5so

    It works fine but it kinda stinks as enemies don't really attack the player directly they just jitter around the player until they happen to hit them. I've been trying out using the bullet behavior for the enemies to act as a dash every couple seconds but i'm still wondering if theres a better way to do this. Any feedback will help thanks! :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • They don't attack the player directly because they are not moving directly to the player, why not just use the player position ? You forced them to move to a random position around the player.

  • They don't attack the player directly because they are not moving directly to the player, why not just use the player position ? You forced them to move to a random position around the player.

    When I did that the enemies would just all bunch up and form a single file line while moving to the player. It made the gameplay kinda boring but I might just go back to that.

  • Here is an idea, try keeping your current logic, so the enemies won't home in directly on the player, additionally continually measure the distance between the player and the enemy using the System distance expression.

    When the distance is close enough, you can start doing a different movement logic that looks more attack-like rather than slowly approaching the target.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)