Programming Game AI by Example Reviews



Amazon.com Customer Reviews

Misleading Title - Review written on September 13, 2007
* * * * *
Rating: 5 out of 5
4 customers found this review helpful.

Misleading Title

This book has a misleading title. I think this book should be called "Fundamentals of Game Development" instead of Programming Game AI by Example. Sure the book delivers on what it promises, as so many reviewers have already mentioned, but I believe that his book teaches you something that no other book that at least I am aware of teaches - good software practices coupled with actual game development.

There are dozens of books available in the market today claiming to teach you Game Architecture. I will not name the exact titles of such books but you know what I am talking about. I have read so many such books only to find myself becoming a graphics programmer. Not that I didn't want to become a graphics programmer, but even after learning all that stuff, there was "something" missing. That something turns out to be design patterns related to game development. In other words, how to combine various game components together into a working game. The last place I expected to learn it in such an elegant and easy to understand manner was in an AI book.

It's my sincere belief that this is the best book on game development available in the market. Read that again, not just AI but Game Development. Thats right, no matter which of the numerous disciplines of game development you wish to specialize in, no matter which platform or technologies you want to develop for, you need this book. Period.

The book starts off with the most relevant mathematics chapter that I have found in any game development book. Maybe I'm stupid, but this was the only book that explained to me what a radian was! The lesson on vectors presented many useful examples that are bread and butter of game development but for some reasons are ignored by mainstream game development books. For example, finding out whether a game agent is in front of the player of behind him.

Next, it teaches you the "state design pattern". To me this chapter alone is the entire cost of the book itself. I had never seen this discussed in any game development books. I believe this should be in the appendix of each book that claims to teach game development. Instead, almost all entry level game development books have a C++ primer, but never a primer on topics like the state design pattern or UML. In one appendix this book with teach you all the UML you need to get started. Did I mention the "telegram" pattern? Again, so many "beautiful" books claiming to teach you game architecture only end up teaching you graphics programming and using some API in general. This is the first book I have come across that taught this design pattern. Strange, given the fact that you cannot make a game without a robust HSM and some way of sending messages.

Then it goes on to teach you how to create autonomous game agents. Whether you are into AI or not, this is something you need to know. But what I appreciated most about this chapter was the application of state machines and how physics is implemented in a game at an architectural level. Most books uses procedural approach when to comes to actual implementation. This book uses good object oriented techniques to show you how forces on an agent are accumulated and how it gets translated to the agent's movement.

While I was still amazed how much money I wasted trying to learn how things are put together, this book surprised me with a complete mini soccer game! Now, I learned more about game development from this single chapter than I had from reading complete so called game programming books.

Each and every chapter in this book is a gem. If you are new to game development, then this book will provide you with the right direction to begin your career. If you already have read so many game programming books in the hope of making an actual game but were never able to do so then this book will seal the deal.

To cut a long story short, the book also delves into graph theory, scripting and other material topics such as fuzzy logic that you can easily read from the index of the author's website.

Chapter 7 of this book teaches you how to create the AI of a FPS. Rest assured, you will end up learning more from this chapter than you initially sighed for. And you wont be disappointed. One way to think of this chapter is not an AI simulation, but the framework of an entire FPS game! Thats right, it contains everything except the graphics engine, sound engine etc. You can plug a 3D engine with it, along with other missing libraries and get a 3D game! Other books take a complete opposite approach. They go into great details as to how to create various game libraries and in the end slap you with a pathetic design to hang them on to. After reading this book, all the other game programming books will make sense.

The only qualm I have with this book is that the author has not upgraded the scripting code on his web site. This book teaches you how to integrate Lua into your game engine. Since the publication of this book, Lua has been changed dramatically. Getting Lua, Luabind and Boost to work together was a nightmare, which I am still not able to do successfully. So now I am integrating python into my game. This is when you try to integrate their latest versions. They will work if you stick to the older ones though. But this does not render this chapter useless as you will still learn a lot from it.

If you are beginning game programming, or have given it up in frustration, this book will get you back in the game! If I am asked to name one game development book that I want to suggest to a newbie (who knows C++), this is it. Pick it up with your eyes closed. You wont regret it.
Wish i could spend more time on it... - Review written on August 15, 2007
* * *
Rating: 3 out of 5
4 customers found this review helpful.

Likes:
- How the author only deals with AI game programming and doesn't put in a lot of fluff
- The broad range of topics the book covers
- The use of actual 2D examples and an actual game "Raven"

Dislikes:
- Use of "helper" files that have no explanation in the book (some are explained in previous chapters but the author should have included an appendix to list and explain all the files in the common directory)
- The code explanation is shallow when you consider the fact that the author neglects to tell you about the, many and crucial, other files that are needed to run the program.
- The actual code that can be downloaded from the web site needs a lot of tweaking before it even works (you should just be able to unzip it and run it).
- Chapter 3 and how the author only includes the source code for a final all encompassing program instead of smaller easier to understand projects.
- If you don't know Win32GDI then learn because the book uses it extensively to output to the screen, and that can interfere with understanding the actual meat of the program.


Summary:
If you are going to buy this book make sure you have a lot of time on your hands to look through the source code, tweak it, and pull it apart. The book itself just doesn't give enough explanation to allow a person to create their own version of the concepts without digging through the source code. Overall I would recommend the book to people with an intermediate knowledge of C++ and have very good 2D math skills. This book is a fine overview of major topics in game AI but is sorely lacking (add another 100 pgs of quality explanation on topics). It would probably be necessary to buy other books that are more specific in their focus.
Immensely Useful - Review written on June 13, 2007
* * * * *
Rating: 5 out of 5
2 customers found this review helpful.

This book is simply outstanding. The material is crystal clear, direct to the point, and so easy to understand that my 10 year old son is writing state machines in Visual Basic. Although the code is C++ I had no trouble translating it to Objective-C for my use. I am quite impressed at how the author makes such high-level concepts so easy to understand. A must have for every game programmer.
Best book about AI around... - Review written on April 24, 2007
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 1 did not.

If you are like me, who wants to get the job done, this book is just perfect!

With lots of examples, this book is stuffed with clever solutions for pratical problems you stumble upon when developing average games. There is even a simple soccer game example.

After you read this book, I'm pretty sure you will obtain solid notions about artificial intelligence for games.
It saved my life - Review written on March 25, 2007
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 1 did not.

I had a problem programming a NPC car pilot and I found the solution inside this amazing book! I'm sure you'll find the solution for your problem as well!!
Nicely put together and a good read. - Review written on March 08, 2007
* * * * *
Rating: 5 out of 5
3 customers found this review helpful.

First off, it's a good read as it is so well written. There is an invaluable basic maths/physics primer at the
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.
... - Review written on October 02, 2006
* * *
Rating: 3 out of 5
7 customers found this review helpful, 9 did not.

As the author states in the introduction you need to read the book in a comfortable chair with a laptop+net connection, you cant read this without a keyboard with in arms reach. I expected the examples to be in pseudo code or at a less hard core level of C, if your programming is not top notch be carefull.
great book - Review written on August 25, 2006
* * * * *
Rating: 5 out of 5
5 customers found this review helpful, 1 did not.

This book is class. Really great and the author is a gentleman. Also check out the online forums dedicate to this book at AI Junkie. There the author himself chips in with helpul advice for AI novices and stalwards alike. I have his other book too and it is also five stars.

If you don't know C/C++ you should get yourself a good reference before you start reading. This will be particularly relevant in the math and graphics sections.

The source code on steering behaviours alone is like gold.
Very good book for Game AI - Review written on July 16, 2006
* * * * *
Rating: 5 out of 5
5 customers found this review helpful, 1 did not.

I'm an expirianced programmer and always wondered how things worked in a game. How the "enemy" knows how to move etc.
This book explains the lot. All you need to know about movment and shoting game AI. The explanations are clear and verbose. Very very good book. I highly recommend it.
Great book - Review written on May 14, 2006
* * * * *
Rating: 5 out of 5
6 customers found this review helpful, 1 did not.

This is a great book, it's very accessible and very readable. The source code is easy to understand. The chapter on lua is clear and concise. This book truly lives up to it's 'by example' title. Buy it, you won't be sorry!
Lean 'n' mean - Review written on December 14, 2005
* * * * *
Rating: 5 out of 5
4 customers found this review helpful.

This book is the sort of "if you are only going to buy one book on Game AI, buy this one" book. It is a great reference and promises fun from page 1 to the last page. I am not a C programmer, but everything is explained so clearly, that no matter what language you are going to use, the concepts are simple to understand and powerful when implemented. I just love every single example, be it the Miner, the Soccer example or others, like the goal-driven Eric. Mat writes in a easy and funny way, that makes it pleasant to go through the whole book. What I would love to see, maybe in a 2nd edition from Mat, is modelling emotions and how to make a game agent evaluate input from different senses into an almost human-like behavior or Game AI in MMO games. I am not saying that the book has any shortcomings, I prefer to have less topics, but well covered, so please Mat, write another one. And you, don't think any further, get this book, it's a must read !!!
Excellent book - Review written on December 01, 2005
* * * * *
Rating: 5 out of 5
3 customers found this review helpful.

Although I have been writing code for a few years, this was my first foray into AI programming. I find the examples easy to understand. Everything is very well written and the example code is well documented. I could not have asked for a better book.
OK - Review written on November 30, 2005
* * * *
Rating: 4 out of 5
3 customers found this review helpful, 5 did not.

It is as the title says, Programming Game AI by Example. Reading it, I felt that going more deeply into concepts rather than showing short snippets of code would have been more useful to me. I also felt that the code shown in the book was shallow at some points and really quite useless without the source code that the book provides a link to on the web. I learned more going through each class of the source code and seeing what each function actually did, rather than just seeing a few function calls in the example code in the book. Which may seem obvious enough, but the example code could have been left out entirely in my opinion and just referenced. However, it is all brought together quite nicely in the final game where the focus of each chapter is shown in a final product.
An entire chapter on HOW to script in lua could have been done away with (thats what tutorials are for) and instead been used for concepts of how it can be used. Plus I felt it was slightly out of place as I do not recall it being used in the final game either.
I am trying to code a game in flash actionscript and for that this book was not very helpful as I do not have all the libraries that the author uses in his source code and would have appreciated a book with a broader application. Personally I thought the book was merely OK, but realizing that because I didn't find it useful doesn't necessarily mean its bad, I'm giving it a 4.
none of the typical Bravo Sierra - Review written on November 14, 2005
* * * * *
Rating: 5 out of 5
38 customers found this review helpful, 5 did not.

This book has a very high signal to noise ratio. No patsy italicization and explanations of simple concepts like inheritance and polymorphism, and no wasted space towards their explanation. And none of the tired dogma about how important design and washing hands after picking nose is. A book that doesn't try to address everybody on planet Earth...what a concept. Don't know what a singleton object is? The book politely refers to the internet, and moves on to provide game application for a multitude of the concepts typically learned during undergraduate CS work. Concepts like FSMs (agents!), Graph Theory (paths, obstacles), Fuzzy Logic, and more with the perfect mix of theory and reality (mostly reality, thankfully. I got a game to write). If you are comfortable with your C++ coding this book will throw light sometimes on even old, familiar concepts spun in a new gaming application that will have you going like `whoa...how cool and what a piece of cake!'. Its one of those cornerstone books, and I wouldn't be surprised if it became a classic in the game community some day. Maybe. Who knows. A million stars but alas, Amazon limits me to five. p.s. I hope you dont get the impression from me that you need a CS degree to understand this book. No way! All you need are your excellent coding skills.
occasionally and deliberately make mistakes! - Review written on October 25, 2005
* * * *
Rating: 4 out of 5
1 customer found this review helpful, 3 did not.

Buckland gives you good explanations of various ways to implement so-called artificial intelligence in your games. If that phrase inspires trepidation, you can instead regard the book as giving many useful algorithms, instead of being hung up over some terminology.

For sports simulation, the book uses soccer as an example. It shows how from the real world, you can make simulated players with effective tactics. Not just for soccer, of course.

Buckland also suggests deliberately having the computer players occasionally and perhaps unpredictably make mistakes. That is, purse a suboptimal strategy. Humans do this, after all. Gives a more interesting game experience.
Most helpful book I've purchased! - Review written on October 21, 2005
* * * * *
Rating: 5 out of 5
1 customer found this review helpful.

I am currently programming the AI for a 3D Real-Time Strategy game and this book has helped me beyond measure. After studying the Steering Behaviors in chapter 3, I ported them into 3D to work in our game. I also used the setup for the Finite State Machines and the Goal-Driven Agent Behaviors from chapters 2 and 9 respectively. I have never read a book which was so reader-friendly and easy to learn from. All of the examples are amazingly powerful and flexible, yet simple to implement. I would recommend this book for anyone interested in Artificial Intelligence, be you programmer, designer or hobbyist.
Wow... - Review written on July 05, 2005
* * * * *
Rating: 5 out of 5
3 customers found this review helpful.

This book is amazing. I am only 3 chapters into it and I have learned a TON of useful information. This book definitely lives up to it's name, '...by example', as it provides ample and thorough examples that can be used immediately in your own code. Pick this book up. Great job Mat.
Give some life to your game agents! - Review written on June 30, 2005
* * * *
Rating: 4 out of 5
17 customers found this review helpful, 3 did not.

If you are intererested in coding intelligente agent that can move around, flock, swarm, hunt and flee or follow a basic sort of strategic behaviour this text is an excellent choice. It offers practical examples examples of all of the above in the context of a simple soccer game and a search & destroy game called raven. Don 't expect 3D and fancy graphics. All games and concepts are 2D and the graphics is rudimentary at best, but that serves the puropose of keeping teh complexity of the book to manageable levels and the focus on AI programming. There is ton of example code to study and play with, and the little theory in the book basically is just an explanation of the code that the author has written. I would have liked to see more space dedicated to theory, and clearer and more genral explanations instead of "here is the code that.." but oh well better too much practice than too much theory.. and after all the book title makes it clear that this is a hands-on kind of text.
Definitely a must have book for the aspiring AI programmer or hobbist. Code is C++ but you don' t need to be a C++ guru, knowing the basics will serve you fine. Only one warning: you won 't get much out of this book is you don't spent a lot of time tinkering with the code presented and trying to extend it.
One of a kind book - Review written on June 28, 2005
* * * * *
Rating: 5 out of 5
14 customers found this review helpful.

I have read many game development books, and this is definitely one of the best ones out there. Just by flipping through the pages, you can see right away how much care Mr. Buckland has taken in writing this book. There are a plethora of diagrams and code examples, and the layout and organization is excellent. The balance between theory and implementation is just right. The writing style is concise and the book covers a lot of material, yet it is enjoyable and painless to read. Personally I also like the fact that the book is physically compact so it fits easily on my desk :)

By far though, my favorite aspect of the book is the "real-life" examples he gives. It's easy to skim over all the theory without really "absorbing" the material, but when you see the concrete examples, it jogs your brain and gets you thinking about how to actually apply it. For example, when discussing the basic idea of "states", he doesn't just make up a contrived example and leave it at that; he gives several examples from actual types of games. For example, a Quake style bot might implement FindArmor, FindHealth, SeekCover, and RunAway. Even the weapons may implement mini state machines like Move, TouchObject, and Die.

Digging deeper into the actual content of the book, it covers all of the practical topics an AI programmer should know, such as FSMs, pathing, group behavior, scripting, fuzzy logic, etc. All topics are explained in enough detail that you can incorporate them comfortably in your game, and if you want to learn more, you have a solid foundation to build on. As it says in the book, being an AI programmer isn't just about memorizing a handful of techniques, but also about how to apply them in combination. So, the book covers two concrete examples: a soccer game and a simple shooter game called Raven. To further your understanding, each section also contains some suggested practice exercises, like "Write code to update their sensory system so that a bot is able to sense when it is being shot at." Finally, as a bonus, this book also talks about UML class diagrams in the appendix, which is very useful to know if you don't already.

It doesn't talk about genetic algorithms or neural networks, but that seems like a good decision because those topics rarely come up in practical AI. If you want to learn more about those, Mr. Buckland has written another book called "AI Techniques for Game Programming".

Incidentally, notice that my review, plus all the reviews before mine, all contain the word "best". This is no accident- this book is a gem, and should be required reading for anyone looking to get into game AI.
One of the best - Review written on June 15, 2005
* * * * *
Rating: 5 out of 5
3 customers found this review helpful, 2 did not.

I buy A LOT of computer books, and this is by far one of the best and currently the most prized and favorite in my collection.

Mat Buckland does an excellent job making the book fun and easy to read, without skipping on content. This book is loaded with excellent AI programming tools and tips but it doesn't weigh you down. I was able to read it cover to cover and every page made me itch to sit down and begin coding right away.

A must have for a begginer in AI programming or a AI programmer who is looking for some new ideas or touch ups on the basics.
Best game book I ever read so far - Review written on March 08, 2005
* * * * *
Rating: 5 out of 5
4 customers found this review helpful, 1 did not.

I am not a game programmer, just a fan wishing to build my own game someday :)
I read the first two chapter, finite state machine and stearing, and then I ran the code downloaded from website. I was astonished that these effect can be so easily and professionally implemented. And don't get me wrong. These technique doesn't require much simplification and imagination as some graphic effect does. They're actually based on mathmatical and intuitive way.

After read 10+ directX related books(which is useless to me), I highly recommend this book and Alexandrescu's modern c++ design. With them, it won't be too hard to get started.
Absolute Best - Review written on March 03, 2005
* * * * *
Rating: 5 out of 5
1 customer found this review helpful.

I have a 50+ book library focused on game development and game programming. This is by far the best written and edited book in my library. With respect to AI it is unmatched. Clear and concise with excellent and understandable examples/code. If you only buy one book on AI programming, buy this book.
Quite possibly the best book on AI programming for games - Review written on November 12, 2004
* * * * *
Rating: 5 out of 5
11 customers found this review helpful, 2 did not.

If the glowing reviews from industry professionals arn't enough, here's another one from the perspective of a game programming student.

I've spent quite a bit of time examining the various available texts on game AI programming and I have concluded that this is best for several reasons. Most importantly it focuses on the "bread and butter" AI techniques most commonly used in game development today such as Finite State Machines, Fuzzy Logic, Heirarchical Goals, Path Planning and Navigation while avoiding the more complex, difficult, and less commonly used techniques of Genetic Algorithims and Neural Networks. (which he covers quite well in his other book on the subject AI Techniques for Game Programmers.) Secondly all the techniques are illustrated with lots of example code, all in C++, both in the book and with code and executables downloadable from the publisher's web page. Furthermore these examples are illustrated in the context of a provided 2d game coded entirely in C++ called Raven that is very much like a simplified First Person Shooter which you can use to practice and test the techniques that you learn without having to learn the specific interfaces for a commercial game such as Unreal Tournament. Finally there are several chapters that focus on additional topics that are related to AI programming that are very helpful. The first chapter reviews the math and physics necessary to understand the info in the book. Chapter 6 covers the LUA scripting language which is commonly used for programming in many current games. (examples include Farcry, Baldur's Gate, and Homeworld) Apendices at the back of the book cover two more important topics, C++ templates and UML Class Diagrams. All in all I think it's a very well written and easy to understand book that is simply the best on the topic for beginners.
A must-have. - Review written on October 23, 2004
* * * * *
Rating: 5 out of 5
62 customers found this review helpful, 3 did not.

This book is simply one of the best AI texts that I have ever seen. The author has the ability (as those others who have visited his website will attest - http://www.ai-junkie.com/ai-junkie.html ) to take complex topics and break them down into simple, logical steps that make sense even to novice programmers such as myself.

Throughout this book, he does that time and time again. He gives thorough examples and describes them very well. These are not "baby" examples that serve only to highlight this or that point - he delivers real, working examples that you could plug right into your own game or simulation. Take Chapter 4, for example. It is an elegant sports simulation of a Soccer match. This single chapter is worth the price of the entire book, in my opinion.

The examples are cool. The code is modern and efficient. The techniques are those in use today.

For years, I would buy a book on AI Programming, only to find that techniques were only hinted at and not fully explained. It was like, with those authors, they were keeping some mysterious trade-secrets all to themselves.

This author doesn't do that. He is confident enough to give you everything you need to know to program your own AI. Be it a Finite State Machine, an intricate sports simulation, or fuzzy logic - just to name a few of the topics you will find in this book. If you have his other book, you know that he is also adept at Neural Nets and GA.

So, my advice is biased because I have read this book and I love it. I think you will, too. Buy this book. You won't regret it.