Behaviour / AI rambling

Enemy behaviour in my current (as yet unnamed) game hasn't come on very far - just a single enemy with a traditional hard-coded finite state machine (done the old-school way, with a big switch statement). Which was initially fine as it let me get some of the more important low-level details into place, but now I'm looking at adding more enemies it's not looking so hot so something more elaborate is called for.

Ai Game Dev has been in my bookmarks for a while now, and provides a lot of interesting reading. The approach F.E.A.R. takes towards it's AI is particularly interesting and probably something which would work well, but is a little beyond me at the moment. Instead what's caught my eye is behaviour trees. In particular it seems to solve a problem that I've been having - how to write specific modules of behaviour (like a specific enemy attack) in a way that they can be reused and rearranged rather than having an explicit "next" behaviour.

I'm not sure I entirely understand how it's all going to fit together with some of the higher level gameplay interactions, but it's a promising direction. I think I shall leave my current FSM enemy as it is and code up the next enemy as a behaviour tree (or possibly do the same one again) and see what the resulting code is like.

Since I havn't really done a scrolling beat-em-up before, I'm expecting to take a few wrong turns with the AI before I find something that works. If anyone has any experience to share then feel free to leave a comment.

Tags: , ,

6 Responses to “Behaviour / AI rambling”

  1. alexjc Says:

    Hey,

    Thanks for the compliments :-)

    Did you also check out the post on Popular Approaches to Behavior Tree Design? It links to my GDC talk also, which I think is a good overview of the technique.

    Let me know if you have any other questions!

    Alex
    AiGameDev.com

  2. JC Says:

    Yeah, I’ve been going through pretty much everything on behaviour trees on your site, it’s very comprehensive – particularly the videos. Thanks a lot!

  3. Game AI Roundup Week #28 2008: 13 Stories, 1 Video, 1 Quote, 1 Event — AiGameDev.com Says:

    [...] Behaviour / AI Rambling [...]

  4. Paul Tozour Says:

    My approach to this can be summed up in the post here — it was essentially a weighted distribution system (i.e. calculate weights for different actions and pick one based on weights), but it lived inside an HFSM.

    http://aigamedev.com/forums/showpost.php?p=3236&postcount=5

  5. www.ibook21.com Says:

    CHIEFS +130 MLB (money line bet) I was surprised somewhat by Kansas city being a slight underdog at home up against the somewhat diminished Cincinnati Bengals.
    You could be getting a bit nervous with your rapidly multiplying numbers, but fear not,
    you will win at least one bet which is all you must end up
    using a profit.
    betting is one area that ought to be taken seriously, after all this is real cash
    you will be losing or winning. A study by Harvard Medical School discovered that nearly 6 percent of adult gamblers have noticed recurring negative consequences from betting.

    However, should you suspect that gold is planning to
    decrease in price, you can take good thing about this by
    “shorting” gold by way of a spread bet account.
    The optimal playing technique is outlined inside the Blackjack Basic Strategy Card.

  6. phytolacca americana Says:

    Gathering of quality products like mushrooms (morels,
    matsutake, truffles), medicinal plants also continues in developed countries for cultural and economic reasons.
    Anything irritated, itchy, red, spotty, lumpy, stinging or just weird
    looking gets a generous slather of cool, soothing natural aloe-vera
    gel.
    Since your indoor temperature may perhaps be always around seventy to eight degrees Fahrenheit, your aloe plants might
    not exactly grow properly. Power plants produce a lot
    of emissions within the process of converting energy from standard
    fuels to Electricity.

Leave a Reply