Search Unity

What's a good framework for interactions between NPCs?

Discussion in 'Game Design' started by Vefery, Nov 9, 2022.

  1. Vefery

    Vefery

    Joined:
    Feb 23, 2018
    Posts:
    119
    I have npcs driven by utility AI. For now they have personalities (combination of few stats) and can do stuff on their own. I want to design a system that allows them to interact with each other according to their personalities, in sims-style.

    But I have a hard time designing such system. To model situation like "Bob wanted to talk with Tom, Tom refused, Bob got mad at Tom" I thought of something like: Bob decides to interact with Tom -> Bob chooses the action based on their relationship -> Bob sends the request to Tom -> Tom chooses respons based on their relationship and returns it -> Bob chooses action based on the response -> Finally they execute synchronized actions.

    To me it seems like overly complicated (and tedious to implement), but I can't think of anything else
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Take a look at the Love/Hate manual, or just use Love/Hate if you prefer. If you want to implement your own system, the Love/Hate manual and API reference might give you some ideas for design and implementation.
     
    Niter88 and Vefery like this.