Reader small image

You're reading from  Unity AI Programming Essentials

Product typeBook
Published inDec 2014
Publisher
ISBN-139781783553556
Edition1st Edition
Tools
Right arrow
Author (1)
Curtis Bennett
Curtis Bennett
author image
Curtis Bennett

Curtis Bennett has been a developer in the games and computer graphics industry for several years. He has worked on developing immersive virtual environments, published research in visual simulation, taught college courses in game development, and worked for various game studios, and he was also an engineer on early versions of the RAIN AI plugin for Unity. Currently, he is the Technical Director for Creative Services at Ideum, which focuses on creating interactive media projects.
Read more about Curtis Bennett

Right arrow

Group attacks


We spent Chapter 4, Crowd Chaos, and Chapter 5, Crowd Control, looking at group behaviors, and we won't go through a full demo of attacking in groups here, but we should discuss a few main points. With the demo in this chapter, we can add more ships and they will attack in a fairly believable manner. However, there are ways to make it better by considering other enemy positions.

When the enemy ships choose a cover position, a simple method for a group is to track each position if an enemy is already there. Then, when selecting a cover position, each enemy won't go to one that is occupied, making the enemies more diverse in their attacks.

Similarly, when attacking the player, instead of just going as close as possible, the attack pattern can be coordinated. Instead of just going directly to the player, a set of points can be defined radially around the player, so enemies surround and attack it. The key to these group behaviors is enemies taking into account the behavior of other...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity AI Programming Essentials
Published in: Dec 2014Publisher: ISBN-13: 9781783553556

Author (1)

author image
Curtis Bennett

Curtis Bennett has been a developer in the games and computer graphics industry for several years. He has worked on developing immersive virtual environments, published research in visual simulation, taught college courses in game development, and worked for various game studios, and he was also an engineer on early versions of the RAIN AI plugin for Unity. Currently, he is the Technical Director for Creative Services at Ideum, which focuses on creating interactive media projects.
Read more about Curtis Bennett