Announcement

Collapse
No announcement yet.

Hide & Seek AI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hide & Seek AI

    Hi, I'm making an Hide and Seek Game but before start learning networking I wanted to make a bot which could run away from me and hide in a intelligent way. I saw a lot of tutorial and right now I have an AI which detect the player with AIPerception Component and moves away where the player can't see it. But how can you imagine, it's quite easy to find and kill it. I would like to know how would you enhance his behaviour to make it more challenging even in a small simple map with few hiding places.

    #2
    I'm not familiar with the technical part of this but you'd have to start looking at how you define a "good" hiding place. Once you've defined that you could couple that with your current behaviours so that the ai finds a good hiding place that is out of sight.

    I'd imagine looking for "good" hiding spots would go something like, while moving away from player >>check possible out of sight locations>> does this location have 3 surrounding walls, for example, or concealing foliage as another>> if yes then that is a good spot.

    From this you'd need to then write in something that has a decision variable. This is so that you don't always get a state where the AI picks the first place it finds, actually thinking about it you'd probably want something which allows the AI to remember previous spots so that they vary their hiding spots.

    Sorry I can't be more technical but hopefully that'll get your head thinking.

    Comment


      #3
      Are you asking from a technical or design point of view?

      Because giving technical advice is rather hard without a definition of what good hiding is.

      From the top of my head the easiest thing would be to just set possible hide locations and make the AI pick one at random.
      However that also makes it quite easy to find it especially when playing the game multiple times.

      If you have multiple "hiding" characters. A cool behavior would be roaming around. Which at least used to be something we did a lot back in the day. Actively avoid the seeker by keeping track of where he / she is and moving away from that location / staying on observation distance. Which creates a struggle between keeping the seeker in sight while also staying far enough away that you can not be seen yourself. And might encourage the seekers to be more stealthy themselves.

      Which is a rather difficult thing to implement though.

      Comment

      Working...
      X