Beginning 3D Game Programming
Tom Miller


Compras Nikon
Bluetooth
1 very informative despite all of the errors
This is one of the only books in print which covers Managed DirectX game programming. Many of the other books on DirectX 9 still use C++, leaving those of us who prefer Managed code in the dark. Since Tom Miller is the author of the API, he is one of the best people to introduce you to this material. This book does have quite a few errors, but I still think it's one of the best books around. Despite all of the errata, I'm giving this book four stars because it provides a very comprehensive intro to DirectX 9 and 3D game programming.

If you don't have a good understanding of 3D math, I suggest looking for an additional textbook which covers matrices more comprehensively. Fortunately, DirectX reduces some very ugly matrix multiplication to look like simple math problems and I could see some people using DirectX without knowing much about trigonometry or matrix math.

This book also gave me several realizations:
1) I need a computer and graphics card with Pixel Shader 2.0.
2) I need to become a better artist so I can create my own meshes and skins or I have to pay someone else to be the artist.

In the beginning of the book, several programs are mentioned for creating meshes. In additional to those professional (and therefore expensive) packages, I thought I'd mention a program called MilkShape which only costs $25 to register and does a pretty good job of creating meshes. It exports into many formats, including DirectX.

Unlike Tom's previous book, the code in this book relies on the Sample Framework which ships with this version of DirectX. It does seem to remove some code requirements, but I think it also weighs down the code unnecessarily. I think in some ways it might have been easier to understand the code without the sample framework. The book isn't really a sequel to Tom's other book, but it's more like a repackaging of ideas with a focus on game programming.

The code does compile, but you need to make sure that you have the references to the October 2004 release (v9.02.3900). If you have multiple versions of DirectX, the framework is going to default to the newest version.

I do have to say that I felt the frustration of the previous poster who found the book to be full of errors. There are many incorrect diagrams, many instances of incorrect code, and even a small error in the section on matrix multiplication (a second edition is definitely needed). Fortunately the source code is correct, so you can always look at the code to find the necessary corrections. The book also claims that VB.Net code is provided in the source code, but I could not find it anywhere (it's all in C#). I'm not sure why the code was never translated, but perhaps it was the unsafe code (some of which could have been avoided using Marshal.SizeOf) or perhaps it's because there are many cases where a variable has the same name as a property but with a different case.

In the first project, there is at least one critical line of code that never shows up in the book but is in the source code. Most of the errors relate to references to "device" with need to be replaced with either "e.Device" or "sampleFramework.Device".

In the second project, the author leaves you on your own in the middle of the project to figure out the UI design. Normally I wouldn't have a problem with that, but the UI actually uses some classes which aren't discussed until the ensuing chapters. It would be more helpful if the source code provided an incremental copy of the code for each chapter which shows only what's been done up to that point (rather then just the final result). It would also help if at the end of each chapter you could have a definitive result to compile and display (if only to tell that you haven't missed something). As an aside, the collision detection routine is also less than perfect, since you can make the tank go through some walls as well as off the playing field.

The third project is not a complete game. It is simply a program that's been started and left for the user to finish (so I take issue with the claim on the back of the book that there are three complete games). The source code is no more complete than what's in the book (whereas the first two games are complete in the source code). But it does teach you some really cool stuff about the programmable pipeline, and if I had a card with pixel shader 2.0 I might be able to view it faster than 0.5 frames per second.

I think it would be helpful if the errata were published on line, as well as the source code (for a while I had lost the source code for Tom's previous book and couldn't find it anywhere on line). Tom's blog has some discussions, but I couldn't find errata or source code (nor could I find it on www.samspublishing.com). I've tried sending some comments to him on his blog, but I haven't heard back.

To sum it up, this is a great book despite all of the errors. Kudos to Tom for helping bring DirectX to those of use who want to write games using managed code.





2 A waste of the paper it is printed on
I was expect high standards from this book given that is was from Sams Publishing, but it looks like no one proof read this book. There are missing or incorrect images throughout this book. When pointing this out to Sams Publishing, they fobbed me off telling me that they would get in touch with the author to get him to send the missing or incorrect pictures. I am still waiting 2 months later. I would say ignore this book, unless it is second edition. I just find it would be a good book, if someone had check it out first. Nevermind, try again. :(
3 Excellent book covering many topics (see below)
C# and Managed DX9 are arguably the easiest way to write understandable 3-D code. You don't have to mess with all of the convoluted C++ jargon and strange uses of variables that are initialized after passing them to methods.

I cannot stress enough how useful this book has been in the current game I am working on (a 3-D RTS). The chapters on User Interface and how to write a custom GUI have been particularly useful with where i'm at now.

This book would have also saved me tons of time earlier in the development process as he goes over such simple things as handling device lost states (such as when the user minimizes your game) and how to display an accurate framerate (I wasted tons of time on that last year!).

Tom also shows you how to write networking code to make a multiplayer game as well as how to do things such as have a nice skybox, multiple levels, loading screens, player selection screens, font output, and even the use of Shaders (to make objects shiny). He also shows how to do mesh animation using mesh hierarchies - which is very important if you want your model to be able to have different moving parts that animate (such as for walking).

This book covers a wide breadth of topics that any new programmer to game design will find useful. If you pair it up with his Managed DX9 Kickstart book (which you should read first probably), it will take you to the point where you can write your own framework for just about any game you want to write. It does not cover really advanced topics such as pathfinding algorithms and fancy AI code, but it will give you a broad overview and allow you to write several fun games (I'm especially fond of Blockers).
4 Excellent and well-written book
Tom Miller has succeeded once again with writing an excellent book that assists those of us who are using Managed DirectX and C# instead of the more typical C++ with Un-managed interfaces.

This book is fairly easy for the beginner, but does cover other topics such as using DX9's custom interfaces to make GUIs for your games. This has been very helpful with my project that I started after reading Tom Miller's first book (Managed DX9 KickStart), which is also an excellent book for beginning 3-D Game programmers.

The source code included is well written and the author is responsive to questions on his blog at: http://blogs.msdn.com/tmiller/
5 CODE DOES NOT COMPILE!!!
THE CODE DOES NOT COMPILE. WHAT ELSE IS THERE TO SAY?

Thursday, 24-Jul-2008 02:55:06 CDT
Quote of the Day:


You must be the change you wish to see in the world.

--Mahatma Gandhi

Illusion is the first of all pleasures.
-- Voltaire