Game AI: Implementing a behavior tree in C2. Thoughts?

  • > intrinsicalgorithm.com/IAonAI/2012/11/ai-architectures-a-culinary-guide-gdmag-article

    > .

    >

    good article thanks! I'm making a rogue-like as well! or at least modified roguelike...

    you know how to make enemy for roguelike?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My ai logic typically uses variables to determine the state of the AI and then logic is in an if-else if type of structure.

    For example:

    I have an AI Monster called Slime. The slime has 3 behavior states.

    Peaceful: 0

    Aggressive: 1

    Attacking: 2

    The slime has Instance variables:

    Level

    Behavior

    the game then compares the slime level and player level

    if(slime.Level > Player.Level)

    if(Player is near Slime) Behavior = 2

    else Behavior = 1

    else Behavior = 0

    Then the game can choose which AI to implement based off of this.

    For each slime

    if(behavior = 0) Implement peaceful AI

    else if(behavior =1) implement an aggressive AI

    else is in combat, do combat AI.

    Something like that can be taken further and broken down as much or little as needed, looking at things such as health, items, environment anything.

    the very important aspect of this is being able to differentiate one slime from another and properly pick the slime based on the behaviors etc. For this, I find instance variables to be invaluable in dynamic/diverse AI's

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