Programming Game AI By Example

My friends got me this book for my birthday and I gotta say it's quite possibly the best development book I've ever read.

I should probably qualify that. I've read lots of development books that are good in content and/or good in writing style but this one just does it best. Not only is Mat good at clearly explaining things and in an entertaining way but he's got great working examples, something missing from so many books. He's also got loads of diagrams and illustrations to make his points clear.

Mat goes into the details of implementing game AI for all kinds of things. Race cars, soccer players, soldiers. He goes into techniques like:
  • Finite state machines: What they are for and good examples of implementing them.

    A simple explaination is some object in the game is in a particular state "like walking in a circle looking for the player". When he spots the player he switches states to "shoot at player". If the player disappears he switches back to "like walking in a circle looking for the player". That's would not be a very interesting character but you build them up and the easiest way to do this kind of thing is through finite state machines.

  • Messaging: objects often need to send messages to each other to cooridinate things.

  • Pathfinding: finding your way though a map. He goes over this one with very detailed diagrams.

  • Scripting: what it is, how to use it, I'm not sure if he goes into the minuses enough but those are becoming less and less.

  • Goal oriented AI: Goals require multiple steps like the goal "kill badguy" might become sub goals "go to bank, take out money, go to store, buy gun, go to evil lair, shoot bad guy".
all of these with very real examples. He's even got all the examples up on the net with source to look at. Download the binaries and I'm sure you'll be sold.

All the examples in the book are in 2d. The concepts apply to 3D but adding the complications of 3D into the examples would have made them much harder to understand.

The book expects that you already know C++ and STL and are comfortable with them but otherwise it's easy reading. It's not full of crazy looking math stuff and that math you do need is covered at the beginning.

If you are at all interested in making your own games or learning more about game AI this is an awesome book to get you started.



Pass it on

Comments:
So what's a good book to start learninng VC++? (Gotta learn to walk before running ;) )
posted by LeoFebruary 12, 2005 at 19:36 [ e ]
C++ book
Well, you generally need to learn C++ more than VC++.  VC++ is just the name of Microsoft's C++.  But, unfortunately I don't really know which book to recommend.  You can download VC++ 2005 Express for free right now from microsoft and it includes tutorials so that would be one way to start.  Otherwise I'd suggest reading the reviews at Amazon.
posted by greggmanFebruary 12, 2005 at 23:27 [ e ]
thanks gregg. appreciate the info
posted by LeoFebruary 13, 2005 at 0:04 [ e ]
oops

I lied!  VC# has tutorials, VC++ does not.  Sorry about that.

searching on google this site came up but I suspect getting a good book from Amazon would be better.

posted by greggmanFebruary 13, 2005 at 2:32 [ e ]
Great. Thanks again.
posted by LeoFebruary 14, 2005 at 15:21 [ e ]
Thinking in C++
You might also want to take a look at the "Thinking in C++" series of books.  You can download them for free from here:

http://www.mindview.net/Book
s/TICPP/ThinkingInCPP2e.html


Very well written.
posted by globulousFebruary 14, 2005 at 20:06 [ e ]