Book Review: XNA 4.0 Game Development By Example

So back at the beginning of December, I had the opportunity to review a book on XNA game development.

You can head on over to the publisher’s site and purchase it there.

There’s one thing I want to say first, though:

When I was contacted by the publisher of XNA 4.0 Game Development by Example, I did a quick search online to see what other people thought about it. The first page or so of hits was nothing more than links to the PDF version of the book, online. I don’t care how you cut it, piracy is wrong – even if it is a book. I know that if it were my book that people were pirating, I’d be both angered and disappointed. So, if you are looking for a place to download the PDF of the book, go elsewhere you filthy pirate ilk. Quit being a bunch of cheapskates, and buy the dang book.


To get a bit of an idea where I am coming from with this review, I think I should give a bit of history on my own game development experience.

I started getting into game development and programming back around 1995, when our family had a 486. Back in those days of DOS, things were quite a bit different. Almost all game development was done in C++, and used things like mode 13h, Open GL, or DirectX for graphics. Not too long after we got our family computer (an upgrade from an Apple II), I started learning about programming. I started off with Visual Basic, then eventually got myself a copy of Microsoft Visual C++ 6. To help me learn the basics of game programming, I went through a number of books, including Windows Game Programming for Dummies by Andre Lamothe, which quickly became a favourite of mine. After really starting to learn C++ and DirectX, I eventually moved into picking up information from various online tutorials, forums, and the DirectX SDK.

Fast forward 10-ish years, a two year college diploma and a bachelors. Interestingly enough, we still have a lot of the same things…

Books for beginners are always a hard area to target. How much can you assume that the reader knows? How do you cover such a broad range of topics – enough to make a game – in one book? How can you get across complex subjects such as AI, pathfinding, and graphics programming to someone who may have little or no experience working with such subjects?

The Book

XNA 4.0 Game Development by Example does a pretty decent job of riding the line between giving too much information and not enough information. Too little, and people will be wondering about the basic concepts, and too much and they’ll get bored or confused and move on to something else. It’s a difficult line to ride, as beginner programmers can certainly come in all shapes and sizes. Take someone like myself for example: I’ve been programming since about 1995, yet I’ve never actually made a full game (other than something like ‘guess the number’). Despite reading lots of technical documents and keeping up with industry news, I’ve never actually finished a game of my own.

Here’s where XNA Game Development 4.0 by Example shines – right off the bat, it shows how to make a nice, polished game. It might be a simple game, but nonetheless, it’s a game. I’d say the book does good job of what it’s title says – “by example”. The book seems to cover four or so games, and fleshes each one out accordingly.

That is to say that the book doesn’t have a flaw or two.

The only thing that really bothered me about the book was with one of the earlier code samples for the first game – “Flood Control”. Now take this with a grain of salt (or more), but I wasn’t a fan of using strings to store information about how a tile is oriented, and it’s state. I would have much rather seen things wrapped into a nice little class. But here’s the thing – it gets the job done, and it works. That, and considering that I’ve never shipped a game (yet?), who’s to say that I actually know how to make a working game? It just struck me a little odd on how it was done. Luckily, that was really the only piece of code that made me take a second look.

I’ll be honest – I wish I did have more time to review the book, as I really didn’t get much time to look over the latter half. Usually by this point in time a beginner has begun to grasp the concepts laid out and should be able to move past some of the more trivial problems encountered in programming. Once you’ve seen a sprite class, you have a good idea about how things work the next time you see one.

That said, by the end of the book you’ll probably be wanting to learn more and have the basics down so that you’ll start looking into the available XNA Creator’s Club samples. If you are the kind of person who learns by example, this is your kind of book. If you are the kind of person who needs to know everything about what you are doing, you might want to pick this one up from your local library, take a look through it, and read up online on the same subjects.


All in all, I’d have to give this a 4 out of 5 stars. The book does do an excellent job of teaching by example. It is a bit of a shame that it doesn’t dive deeper into some concepts (alpha blending, anything in 3D, more on input, general game structure), but given the limited scope of the book, it’s quite respectable. I could recommend this book to someone who has a basic understanding of the C# language and who is interested in learning XNA game development.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s