It looks like Course Technology, now that it owns the Premier Press brand, has given its editors a double brief: “know thy audience” and “maintain subject focus”. I am just reading through the latest Premier Press lineup and, compared to the older books with green & black covers, the new titles seem to really offer something new other than just updated covers.
With the publication of Beginning DirectX 9, the number of really valuable introductory titles to the subject of DirectX I would personally recommend to fellow programmers has probably doubled. Wendy Jones has done a bang up job with her first book, teaching the graphics aspects of DirectX in an easy-to-read style that doesn’t waste the reader’s valuable time. Jones has been a programmer in the game industry for a number of years and currently works at Humongous Entertainment as a game developer.
Beginning DirectX 9 concentrates almost exclusively on the graphic aspects of the DirectX application programming interface (API) with only very brief chapters covering DirectSound and DirectInput. Jones completely ignores the networking aspects of the DirectX API, perhaps wisely; many of the aspects of DirectX are both broad and deep, so doing justice to all areas of the DirectX technologies would no doubt double the number of pages.
Unlike many introductory titles, Beginning DirectX 9 doesn’t waste pages covering subjects that any programmer contemplating creating DirectX applications should already know. Jones is targeting those people who are familiar with C++ and are capable of downloading and installing a software development kit (SDK) without step-by-step handholding. Other than short—and I mean very short—sections covering the architecture of DirectX, including a few obligatory paragraphs about the component object model (COM), I’m pleased to say that the book stays tightly focused and avoids wasting the reader’s time with superfluous information. It is not necessary for 99.999 percent of game programmers to know anything at all about COM or how DirectX utilizes it. Jones knows her audience; she mentions COM, then moves on to the more interesting items.
Beginning DirectX 9 quickly walks through the 2D aspects—introducing surfaces, off-screen buffers, and sprites, then wrapping up with a section on making your sprite animations time-based rather than frame-based—before finally leaping into the world of 3D, introducing the basics of Direct3D, such as vertices, meshes, textures, and lighting, including vectors & matrices. Again, Jones assumes the reader is familiar with the basics of 3D math.
Each chapter wraps up with a quick summary, including some review questions—the answers to which are given in the first appendix—and a few small exercises termed “on your own” that an inquisitive reader can use to explore the discussed subject further.
The DirectInput chapter covers the basics of input devices. Then it went on to rapidly discuss keyboard, mouse, joystick, and gamepad, including handling multiple-input devices simultaneously. Surprisingly, there is a small section on force-feedback devices. The one omission to the chapter is action mapping, which would have been a useful part of the DirectInput API to cover when dealing with multiple input devices.
The DirectSound chapter is probably the smallest I’ve seen in any DirectX book; perhaps the author is a hardcore graphics programmer or felt she couldn’t do justice to the subject in the limited space available. Either way the chapter offers only a bare minimum of information on how to enumerate the sound devices, play back a sound, and adjust the volume.
The final chapter, and the only one that really deviates from the focus of the book, was actually the most surprising too. The chapter puts together all aspects of the earlier pages into a small “game”, then pleasingly shows how to create an installer for the game along with the DirectX runtime distributed with applications—certainly useful knowledge for developers not familiar with this aspect of DirectX.
I'm pleased to say the CD-ROM is well organized and clearly laid out: each demo and chapter of the book is contained in its own directory and large “framework” files are avoided where possible.
There are only two short appendices: the first iterates the answers to each of the review questions; the second offers brief details covering the CD-ROM contents and how to install the DirectX SDK.
If you need are the essentials of DirectX (perhaps because, as a developer, you’ve only lived in the world of PlayStation 2, GameCube consoles, or OpenGL on other operating systems), this book is an ideal introduction to the subject of DirectX graphics. It’s aimed at beginning programmers, but seasoned veterans who are just coming to Microsoft’s DirectX SDK (perhaps due to a move to the Xbox) have much to gain from it as well. The book does exactly what it says on the cover and doesn’t waste time informing, or insulting, the reader.