Well, Thank all the Gods that's over! No, I don't mean shipping product for Christmas, although by the time you read this that will be over. I mean the quadrennial insanity (with biannual relapses) that we Americans go through in an effort to prove we're more civilized than the rest of the world -- voting. Having been deluged for months with advertising for everything from medicinal marijuana use to affirmative action to lawyer's fees, not to mention innumerable people running for innumerable offices, most of whom I couldn't vote for even if I wanted to, I'm tired of the democratic process. Not that I have anything better to replace it with -- which is why I don't suggest we scrap the whole thing (that's thang for those of you in southern states) and replace it with a system of random values selecting people off the list of Social Security numbers. To be fair I guess we'd have to include everyone who has a business ID number as well -- after all, corporations are people too!

Anyway, to me the entire exercise is not unlike selecting books -- it's hard to tell what you're going to get until you've got it, and if you listen to the people selling them they're all great and will save you and This Great Country Of Ours from the Evil Peril Which Lies Without (or Within). And I will admit to being someone who tells you that books are great, because I don't tell you about books that I don't think are great (or at least pretty good, or at least worth reading). I read at least four times as many books as I review because I don't think it's worth my time (or your time) to write a review of a book that essentially says "don't read this." So if you get worried that I like every book because every review I write is positive, put your fears to rest -- I'm just keeping quiet about the stinkers.

Cutting-Edge 3D Game Programming with C++

John De Goes
Coriolis, 716 pages, $40
ISBN 1-883577-70-5

Some of you may recognize John De Goesâ name from Compuserve -- he is a sysop in the GameDev forum and often responds to requests for information about 3D programming (among other things). He's written quite a fine book here to get you started on your 3D programming career.

He starts right in at the basics (actually there's a brief Introduction on games and 3D gaming), providing clear and concise explanations of 3D transformations and the magic of perspective project. Well, actually, it's not John who does this, but Patrick Reilly (I guess in the role of a virtual John De Goes -- "I'm not John Do Goes, but I play one in his book"). In any case, the 3D Basics chapter is (at least to me) a nice refresher on the basics of 3D math. I must admit I did not carefully compare his examples with my own 3D code or with other samples, but the sample code I tried works and that's a good start (better than some books I've looked at!).

De Goes goes (sorry, I couldn't resist it) on two brief detours into basic DOS graphics and Windows graphics -- setting modes, palettes, writing into video RAM, and double buffering -- before starting the meat of describing a 3D graphics engine. He spends five chapters on the fundamental structure of the engine, from points to polygons, covering clipping, projection, and culling.

Collectively, the first 300 pages of the book are a quick primer in basic 3D graphics, covering what you need to begin doing the real work. You could probably write Wizardry (actually better than the original, because the walls would be flat shaded instead of wireframe) with what is in this section of the book. But it's just the beginning...

The next two chapters cover shading and texture-mapping in sufficient detail to allow a good start. The code isn't as tight as Michael Abrash's, but who expects C code that's as good as the best tuned assembler? It's reasonably clear and understandable and it gets the right ideas across. I expect you could profile this code and move some of the inner loops to assembler and have code you could use at least for prototyping if not for the most demanding of products.

Now that the required graphical fundamentals are covered, De Goes moves onward to write briefly about morphing, collision detection, sprites, and AI (OK, computer opponents). These sections are sufficient to provide decent starting points without necessarily giving you something you can actually use right here, right now. But these subjects are often not covered at all in basic 3D graphics books, and these are a reason why this book deserves the title "3D Game Programming" instead of "3D Graphics Programming". The book completes with some Windows basics and a version of the demo program running under Windows. The Windows example uses CreateDIBSection for speed, which is probably a step below DirectDraw, but runs nicely in a small window on a medium speed Pentium.

So what's missing? My major objection is the extremely limited coverage of BSP trees and similar techniques for reducing calculation time for hidden surface removal (or visual surface determination, as De Goes calls it). To my mind, this is the real place to encourage creativity -- the real "cutting-edge", if you will. Since people like Michael Abrash, Chris Hecker, and John Miles (as a randomly selected sample of really good programmers) are now willing to share their expertise (and code!) with the rest of us mere mortals, it's easier to concentrate on the middle levels of the engines instead of the lowest levels, which means figuring out which polygons to display instead of how to display them as fast as we can.

If you're a 3D expert, you will probably not find anything you don't know in here, but if you're a 3D beginner, this book will give you just about all you need to get an excellent start.

AI Agents in Virtual Reality Worlds

Programming Intelligent VR in C++
Mark Watson
John Wiley & Sons, 309 pages, $40
ISBN 0-471-12708-6

So you want to write a computer game, and you don't know how to write the AI, er, computer opponent? Well here is the book for you. It's short (shorter than it looks, because it covers a demo program in text, RenderWare, OpenGL, 2D Windows, 2D Macintosh, and 2D X Windows flavors), and it gives you the basics of several AI techniques which are applicable to many game types and situations. OK, it doesn't cover everything -- if you want to write a chess program, this is NOT the book for you. But if you're interested in writing computer opponents for an action game or even some turn based games, here's a great place to start.

Mark Watson provides us with a nice overview of several techniques which have reasonably wide application in games by building a simple space trading game. Different pieces of the game use different programming techniques, including Neural Networks, Rule-Based Programming, and Genetic Algorithms. In the course of presenting this demo game, Watson also provides a nice example of how you might build a C++ class hierarchy to allow reasonably straightforward substitution of different AI types with minimal coding effort.

Space is short, but I also have to mention Watson's use of Booch 94 notation to provide overviews of his class hierarchy and design before providing the code -- the first time I have seen such usage outside of a book on an OOAD methodology. I was pleased to note that the diagrams DO convey information well when used by someone not interested in selling them.

Check this book out. It's one of those that I think will have at least one thing for everybody.

Copyright © Evan Robinson. All Rights Reserved.