Btw, this is an FPS like sim.
I currently have a Behavior Tree decision system, that queries an agent blackboard (essentially a list of name value(any type) tuples with some optimizations) for looking up values in condition expressions evaluated by BT condition nodes. The blackboard is populated by a senor perception filer (which can generate derived values from the raw perception system) feed by a sensory perception system. Knowledge bits added to the blackboard are things like: player detected, player hostile, player distance, player position, player velocity, last known position of player, etc. Blackboard entries can also be written to by Set action nodes (I try to minimizes this to reduce side effects in my otherwise declarative structure). Blackboard entries are also queried for use as parameters to actions.
This is all well and good when there is only one threat/target to the be considered (e.g. one player). How do people typically deal with multiple threats in a BT like system.
Would a filter before the BT prioritize targets and threats and write info on the highest priority one to the blackboard?
If so how does one deal simultaneous pertinent actions by multiple threats/tragets?
Is this dealt with transient entries into the blackboard (one per perceived threat)? If so how does the BT know of the existence of these multiple entries?
My approach is naive (I think) in the sense that the BT is looking up very specific blackboard entries by name (or optimized key) for conditions and the like. Is there another way to approach this?
Should it be looking up entries by wildcard, then managing a list (I am unclear how this would work)?
Thanx for any input.
Edited by Ender1618, 10 April 2013 - 07:15 PM.