NME AI, line of site vs alternative, any ideas?

0 favourites
  • 1 posts
From the Asset Store
Template for an alternative to falling shapes, fully documented in comments and video
  • Hello and good day,

    I'm working on an AI for an enemy in the vain of old school beat-em ups. Examples "TMNT Turtles in Time" or "Streets of Rage". The first thing I wanted to see about getting right was if the enemy was either roaming, curious, or actively hunting the player. For this, I came up with two solutions and was curious what would be the best move to take.

    The first was giving the enemies two "line of sight" behaviors. Then checking one after the other. A "stop light" type of mechanic that worked out rather nicely.

    At each stage, it simply escalates from green, to yellow, to red.

    The second was one where I compare the distance between the the hero and the "nme" or just Enemy. Marking a certain distance to switch the "nme" from state to state. Again, escalating as needed.

    What I'm curious and hope to hear everyone's opinion on is what would be best to go with? I ask because I plan to have several enemies (NME) on the field that will hunt the player. So is it better to forgo the LOS and go for the second style? Would using so many LOS bog down the game?

    Just a curious question. Also, if this inspires anyone for anything please by all means use it. Let me know if it does.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)