Programming Game AI by Example (Wordware Game Developers Library) 1st Edition
| Mat Buckland (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
Customers who viewed this item also viewed
Editorial Reviews
From the Inside Flap
---Jeff Orkin, AI architect, Monolith Productions, No One Lives Forever 2 and F.E.A.R
"...a nice combination of a lot of really useful information, put together in a way that doesnt make my brain leak."
---Gareth Lewis, Project leader, Lionhead Studios, Black & White 2
"Each chapter of Mats book gently introduces the reader to a fundamental game AI technology before expanding the new idea into a fully formed solution replete with extensive code and clearly worded examples. The tone of the book is uncomplicated and accessible to the reader, allowing a novice programmer the opportunity to get to grips with the basics of game AI programming by implementing their own systems direct from theory or expanding upon code examples offered to gain understanding in a sandbox environment. Once individual technologies are fully understood, the book goes on to combine these ideas into several complete game environments allowing the reader to understand the relationships between the interacting systems of an overarching game architecture."
---Mike Ducker, AI programmer, Lionhead Studios, Fable
"Using easy-to-follow and well-described examples, this book shows you how to use most of the techniques professional AI programmers use. A great introduction for the beginner and an excellent reference for the more experienced!"
---Eric Martel, AI programmer, Ubisoft, Far Cry (XBox)
"Programming Game AI by Example is an excellent book for the game programming neophyte, the intermediate programmer, and even the expert - it doesnt hurt to go over familiar ground, does it? The book concisely covers all of the important areas, including basic maths and physics through to graph theory and scripting with Lua, to arm any programmer with the tools needed to create some very sophisticated agent behaviours. Unusually for books of the type, Programming Game AI by Example is solid in its software engineering too, with the example code demonstrating game uses of familiar design patterns. Id have no qualms about recommending Programming Game AI by Example to any programmer. Its an excellent read and an excellent springboard for ideas."
---Chris Keegan, Technical director, Climax Studios (Solent)
About the Author
Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Product details
- Publisher : Jones & Bartlett Learning; 1st edition (October 14, 2004)
- Language : English
- Paperback : 495 pages
- ISBN-10 : 1556220782
- ISBN-13 : 978-1556220784
- Item Weight : 1.62 pounds
- Dimensions : 6.09 x 1 x 9.21 inches
- Best Sellers Rank: #543,116 in Books (See Top 100 in Books)
- #193 in Computer & Video Game Design
- #248 in Artificial Intelligence (Books)
- #329 in Computer Graphics
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read author blogs and more
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews right now. Please try again later.
The book starts with a quick primer on math and physics. The basics are explained, like Cartesian coordinates, trigonometry, vectors, coordinate spaces, and some physics. Like most people reading a book of this level, the beginning was a light refresher. However, I’m a big stickler for reading books from cover to cover with no skipping around, so I did not mind a short recap. Next Buckland gets into state-driven design and demonstrates a simple command-line app using the concepts. I found this approach successful, and it was able to show the concepts without complex 2D or 3D math getting in the way.
He followed up with autonomous moving agents, mostly based on steering behaviors. I was already somewhat familiar with steering behaviors, but I found the author’s description and code to be clear and concise and explained the concept better than I’ve seen before. He then applies the previous topics to a simple soccer game. This was a great next step, and really compiled the knowledge being taught into something concrete. In the next chapter, the author went into graphs; what they are, how to use them, and some popular algorithms link Dijkstra and A*. I always wanted to know what A* was, and this book explains it fairly well.
Buckland then devotes a section to cover scripting languages and why they are useful. In this case, he chose Lua (not a bad choice) and explains some basics about the language, how to interface it with C++, and creates a simple finite state machine. This chapter is helpful even if you’re not coding AI and just need a scripting language for your game or engine (provided you like Lua). In fact, a lot of the concepts in this book are generic enough that they can be applied to multiple fields of interest for game developers.
Next, the author creates a simple overhead game framework used in the subsequent examples. Using this framework he then shows practical path planning, goal driven agent behavior, and finishes up with fuzzy logic. Fuzzy logic is another one of those buzzwords that always intrigued me but I never really understood. Buckland concludes with a quite excellent explanation of the concept.
Overall I found this book to be stellar on all accounts. I feel that any game developer could gain insight from this text, even if they aren’t primarily working with AI programming. The scripting coverage could be used in many games, and the algorithms covered are generic enough to apply to different disciplines. While this is the first book I’ve read on AI, I really can’t imagine a better introduction. Highly recommended.
I'm working on a birthday give for my friend and needed this book again. So I purchased it. I bought it new. It's that valuable to me.
I purchased the author's other two books as well.
Because I taught university level mathematics for years, the math portion was rather straight forward for me (other than the misuse of a few mathematical terms/definitions). I would have preferred to give the book 4.5 stars, but that was not an option. If the author covers the material beyond this first chapter as well as he has in the math chapter, then this should be a 'must buy' for anyone interested in the subject, and am very pleased with the purchased of this book.
Thankfully I have a limited background in C++ and am currently developing in C# so I was easily able to understand it. Probably my favorite feature of this book is the "Math and Physics Primer" in the beginning. It's been a while since I've taken any high level math classes so that was a nice refresher. This book also fails to dive into the more detailed mathematics behind AI behavior but it does explore the programming concepts.
Over all I would definitely recommend this book to anyone thinking of venturing into AI Programming, it delivers as promised and so much more!
This book was perfect for me. It has a math primer in the first chapter, which is very nice. It then gets right into the meat for a number of AI topics. It is more advanced than the learning books I have been using, but the source code provided completes the picture.
In short, it is a fantastic jumping off point to get into exactly the topics described. There's plenty more to learn after this book, but there's months of study right here if you want to dive deep into each of the chapters here as well. And if you just want to grab the technique and go, you should be able to do just that as well.
In short, if you made it to the point you are reading reviews for this book, I recommend to go ahead and take the plunge. It's not only excellent but at this price I would say it is a great value for the what you are getting.
Top reviews from other countries
It is the first book I've seen that makes a good effort to present solutions that would actually be used in real games. Which surprised me, because Mat's first book on game AI was just like every other title I've read: a blend of hype and unusable technology. With this book he has come on by miles.
I'm AI programmer in the industry, and this is the first book I've seen that I could hand-on-heart recommend for real technology (John Funge's book is also good, but as an overview, not for practical implementation).
There are some bits (such as the scripting chapter) that are squarely aimed outside the industry, but provide superb material for a hobbiest. The majority of the book is filled with technology that covers the very basics of game AI for novice AI developers. And there are some bits (like the goal oriented behaviour chapter) that could actually benefit people working on commercial games.
There are bits I disagreed with, inevitably.
My biggest criticism of the book is its narrow scope. It covers a handful of AI techniques well, but doesn't talk about the tens of other techniques that game AI programmers need to use to get the game out of the door. It also misses lots of techniques used in particular game genres (it is focussed primarily on shooters, although there is a chapter with some small inspiration for sports games). Some of this is because of size, but it means that the book can only act as a taster and not a real reference book.
Mat's writing is chirpy and readable, and so far the code is reasonably correct and useful. I would recommend it if you are a hobbiest game developer, but its probably far beneath you if you already work in AI in the industry.
A bit heavy on the maths for some perhaps but I guess that is the nature of the topic so the way the author deals with it is exceptionally well done.
The examples are great and really show the good and bad methods. I've seen both in games I own since reading this book and know how their underlying coding works now.
Well worth buying though the full price is steep so I got a second-hand copy...
start (in fact I still refer to that section a year later). Then a nice gentle intro with FSMs (although, on my girlfriends orders, I had to rewrite the tasks given to the Miner's Wife). From there it's Steering Behaviours, Sports AI, Pathfinding etc (all the usual suspects) but the examples for each are superb. I did struggle slightly translating the code
(pseudo-code would have been nice) but that's a minor point.
Still, worth a read because the AI descriptions are very well put together.









