Archive for the ‘Book Reviews’ Category

PHP Game Programming

Saturday, May 28th, 2005

phpgameprogramming1.jpgOccasionally you get halfway through a book and start thinking to yourself “when is the author going to tell me how to use this technology to create something cool?” With PHP Game Programming, by Matt Rutledge, I had that feeling right up until the last page. I wouldn’t consider myself an expert PHP programmer—not by a long shot—and Rutledge sure knows his onions from years spent as a web developer and database programmer, so as a beginning text to PHP this book is reasonably good. It’s aimed at beginning to intermediate developers interested in broadening their game development skills.

It is the coverage of game programming that causes the book to really fall down. The subject of PHP Game Programming would have been cutting-edge in 1994 when the World Wide Web was a new frontier and “on-line gaming” on the Internet consisted of dynamically generated pages using CGI Perl scripts to maintain the state. Today, the techniques presented are really nothing more than an interesting footnote of how not to create web-based games. Rutledge knows his stuff, but his book is nine years too late. Following the basic introduction to PHP, he develops a couple of HTML games—tic-tac-toe and a simple chess game driven by a non-relational database that stores the possible moves. Once the basics of PHP and HTML are covered, Rutledge moves on to develop “more sophisticated” games, such as an Artillery clone that lets you lob cannonballs at your opponent over a hill by setting elevation and power. A sort of thinking man’s version of “guess the number” that utilizes the third-party GD graphics library to generate images in “real time.” These images are served as each player enters their moves using a standard HTML form. I wrote an Artillery-like game for the unexpanded 2K Acorn Atom in 1978, and it was more interesting than Rutledge’s version. Mine even had animated explosions and sound—more than can be said for the version presented in this book. This isn’t to reflect on either Rutledge’s or my own programming prowess, just an observation of the suitability of the technology used to solve a problem.

In chapter 10, Rutledge demonstrates the use of sockets by creating a persistent server and dedicated client that he later develops this into what he terms a “massively multiplayer online game.” To be honest, though, I would be hard-pressed to consider using PHP to create a persistent server for any game that I expected to support massive numbers of players.

Of the exceedingly few cool features in the book, the section covering dynamic generation of Flash movies certainly stands out as something rather neat. This section provides a reasonable introduction to the concept, but then fails to develop it. Other than learning how to draw a few lines and boxes on the screen, no space is given to developing interesting games or even ideas that use the technique. I can only think of a few uses for this scheme: protecting Flash movies (there are other equally adequate ways of doing this, however) and streaming dynamic content from a database (though the newer versions of Flash include this capability). I’m sure there are some very cool ideas that could make use of this dynamic content generation, it’s a shame the author never explores any of them in the text.

As an introductory text to the PHP language, PHP Game Programming is adequate. If you’re looking to learn PHP programming, however, I’d personally recommend reading one or more of several PHP books published by O’Reilly.

VERDICT

PHP Game Programming

phpgameprogramming1.jpgAuthor: Matt Rutledge
Publisher: Premier Press (Thomson/Course Technology)
ISBN: 1-59200-153-X
Pages: 356

Rating

4 out of 10

Pros

  1. A gentle introduction to PHP programming.
  2. CD-ROM contains all the tools you’ll need to explore the examples.
  3. CD-ROM contains working source to all of the examples.

Cons

  1. Lacks punch in its coverage of games.
  2. The games presented were technologically backward in 1995.
  3. Needs more concrete examples of why you should use PHP for game development.

Game Coding Complete

Tuesday, March 29th, 2005

I have to state this upfront, I enjoyed reading this next book, but constantly kept wondering when the author, Mike McShaffry, would talk about the “Game Coding Complete” aspects that I was expecting based on the title. I picked the book up looking for Steve McConnell’s Code Complete (Microsoft Press) worked from a game developer’s perspective, but it never seemed to step up to the plate.

Game Coding Complete is a generic, non-API specific game programming book that attempts to educate the reader with the ins and outs of the game industry and what goes into making a game from a production viewpoint. With 563 pages, the book isn’t long enough to cover the entire development process in-depth, and many of the sections barely touch on what are essentially very deep subjects. And the chapters on 3D graphics and game engines are woefully inadequate.

From the beginning “What’s in a game?” chapter detailing many of the technologies and processes that go to creating a game from scratch, McShaffry covers 2D graphics, detouring in to a game’s initialization phase and the main loop, then sidelines to loading game data and caching it before returning, in roundabout fashion, to 3D graphics and game engines, confusing game engines and graphics engines at more than one point (probably more due to poor phrasing than actual confusion on McShaffry’s part). Beyond these few brief technological sections the book offers a glimpse at considerations you must pay to writing games for Microsoft Windows. The last three chapters wrap up the book by detailing how to debug games—a topic better served by other books on the market—scheduling and some of the pitfalls with that subject, and finally quality assurance.

Game Coding Complete meanders from one subject to another in no particular order, never being in-depth enough to really drive home a point; never insightful enough to give that “aha!” moment when the author points out the blindingly obvious that you should have known all along. The book offers very little to the seasoned professional even though the back cover clearly states “Intermediate to Advanced” as its target audience.

The book is littered with McShaffry’s experiences—dubbed “Tales from the pixel mines”—working in the game industry since 1990 where he started at Origin Systems, and it covers what I feel is his narrow experience and field of expertise, primarily DOS & Windows with the Ultima series of games. The anecdotes are amusing, and made the book enjoyable for me as I was often nodding knowingly—”Yup! Been there! Done that!”—as I read through it and they certainly helped keep the book from being dull and dry.

Game Coding Complete bounces around the technical areas so fast it’s more of an overview of what makes a game from a programmer’s viewpoint. It’s very difficult to explain the in-depth inner workings of a 3D engine in 50 pages or less—annotated with code—and still have it be useful to anyone. The book is neither a good process book nor a good programming book.
Unusually, this book contains no example CD containing the code contained in the pages; instead it offers a web site that holds the entire source, hopefully with working examples that are debugged. I wouldn’t know for sure, as when I went to the URL the web server gave me a timeout while attempting connection. The web site solution is good and bad. Good because you hopefully get the latest debugged version of the code. Bad, because in 5 years time, when you want the code again, the website may be long gone and there might be nobody at the publisher who knows what you’re talking about.

For an aspiring game programmer, it’s worth reading, but a seasoned developer of two or three years experience won’t take much away from this book.

This book review originally appeared April 20th, 2004 on Gamasutra, the official webzine of Game Developer Magazine that I write for regularly.

ABOUT THE AUTHOR

Mike McShaffry began his gaming career at Origin Systems in 1990. In his seven years there, Mike contributed variously as a programmer, lead programmer, director and producer to titles including Martian Dreams, Ultima VII, Ultima VIII, Ultima IX and Ultima Online, and consulted on many other popular Origin and Electronic Arts games. Since the Origin days Mike has worked on a wide variety of games; everything from Mattel’s Magnadoodle to Microsoft’s Bicycle Casino 2001. Mike co-founded Compulsive Development in January 200 and completed four casual games for Microsoft before being acquired by Glass Eye Entertainment. Mike’s responsibilities as Director of Software Development for Glass Eye include strategic management of programming and production.

VERDICT

Game Coding Complete

Author: Mike McShaffry
Publisher: Paraglyph Publishing
ISBN: 1932111751
Pages: 563
Rating

6 out of 10

Pros

  1. Amusing anecdotes.
  2. Easy conversational style that makes for a fast read.
  3. Useful to people curious about the games development industry.

Cons

  1. Has very little in-depth information.
  2. Attempts to cover too much ground in a single volume.
  3. Misleading book title for those expecting “Coding Complete.”

Beginning OpenGL Game Programming

Sunday, March 27th, 2005

beginningopenglgameprogramming1.jpgBeginning OpenGL Game Programming, by Dave Astle and Kevin Hawkins, offers a simpler introduction to programming with the OpenGL application programming interface (API) than many other introductory OpenGL books out there, including their earlier work, OpenGL Game Programming.

The book is an introductory text that will find a home with programmers who have worked exclusively either in the DirectX world of Microsoft Xbox and Windows or have only had opportunity to use another proprietary API such as RenderWare.

Beginning OpenGL covers most, but not all, of the current OpenGL specification and the OpenGL Utility Toolkit (GLUT) — a platform independent API making it easier to use OpenGL across a variety of platforms.

The authors have mostly concentrated on the beginning aspect, making the book a short, focused, and easy read — useful to accomplished programmers with no experience using a 3D API and those programmers coming to OpenGL for the first time — presenting an OpenGL overview and avoiding the tougher and deeper aspects beyond the fixed function pipeline.

While Beginning OpenGL attempts to remain platform agnostic, the primary platform focus is on the popular and dominant Microsoft Windows. All of the examples are engineered for this single operating system, with an entire chapter dedicated to the specific issues you’ll face when implementing a solution on a Win32 platform utilizing OpenGL. However, the authors have made every attempt, where possible, to make the information relevant to programmers developing for other platforms such as Mac OSX and Linux.

Astle and Hawkins wisely avoid non-OpenGL development topics, preferring to concentrate on their chosen subject; kudos to the technical editor for not succumbing to the temptation, which was so prevalent in early Premier Press books, of including the proverbial kitchen sink. Having said that, you can’t write a book about game programming without briefly touching on other subjects like the game loop, user input, and audio.

While the book is pitched as a introductory text, it is aimed squarely at programmers capable of putting together non-3D applications. Both authors are seasoned professionals: Hawkins from the hard-core simulation sector and Astle from the game development field with a lot of cross-platform experience. They make no bones about assuming you know your way around a compiler, C++, and the basics of the math used in 3D graphics. The authors haven’t assumed you know what a projection matrix is, or how to handle a camera frustum, but they are expecting you to know how to add two vectors, or multiply two matrices.

The CD contains all of the expected source code from the book with accompanying Microsoft Developer Studio projects, an extension library that simplifies working with OpenGL, and eight bonus chapters that did not make it in to the printed book. These bonus chapters were a complete surprise that are outside of the core of the book.

Congratulations are in order to the book’s editor for realizing that they didn’t quite fit with the central theme, but including them anyway as “optional” material. These chapters cover some not so “beginning” subjects such as quadrics, curves, and surfaces, plus “off-topic” chapters discussing how to utilize DirectAudio and DirectInput; I’ve already stated that the book is very Microsoft Windows centric to begin with. There’s also the obligatory, relatively coherent math primer, which also covers some basic 3D graphics theory, e.g. texture mapping and lighting. I’m sure I’ve see this primer chapter in another Premier Press book so it might be one of their boiler-plate chapters.

The CD also includes a bonus first-person shooter game for you to play — with full source code and a chapter on how it was created — that demonstrates most of what was covered in the various chapters such as fog, animated meshes, view transformations, camera movement, and 2D text.

Since Course Technology has been steering the publication of Premier Press’s books, they have continued to move from strength to strength. With the publication of Beginning OpenGL Game Programming, the publisher is truly showing a strong future commitment to the game developer market, along with a high level of service to individual game developers by issuing quality publications.

Beginning OpenGL Game Programming is a perfect introduction to developers not yet up to speed on OpenGL development issues.

Buy this book from Amazon.com now!

ABOUT THE AUTHOR

Dave Astle has been programming games professionally for several years,working on titles for Microsoft Xbox, Sony PlayStation 2, Nintendo GameCube, PC and wireless devices. He is a lead engineer in the Gaming and Graphics group at Qualcomm, Inc. and is the cofounder and executive producer of GameDev.net. He has written or contributed to many game development books and has spoken at industry conferences, including the Game Developers’ Conference.

Kevin Hawkins is a lead software engineer at RAYDON Corporation where he designs and develops training simulations for a variety of customers, including the U.S. military. Kevin is the cofounder and CEO of GameDev.net, the leading online community for game developers. He holds a master’s degree in Software Engineering and a bachelor’s degree in Computer Science from Embry-Riddle University.

VERDICT

Beginning OpenGL Game Programming

beginningopenglgameprogramming1.jpg Author: Dave Astle and Kevin Hawkins
Publisher: Premier Press (Course/Technology)
ISBN: 1-59200-369-9
Pages: 310

Rating

7 out of 10

Pros

  1. Stays very true to the core subject.
  2. Attempts to remain OS agnostic where possible.
  3. Lots of bonus material on the CD.

Cons

  1. Concentrates on OpenGL for Microsoft Windows
  2. Buried gems on the CD that many people won’t be aware of unless they buy the book.
  3. Covers only the fixed function pipeline of OpenGL.

Buy this book from Amazon.com now!

Core Techniques And Algorithms In Game Programming

Sunday, March 27th, 2005

052007-2225-coretechniq1.jpgCore Techniques and Algorithms in Game Programming is one of those rare programming books that you really can judge by the cover.

The author, Daniel Sanchez-Crespo—a regular contributor to Byte (Spain), Gamasutra and Game Developer—did an excellent and thorough job in the 800 pages that he had to work with. Throughout the book, even though English is not the author’s native language, he is clear and concise with every aspect of the technology he covers.

This is actually one of the books I recommend for students on my game programming courses at the Academy of G.E.T. in Hollywood—confirmation, in my mind, of the book’s intent of being a textbook.

Sanchez-Crespo begins with a brief chronology of games, moves on to the very basics of game architecture and the process of programming, then ramps up from there, thoroughly examining every aspect of the technology that makes a modern game, including the oft-neglected “input/update/render” loop. He doesn’t hang around either: he jumps feet-first into the common data structures (lists, queues and stack) and the not so common (deques, graphs and trees) that you will encounter, and examines what the Standard Template Library (STL) provides off-the-shelf. Sanchez-Crespo recognizes the power of the STL but also concedes that not all games should trade ease of implementation for degradation in speed.

Graphics plays a large part in the book, with several chapters dedicated to 2D and 3D rendering, along with the effects achievable in each area. 3D is a large subject and suitable for an entire volume all to itself, and Sanchez-Crespo performs a stellar job keeping each chapter tightly focused on the particular subject, introducing each technology at the proper pace.

3D is further divided to include indoor and outdoor rendering systems using chunked terrain rendering and portals of all types. Trailing the generic 3D sections is a large detailed detour in to character animation that covers skinned meshes and kinematics (both forward and inverse), as well as proper facial and limb animation systems.

The second largest area of this book is AI. Sanchez-Crespo really knows this subject. Outside of a dedicated book on game AI such as AI Programming Wisdom, this book offers some of the most comprehensive information on the subject delving into single unit and multiple unit navigation and coordination, using core AI techniques such as finite state machines and rule-based systems. The AI section alone makes owning the book well worth the shelf space.

Some of the shorter chapters cover networking, scripting, performance tuning, DirectX and OpenGL and their differences, an overview of the math required to get to grips with modern games technology, and finally the obligatory “further reading” section.

Just so you don’t get the impression this book is all hardcore programming, Sanchez-Crespo includes a chapter covering the cinematic aspects of games—something everybody involved in 3D games should learn, though it’s too brief for my liking. There’s even a chapter on design patterns, what they are, and their usage, including usability patterns (how the user interacts with the user interface)—a rare detour for a programming book.

Because the book is mostly API agnostic, it’s not going to suddenly go out of fashion like many API or narrow-focus books based on a particular technology.

Any book on general game programming is going to have to be brief in some areas simply because the domain is so broad. Sanchez-Crespo does a good job, covering so much in such a brief space you wonder how he got it all in.

Any subject you can think of pertaining to game programming is in this book, which is its strength and weakness. To do the subject justice, the book needs to be longer, and to the author’s credit he did the best job in the 800 pages provided. It’s a strong foundation book for aspiring game developers and there’s content in there for experienced developers too. It’s also a book you can give to a not-so-technical game designer and have them read through it to get a good foundation in many of the techniques and technologies that are being implemented by games programmers in studios all over the world. This book will definitely have a long shelf life.

This book review originally appeared March 3rd, 2004 on Gamasutra, the official webzine of Game Developer Magazine that I write for regularly.

ABOUT THE AUTHOR

Daniel Sanchez-Crespo Dalmau is a proffesor at Pempeu Fabra University in Barcelona, where he serves as founder and director of Europe’s first Master’s Degree in Video Game Creation. He has been teaching game programming for over six years, giving conferences all over Europe. He has been a course reviewer for SIGGRAPH and a member of the advisory board for ArtFutura. He is a frequent contributor to Byte Magazine Spain, Game Developer Magazine, and the Gamasutra web site, publishing over 40 articles. He is the founder of Novarama, and independent studio that focuses on creating innovative forms of entertainment for anything from PCs and consoles to cell phones and handheld devices.

VERDICT

Core Techniques And Algorithms In Game Programming

052007-2225-coretechniq1.jpg Author: Daniel Sanchez-Crespo
Publisher: New Riders
ISBN: 0131020099
Pages: 912

Rating

10 out of 10

Pros

  1. Covers a lot of technical areas in-depth.
  2. Author explains the areas very carefully.
  3. The book contains a lot of information, not code dumps.

Cons

  1. Could use extra volumes expanding on the information presented.
  2. Some sections such as input & sound are far too brief to be useful.
  3. Lack of an accompanying CD-ROM of code and examples.

Buy this book from Amazon.com now!