January 2015
Intermediate to advanced
380 pages
8h 32m
English
The complete AI project created in this chapter can be found in the book's companion files (code bundle) in the ai folder of this chapter. I recommend that you open it and then test it out. Using the first-person controller, the player can navigate the level, avoid enemies, and also attack when enemies are in range using the Space bar, as shown here:

Testing the AI_Enemy class
There are, nonetheless, many ways in which the project can be improved further, for example, by adding multiple enemy types as well as varied strategies for each type, from taking cover to playing dead, and so on. However, nonetheless, we've come a long way and have ...
Read now
Unlock full access