Game Programming Gems


Compras Nikon
Bluetooth
Aimed at the working (or aspiring) Visual C/C++ game programmer, Game Programming Gems contains over 60 programming tips that have been gathered from more than 40 working game gurus. It you want to build your own games or are interested simply in how games work, this text provides an intriguing glimpse into how the pros create state-of-the-art 3-D animation.

The guiding principle in this book is to publish the best available tips for game programming; most of these fit into 10 pages or fewer. But don't let the efficient presentation fool you; almost every one of these tips will be invaluable to any serious game developer.

Early sections concentrate on techniques for creating more maintainable, faster code. A guide to using scripts for data-driven game modules and techniques teaches you better resource management (like using handles). A quick-start tutorial to the Standard Template Library (STL) will help you learn how to use these fast collection classes in your code right away. Several contributors show off strategies for better game debugging and profiling--there's even a set of classes that can provide onscreen feedback during testing.

The mathematical underpinnings that are required to do leading-edge 3-D graphics processing--including the use of quaternions, instead of matrices, in certain calculations--also are discussed. (One section looks at simulating water surfaces.) And artificial intelligence (AI) techniques for games--like Finite State Machines (FSMs), fuzzy logic, and neural networks--are explained. (The extremely cool flocking algorithms, which will let you add the behavior of birds or fish to your next game level, are especially appealing.)

Over 20 techniques for doing work with polygons (a staple of representing 3-D virtual worlds) are laid out, too. You'll learn a variety of important concepts, such as collision detection, working with key frames, better skinning for character animation, and realistic terrain generation (including fractals). A discussion of pixel effects, with some cutting-edge ways to add more realistic lighting and shadows to your games, closes the discussion. (One of the more exciting sections shows you how to simulate glass objects within 3-D scenes.)

With its leading-edge material on the algorithms that are used by the competition, Game Programming Gems will be a virtual must-read for anyone who works in the game industry. With code samples that are geared to OpenGL and that should run on both Windows and Linux, this book will help developers hone their game-programming skills. --Richard Dragan

Topics covered:
  • Tips and strategies for game developers
  • Data-driven design and scripting languages
  • Object-oriented design primer
  • Using Visual C++ templates for faster math calculations
  • Resource-management techniques (Singleton patterns, resource handles, and tips for fast data loads)
  • The C++ Standard Template Library (STL) for games
  • Bit arrays
  • Network protocols for online games
  • Using asserts and profiling for games
  • Random numbers
  • Interpolation methods
  • Equations for rigid body motion
  • Using polynomial approximations for trig functions
  • Implicit Euler integration
  • Wavelets
  • Simulating water surfaces
  • Quaternion vs. matrix calculations
  • Artificial-intelligence (AI) techniques for gamers
  • Sending messages
  • Finite State Machines (FSMs)

  • Game trees
  • Pathing strategies (including A* and 3-D pathing solutions)
  • Flocking algorithms
  • Introduction to fuzzy logic and neural networks
  • Techniques for faster graphics with polygons (and 3-D fundamentals)
  • Loading vertices faster into OpenGL
  • The vector camera
  • Camera-control strategies
  • 3-D collision detection
  • Multiresolution maps
  • Distance calculation
  • Object occlusion
  • Working with octrees
  • Interpolating between 3-D keyframes
  • Skinning techniques
  • Terrain-generation algorithms (including fractals)
  • 2-D lens flare
  • 2-D sprite effects with 3-D hardware
  • Techniques for more realistic lighting
  • Shadows and texturing
  • Simulating glass and liquids in games

  • 1 Very useful.
    I've found this book to be very useful in game programming. The variety of articles an concepts covered is very vast. In fact, that is probably the cause for its only (in my opinion) shortcomming - that many of the articles aren't long or complete enough. An excellent book if you're looking for an introduction to many different concepts.
    2 Do NOT buy this book without actually reading a chapter or
    two -- very carefully -- in a bookstore. I'm afraid you'll be disappointed. You will be tempted to buy it at first because the book is well made -- it's cute to look at, printed on acid-free, thick paper, font selection is very good, pleasing and clear. Don't fall for these mechanical attractions! Evaluate the contents.

    It's truly not a book; it's more of a collection of perfunctory commentary to some source code on the disk (of unknown quality and/or usefulness.) The writing is mostly abhorrent (with the exception of the sections written by LaMothe and another guy whose name escapes me at the moment; Lamothe is good and can write, not only program); a lot of stuff is simply not explicated, the selection of the actually printed code is haphazard and unhelpful vis-a-vis the text. Since the quality and usefulness of the stuff on the disk is anyone's guess as well (and based on the text, it's nothing awesome), I don't think this book deserves the acclaim that it seems to get.

    Several chapters are wasted on annoying bs about hungarian notation, development process (a la Code Complete), absolute banalities about using STL (very superficial, w/o any linkup with games programming -- just buy an STL book if you need to learn it, you won't get anything out of the Gems book itself.) There's a section on templates where the writers seemed more concerned with hugely impressing the reader with the supposedly latest-and-greatest template tricks than offering something useful (look for matrix classes -- they propose the stuff as some kind of generic mechanism (thus, templates), yet what they do will be totally useless for more than 3x3 matrices, and those can be simply coded manually if you need this kind of optimization, which is inlining and unrolling, really -- and keep in mind that it's only small loops that can be gainfully unrolled coz if it doesn't fit in the cache... you know where I'm getting to... moreover, with branch prediction, normal loops may perform better than when unrolled; at any rate, a regular, less-fashionable approach could result in simpler code; but they gotta show off their templatizing skill, wow, I'm impressed, another piece of pompous nonsense suitable for the C++ Report... too bad it's useless practically for 4-and-above dimensional matrices. Generality that doesn't apply generally... an overdesigned particular case, that's what it is.)

    Most other chapters are written in a very typical halting, disjointed, and ungrammatical geeky-speak, and I don't mean terminology or technicalities, I mean an irritating inability of most contributors to organize and articulate their thoughts. Like I've already mentioned, it's printed on thick paper, if printed on normal paper, it'd be half the size. The binding is not good, my copy has already fallen apart, and it's not that I use it all the time.

    The only potentially fruitful side of this book is bibiography; iow, you can use it as an catalogue of diverse methods used in programming, and when you're interested in something, follow the bibliography in order to really learn about the topic. The bibliography is fairly extensive, obviously recent; includes many web-sites with papers, etc. So that's good of course.

    Overall though, the book is mediocre and too expensive for what it is. I would't buy it for more than $. 'course I've already bought it for more, but you don't have to. My opinion is, it's a clear thumbs down.


    3 May find something useful in it
    I am for the most part a 2D DirectDraw programmer with some experience in DirectSound and DirectMusic. I only use these APIs and only with Visual C++ 6.0 Standard in Windows XP. So, I cannot sit here and write a lengthy review about how cool I think all the aspects of this book are when I wouldn't use most of the information covered in the book with my own 2D graphics engines. However, there was still a few VERY good articles in this book that can be used by either 2D or 3D programmers, so I'll talk about those because I know them and have used them.

    The first really good chapter I found is 1.9 "Frame Based Memory Allocation" by Steven Ranck. Teaches you a trick on how to completely eliminate memory fragmentation in your games and speed up memory allocation during run-time, by never using memory allocation in run time. Instead, allocating memory at load time and using that allocation throughout various parts of the program until the program exits. Pretty cool and fast.
    But I cannot skip the fact that all the articles in the first section can be used in any type of game (2D/3D) but I haven't gotten as much use out of them yet. There are 14 chapters in the first section total.
    Once you get into the section on mathematics, you had better be a math wiz or at least proficiant.... Chapters like "Polynormal Approximations to Trigonomic Functions" means nothing to a 2D programmer like myself. Same goes for the chapter, "Matrix-Quaternion Conversions".
    Section 3 goes into AI programming. The only chapters I have really read thoroughly is 3.1, "A finite-state machine class" by Eric Dysband, and 3.3, "Basics of A* For Pathfinding" by Bryan Stout. I found this chapter very useful and the book CD-ROM comes with pathfinding examples written by Bryan that demonstrate what he is talking about. Really useful to me!
    Section 4 is completely useless to me because it's all about 3D programming. In fact the section is titled "Polygonal Techniques" and contains 19 chapters.
    Section 5 is titled Pixel Effects and I really haven't gotten much out of this section unfortunately.

    So as you can see, no matter what kind of programmer you are, you can probably get at least one really good tip out of this book. I didn't list all the useful chapters in the book, just the ones that were useful to me. When you read through it, you are likely to find different ones that are just as useful to you.


    4 A fantastic "a la carte" tool kit
    Written by a lot of the top professionals in the industry, each section in this book is like sitting in on a roundtable session at the Game Developers Conference. The contributors here are not giving you just theory that you can think about... they are providing TOOLS that they use in a manner that makes it easy for YOU to use in YOUR code.

    The only drawback is that there is so much covered in so many different disciplines. You are buying the graphics and networking sections even if you aren't doing graphics and networking. The only way around this would have been to split the books by area... such as Charles River Media did with the "AI Wisdom" book. However, if you cover a lot of areas in your game programming, this book will touch on all of them!

    I am personally using the "State Machine Language" by Steve Rabin (Nintendo of America), the gem on implementing a simple singleton class, and will be doing a variant on Steve Woodcock's "flocking" gem. Could I have done these myself? Possibly. However, by using the code on the CD and dropping it into my game project, I have recouped the purchase price of the book at least 1000:1! That's not a bad ROI.

    If you are a game programmer, the book will be of value to you. Should you but it? Ask yourself how much YOUR time is worth... if you can save yourself hundreds of hours for ~70 bucks why even hesitate?


    5 Shiny gems for all levels of game programmers
    This book is a collection of articles with game programming as the common theme. It does not cover game design so don't get disappointed about this. The articles cover many of the subjects concerned in game programming and are divided into the following categories: General Programming, math, AI, Geometry and Pixel Effects.

    Some articles are introductory articles in their field and some are true gems that actually give information that cannot be found anywhere else. The introductory articles are good for those who don't know a field and allows an easy way to learn about it - one that gave me real new insight is Pete Isensee's introductory article about metaprogramming. Of course, if you already are an expert in the discussed field then the article will not bring anything new.

    The articles are of highly varying quality. Some are excellently written and some not worth the paper they are written on - but all in all this book is a must-have for any game programmer.

    The articles are also targeted and different reader groups. Some are pretty and easy to understand while others require advanced college math and physics to follow. To beauty of this is that beginners can grow with the book and understand more and more of it as they learn more - while getting an idea of what the field of game programming has to offer.

    This book cannot be recommended as a book for beginning programmers or people new to game programming. They should read other books first. However, for the serious game programmer it can be highly recommended.

    If the book only contained its good articles I would have given it 5 stars, but as it stands now it can only get 4.

    Jacob Marner, M.Sc.
    Console Programmer, R&D
    Deadline Games


    6 The Best of the Worst
    This is seriously the worst book I own, I'm not saying that this book is bad, I've just seen better. I don't mind owning it, but if I would have had more time to glance it over in the book store, i definetly wouldn't have paid what i did for it, ... If your looking for a learning book, than this isnt for you, if your looking to learn a thing or two, and i really mean a thing or 2(since thats about all you'll learn), then go ahead and blow your hard earned money on it. ... this book could have been better. Imagine if you gathered a few online articles on different subjects, printed em', slapped a hardcover on it, and titled it 'Game Programming Gems', you would essentially have this book.
    7 The Guide
    Before you buy any "I want to be the next John Carmark/John Romero/Sid Meyer/Roberta Willians/Rick Goodman/Big Game Guru" book please check this book. Clever and deep reading removes many spots from "conceptual idea" to "ready to market game"

    Definetely recommended.


    8 More Than Games
    My cohorts and I develop real time control software for embedded applications running on microcomputers with minimal resources. It turns out that many of the "gems" in this book are directly usable. As a team building exercise and to increase our software savvy, we take turns presenting mini-seminars on software topics. This book provides many such topics. Recommended, and it's fun.
    9 Lots of useful little ideas
    The gems in this book cover a good variety of topics with a spread from beginner to advanced complexity. While you won't use them all at the same time and you may already know some of gems, the book is a valuable addition to any game programmer's library for both reference and the occasional new idea.
    10 Well Organized, but stale
    I thought it was well organized, but most of the articles/topics can be found on the internet.
    11 Gems among Coal
    There are some very good articles in this book, and there are also some bad ones. I strongly recommend flipping through a copy on the shelf on the articles that have caught your attention before you make a decision to buy.

    Some of the articles represent only introductions to concepts and won't be anything new if you already have a good text on the subject. It was my feeling most of the AI topics were this way.


    12 Good, but most 'gems' are just colored glass
    Game Programming Gems aims to follow in the footsteps of the excellent Graphics Gems series, except with articles that apply specifically to game programming rather than focusing solely on graphics.

    There are some excellent articles in here, but unfortunately many are just very basic introductory material to their respective subjects. They do not have the depth and certainly are not sufficiently groundbreaking to be called 'gems', especially in comparison to the gems presented in Graphics Gems. Many are pretty obvious and can be readily found with even a minimal amount of internet research.

    That said, the book is still a worthwhile purchase because of convenience; it gathers all of the information on a subject in one place. Still, I'd like to see more real groundbreaking articles, and fewer overviews of technology. Hopefully Gems II (which should be released soon) will remedy this situation.


    13 Good, but most 'gems' are just colored glass
    Game Programming Gems aims to follow in the footsteps of the excellent Graphics Gems series, except with articles that apply specifically to game programming rather than focusing solely on graphics.

    There are some excellent articles in here, but unfortunately many are just very basic introductory material to their respective subjects. They do not have the depth and certainly are not sufficiently groundbreaking to be called 'gems', especially in comparison to the gems presented in Graphics Gems. Many are pretty obvious and can be readily found with even a minimal amount of internet research.

    That said, the book is still a worthwhile purchase because of convenience; it gathers all of the information on a subject in one place. Still, I'd like to see more real groundbreaking articles, and fewer overviews of technology. Hopefully Gems II (which should be released soon) will remedy this situation.


    14 Definite must-have
    There are many game programming books out there written for beginning to intermediate programmers, but unfortunately, advanced information is harder to come by, being scattered across web sites, magazines, technical journals, and in small sections of non-game-specific books. Game Programming Gems finally provides a single place where you can find explanations of advanced techniques that are actually being used in modern games.

    This book covers a broad range of topics and is written by many authors, so naturally, there will be some sections that are more useful to you than others. Overall, though, I think you'd be hard pressed to find a game programmer who wouldn't benefit in some way from this book.

    My only minor complaint is that although the vast majority of the chapters include sample code, not many include a complete demo. Although you can easily create your own project to dump the sample code into, it would have been nice to be able to immediate launch a demo as I read each section.

    That one shortcoming isn't enough to stop me from giving this a 5 star rating. I highly recommend it to any intermediate to advanced game programmer who wants to take it to the next level.


    15 Great
    What I did was read this to teach me fundamentals of Game Programming, and then read a directX 8 book to Implement it. Great
    16 Great Collection of Graphics Techniques
    Mark Deloura seems to really know 3D. He has put together a great collection of techniques that every game programmer should know. The topics covered are very broad, containing input from many contributers in the field of game programming. The book contains lots of example code and useful math formulas.
    17 Game Programming Gems, a Game Programmer?s Bible
    What a book! Whether you are just getting around to game programming, thinking about it, or already doing it, this is one book that needs to be on your library shelf. This is a one of it's kind book that deals with some of the most frustrating topics their can be in game programming.

    Simulating water and liquids, AI techniques, messages, lens flares, lighting and texturing, body motion equations and randoms and more are talked about in this book, and the best thing is that it is explained and exampled within a few pages (most of the time).

    This is like taking most of the articles out their on the net and sticking them inside of a book and selling it, except that everything is explained better, and nicer, for beginners to advanced programmers. If you even THINK about game programming, you'll want to pick this book up! Can't wait for Game Programming Gems II !


    18 Amazingly helpfull book!
    Ive been programming with OpenGl for quite some time, entirely self-tought, and I have got to say, this book easily beats the rest into the ground. Although heavily geared toward advanced programmers, it is an invaluable resource to those who want to learn how to do convincing effects and programming strategies. Another word of warning is that the Mathematics chapter requires, for the most part, a good mathematical background, but it is explained clearly. Some truely mind-blowing techniques are discussed and explained in this book, such as underwater caustics and glass simulation, as well as a few things that made me slap my head to my forehead and say, "Duh! Why didn't I think of that!", like the chapter on ground plane shadows. An incredibly good book on the subject, but definately _not_ for beginners. I highhly recomend it.
    19 An instant classic!
    This book is a must-have for all who are serious about game programming. The book is a collection of some choice articles concerning game programming. One warning, however, is that these articles were written by professionals to (for the most part) professionals. If you are just starting out in the game programming field, be warned that the purpose of this text is not to teach you how to program games, but rather techniques for producing effects, good AI, etc. A better book for the beginner would be Tricks of the Windows Game Programming Gurus by Andre LaMothe.
    20 Add another book to the close bookshelf
    This book has finally replaced Graphics Gems I as the book that spends the least amount of time on the bookshelf. Everybody around the office who has spent time with it loves it. Well worth the cost.
    21 Good, but inconsistent quality
    This book has a lot of good stuff, but is far from perfect:

    (1) The table of contents are off by one page between p.161-217 (2) The "Interactive Simulation of Water Surfaces" gem describes calculating a mesh point from its four neighbors, to the top, bottom, left, and right. However, this doesn't give a very circular ripple; it's almost square with rounded corners. To fix this, the four diagonal neighbor values should be used as well, scaled by the square root of 2. (3) The "Wavelets: Theory and Compression" gem does a good job of explaining basic Wavelet theory, but does not give any information about how to do compression, except to mention it is possible. This is hardly a gem, it is more an introductory article. Overall, a good book, but some of the gems are not as useful as others.


    22 A fine collection of papers
    As a software engineer, with a strong mathematical background and a masters level acoustics course under my belt, I found this book to be an intersting look into the (pure mathematical) neural systems and the (applied mathematical physics engines) that drive today's gaming industry. As an engineer I know that I can not do everything in this book, but I know that it is equally important to understand what is expected of a real-time engine so that I may find colleagues with those specialties. Gaming is big business,and Game Programming Gems is a great place to learn, and encourage learning.
    23 Who is this book for?
    Good for someone with a LOT of Game Programming EXPERIENCE ( Not me ). Most of the chapters in this book are articles (good articles ) taken from magazines. I just find it funny that so many reviews of this book are so good. I think the author had too many journal articles floating around his desk, so he stapled them together (at random) and made this book.
    24 Don't Waste your Money!
    First Let me mention; I have a Degree in Computer Engineering and as a Senior in college, I took a class in Computer Graphics Using Open GL which required a solid understanding of Linear Algebra. I just bought this book and I am very disappointed. The book is a composition of many articles written by 40 authors. It mainly focuses on the theory behind game programming ( Brush up on your calculus and Linear Algebra...you'll need it! ). I read the book's sypnosis prior to purchasing this book and I don't think it adequately reflects the contents of the book. Also, the cover is mis-leading. This cover is just a teaser to entice you to buy the book. There is no referenced source code or executable for the front cover graphic. Indeed this cover is a game that will be released in the future. If you want to learn how to program video games using Open GL, find a better book. ( the openGL programmer's guide is a good start). As far as Game programming Gems, it's more like a ...um forget it. I intend to get my $75.00 back for this book.
    25 Fantastic! Reminds me of why I love programming games...
    Wonderful adaptation of the popular Graphics Gems series - every chapter in this book leaves me wanting to whip up some code to test out what is taught. Very technical subject matter that spans a wide variety of topics from AI to 3D to physics. Most highly recommended game programming book I've yet seen -- I'm already waiting anxiously for GPG II, III, and IV :).
    26 A First-Of-Its-Kind Introduction to Game Programming
    This book is hands-down the best book yet published on game programming. I have yet to find any other book that begins to approach the excellence of Game Programming Gems in terms of the breadth and depth of the subjects covered.

    GPG will serve as an excellent introduction to a broad variety of game programming techniques for those new to the industry, and an invaluable desk reference and for more experienced game developers. As a 7-year industry veteran, I can't count the number of times the techniques in this book would have proven useful in the past.

    Of particular interest are Steve Rabin's excellent chapters on the A* algorithm, the cornerstone of (most) pathfinding in computer games. These chapters go far beyond the explanation of the algorithm itself and serve up a host of rare and valuable insights for getting the most out of your pathfinding in an actual game environment.

    I have no doubt that this book will have a significant impact on the state of the art in the game development community, and one can only hope that this book is only a hint of what's to come.


    27 Top Notch: The BEST book I've ever seen on Game Programming
    Relevent, real and jammed with good info. Good stuff for beginner and experienced people alike. Written mostly by guys who are actually in the biz as opposed to guys who just write books. Two words: Buy It! Puts all other game books to shame.
    28 Superb, A great resource
    If you're in the Games industry or you want to get in, this book is definitely a must have. This is a smart book by really smart authors - I know, I've worked with a couple of them (Y.King and J.Fretias at EA Canada). This book will prove invaluable for future projects. Every section of the book has something useful, from 'Programming Techniques', 'Artificial Intelligence' to 'Pixel Effects' and its all 100% revelant. I look forward to the rest in the series.
    29 Wow, wow, wow
    What a fabulous book. As a relatively new game developer, I continue to find this book to be invaluable. It seems like almost everything that I need to know is at least touched on. It's already saved me a great deal of time by teachning good software engineering practices and program structures -- stuff that would have taken me weeks of failure to learn on my own.
    30 Uncovering a GEM.....
    Wow...this book covers so many areas. In AI alone, it covers A*, an FSM machine class, Game Trees, 3D movement and pathfinding, flocking, fuzzy logic, and a neural-net primer. It contains other great algorithms on real-time shadows, real-time terrain generation, interactive simulation of water surfaces, wavelets, and many other topics. Definitely a good book to own if interested in game programming or 3D graphics in general.
    31 Very good and worth every cent!
    Well, the fact that the Contents alone are 13 1/2 pages long should give you a good hint that this book covers a LOT of stuff! Although it doesn't go into great depth in some places, it does tell you what you need to know to get what it does cover done, and has plenty of code, along with descriptions of what the code does, mathematical formula's, illustrations where necessary, etc.. One thing that should be noted about this book on Amazon, is that the "table of contents" link on the left is pretty inaccurate, the book covers a lot more than what's listed there.

    Overall, I have to say that this book will save me a lot of time and headaches, and I recommend it to anyone who is also in the industry, or who wants to be. It's not that the stuff the book covers can't be found elsewhere, or on the web, but it's all in the one place, so it saves time. You should also remember that this is only the first book in what will be a series, just like the Graphics Gems series, so there's more to come, and I plan on buying them all if they're anything like this one.


    32 Beat My Expectations
    Jam-packed with info. Some great AI articles. A must have.
    33 Beat My Expectations
    Jam-packed with info. Some great AI articles. A must have.
    34 fuzzy logic
    The whole book is a great resource, my fav chapter being the ones on fuzzy logic and AI. Should you ever need to learn about fuzzy logic, or just need a refresher course, the article by mccuskey is a great place to turn. The examples are clear and the explanations are clear and witty. Who knew such a subject could be made fun to learn?
    35 What are you paying for
    Despite of the book ambicious objectives of being a compreensive guide to game project and programming techniques, there are some chapters(for example AI and Dead Reckoning alg) that are so valuable that one should consider investing his/her money on it!

    Sunday, 06-Jul-2008 18:39:50 CDT
    Quote of the Day:
    
    
    All science is either physics or stamp collecting.
    
    -- Ernest Rutherford

    The generation of random numbers is too important to be left to chance.