• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Ender1618

Dealing with multiple threats in a BT framework

4 posts in this topic

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
0

Share this post


Link to post
Share on other sites

Hi,

 

Good question!

 

In general this problem is independent of how you execute the behaviors.  Most often, there's a separate system for picking the highest risk target and engage a single behavior to deal with that, there's a separate system for picking positions according to that primary target (and possibly a secondary one), etc.

 

I've rarely seen production systems take into account more than two threats for position picking, and even in the cases you have two threats, the second tends to be weighted a bit lower than the first to prevent indecision problems and static/boring gameplay.

 

Alex

1

Share this post


Link to post
Share on other sites

Sifting and sorting through a list of targets by some manner of scoring system is the purview of utility-based algorithms. In this case, you can build your BT selector use any scoring system you like to rate the targets and then select the highest scoring one (or use a weighted random to provide variety). Additionally, you can extend the use of the utility stuff to higher areas of the tree to dynamically decide if you want to attack or do another action rather than using the hand-authored priorities that are inherent to BTs.

 

For more on utility, there are two videos and an article that I have written on my blog.

1

Share this post


Link to post
Share on other sites

Alex, Dave, thanx for the insight.

 

So typically a BT system would only deal (encode logic) for 1 target/threat at a time.

 

Where an external to BT system would be picking what that 1 threat/target is.

 

Something like a cover picking system can consider more than 1 threat, when picking a cover position, but only communicate its top choice to the blackboard where the BT would look it up. Or possibly more than 1 cover point can be chosen, where the other cover choices (valid but maybe not optimal) could be weighted lower, for a weighted random selector to pick between them.

 

This prioritizing choice could be done in a number of ways, one being using marginal utility (constructed by some multiple consideration formula adjusted by possibly some graph primitive, like a Logit function, etc.)

 

I guess this could be done in what I am calling the perception filter, that is feed by the perception system then generates derived perceptions and writes them into the agent blackboard.

 

So we would typically want to keep that logic out of the BT, and let the BT worry about other things.

 

Am I understanding that right?

 

Are there situations where some of that threat/etc prioritization might need to exist in the BT, in some fashion.  I am thinking about flanking sub behaviors that need to understand the geometry of the battle and therefore its participants and what they are doing?

Edited by Ender1618
0

Share this post


Link to post
Share on other sites

In a general sense, you have the right idea. BTs are good for considering things in a very explicit hierarchical structure and order. Utility systems are good at letting things sift themselves out. A hybrid system is good for keeping some things in order, but then reasoning about pieces and parts as necessary.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0