16
Programming / Re: Advanced AI techniques in roguelikes (GOAP and HTN planners)
« on: February 08, 2011, 02:03:19 AM »
Sounds like you have something brewing already. In this case, why not expand your FSM into 2 HFSM loops? One controlled by a leader and one that is ran through for each NPC agent. The leader's HFSM decisions could be a sub branch of the NPC it leads.
The leaders HFSM might not necessarily have the same actions but are more goal oriented grouped actions. For example, KillTarget (follow target, switch weapon to range, attack), GuardArea (move to x/y, look for enemy, rest), etc. If you want a mindless NPC, put the leader's decsion at the top.
The leaders HFSM might not necessarily have the same actions but are more goal oriented grouped actions. For example, KillTarget (follow target, switch weapon to range, attack), GuardArea (move to x/y, look for enemy, rest), etc. If you want a mindless NPC, put the leader's decsion at the top.