Synopses & Reviews
Advances in 3D visualization and physics-based simulation technology make it possible for game developers to create compelling, visually immersive gaming environments that were only dreamed of years ago. But today's game players have grown in sophistication along with the games they play. It's no longer enough to wow your players with dazzling graphics; the next step in creating even more immersive games is improved artificial intelligence, or AI.Fortunately, advanced AI game techniques are within the grasp of every game developer--not just those who dedicate their careers to AI. If you're new to game programming or if you're an experienced game programmer who needs to get up to speed quickly on AI techniques, you'll find AI for Game Developers to be the perfect starting point for understanding and applying AI techniques to your games.Written for the novice AI programmer, AI for Game Developers introduces you to techniques such as finite state machines, fuzzy logic, neural networks, and many others, in straightforward, easy-to-understand language, supported with code samples throughout the entire book (written in C/C++). From basic techniques such as chasing and evading, pattern movement, and flocking to genetic algorithms, the book presents a mix of deterministic (traditional) and non-deterministic (newer) AI techniques aimed squarely at beginners AI developers. Other topics covered in the book include:
- Potential function based movements: a technique that handles chasing, evading swarming, and collision avoidance simultaneously
- Basic pathfinding and waypoints, including an entire chapter devoted to the A* pathfinding algorithm
- AI scripting
- Rule-based AI: learn about variants other than fuzzy logic and finite state machines
- Basic probability
- Bayesian techniques
Unlike other books on the subject, AI for Game Developers
doesn't attempt to cover every aspect of game AI, but to provide you with usable, advanced techniques you can apply to your games right now. If you've wanted to use AI to extend the play-life of your games, make them more challenging, and most importantly, make them more fun, then this book is for you.
From the author of "Physics for Game Developers," comes a new, non-threatening introduction to the complex subject of game programming.
About the Author
David Bourg is a Naval Architect involved in various military and commercial proposal, design, and construction efforts. Since 1998, David has served as an independent consultant working for various regional clients engaged in both commercial and military shipbuilding where he provides design and analysis services including but not limited to concept design, proposal writing, detailed design and analysis, visualization, and software development among other services. He coordinated and led the winning design and proposal effort for the US Coast Guard Point Class (patrol boat) Replacement Program. In 2006, David joined fellow Naval Architect Kenneth Humphreys to form MiNO Marine, LLC, a naval architecture and marine professional services firm.
In addition to Physics for Game Developers, David has published two other books. He earned a PhD in Engineering and Applied Science in 2008 from the University of New Orleans. He has served as an Adjunct Professor at the University of New Orleans School of Naval Architecture and Marine Engineering, where he has taught various courses since 1993.
Glenn Seemann is a veteran game programmer with over a dozen games to his credit, for Mac and Windows systems. He's a co-founder with David Bourg of Crescent Vision Interactive, a game development company specializing in cross-platform games.
Table of Contents
Preface; Assumptions This Book Makes; About This Book; Conventions Used in This Book; Additional Resources; Using Code Examples; How to Contact Us; Acknowledgments; Chapter 1: Introduction to Game AI; 1.1 Deterministic Versus Nondeterministic AI; 1.2 Established Game AI; 1.3 The Future of Game AI; Chapter 2: Chasing and Evading; 2.1 Basic Chasing and Evading; 2.2 Line-of-Sight Chasing; 2.3 Line-of-Sight Chasing in Tiled Environments; 2.4 Line-of-Sight Chasing in Continuous Environments; 2.5 Intercepting; Chapter 3: Pattern Movement; 3.1 Standard Algorithm; 3.2 Pattern Movement in Tiled Environments; 3.3 Pattern Movement in Physically Simulated Environments; Chapter 4: Flocking; 4.1 Classic Flocking; 4.2 Flocking Example; 4.3 Obstacle Avoidance; 4.4 Follow the Leader; Chapter 5: Potential Function-Based Movement; 5.1 How Can You Use Potential Functions for Game AI?; 5.2 Chasing/Evading; 5.3 Obstacle Avoidance; 5.4 Swarming; 5.5 Optimization Suggestions; Chapter 6: Basic Pathfinding and Waypoints; 6.1 Basic Pathfinding; 6.2 Breadcrumb Pathfinding; 6.3 Path Following; 6.4 Wall Tracing; 6.5 Waypoint Navigation; Chapter 7: A∗ Pathfinding; 7.1 Defining the Search Area; 7.2 Starting the Search; 7.3 Scoring; 7.4 Finding a Dead End; 7.5 Terrain Cost; 7.6 Influence Mapping; 7.7 Further Information; Chapter 8: Scripted AI and Scripting Engines; 8.1 Scripting Techniques; 8.2 Scripting Opponent Attributes; 8.3 Basic Script Parsing; 8.4 Scripting Opponent Behavior; 8.5 Scripting Verbal Interaction; 8.6 Scripting Events; 8.7 Further Information; Chapter 9: Finite State Machines; 9.1 Basic State Machine Model; 9.2 Finite State Machine Design; 9.3 Ant Example; 9.4 Further Information; Chapter 10: Fuzzy Logic; 10.1 How Can You Use Fuzzy Logic in Games?; 10.2 Fuzzy Logic Basics; 10.3 Control Example; 10.4 Threat Assessment Example; Chapter 11: Rule-Based AI; 11.1 Rule-Based System Basics; 11.2 Fighting Game Strike Prediction; 11.3 Further Information; Chapter 12: Basic Probability; 12.1 How Do You Use Probability in Games?; 12.2 What is Probability?; 12.3 Probability Rules; 12.4 Conditional Probability; Chapter 13: Decisions Under Uncertainty--Bayesian Techniques; 13.1 What is a Bayesian Network?; 13.2 Trapped?; 13.3 Treasure?; 13.4 By Air or Land; 13.5 Kung Fu Fighting; 13.6 Further Information; Chapter 14: Neural Networks; 14.1 ; 14.2 Dissecting Neural Networks; 14.3 Training; 14.4 Neural Network Source Code; 14.5 Chasing and Evading with Brains; 14.6 Further Information; Chapter 15: Genetic Algorithms; 15.1 Evolutionary Process; 15.2 Evolving Plant Life; 15.3 Genetics in Game Development; 15.4 Further Information; Vector Operations; Vector Class; Magnitude; Vector Functions and Operators; Colophon;