Video Game Optimization (Anglais) Broché – 31 mars 2010
|Neuf à partir de||Occasion à partir de|
Les clients ayant acheté cet article ont également acheté
Descriptions du produit
Présentation de l'éditeur
Aucun appareil Kindle n'est requis. Téléchargez l'une des applis Kindle gratuites et commencez à lire les livres Kindle sur votre smartphone, tablette ou ordinateur.
Pour obtenir l'appli gratuite, saisissez votre adresse e-mail ou numéro de téléphone mobile.
Détails sur le produit
En savoir plus sur l'auteur
Dans ce livre(En savoir plus)
Commentaires en ligne
Commentaires client les plus utiles sur Amazon.com (beta)
The Introduction could have used a "prerequisites" section. The chapters on graphics, especially, use terms without defining them, e.g. "consider a game with a CPU animation bottleneck caused by having too many bones", p.91. General knowledge of graphics algorithms and terminology is definitely a prerequisite for this book.
The two first chapters serve as a good introduction to the book. The concepts of the Optimization Lifecycle, the Levels of Optimization and the Performance Budget certainly seem like a sensible way to structure - and talk about - optimization work. Chapter 3, The Tools, is necessary, but the section on vendor-specific tools is already slightly out-of-date (does not cover Parallel Nsight). This is inevitable, though - and generally the book is very up-to-date.
Chapters 4-10 is the core of the book. This is mostly very good - covering both CPU and GPU performance issues. The focus on "Holistic" optimization deserves special mention - it keeps the attention where it needs to be, which is on getting the overall game to run "fast enough" rather than needless cycle-optimization of code that's not on the critical path. That said, it's not perfect. Some parts feel slightly disorganized. For example, Chapter 8 has a section called "Locked Culling" - but there's no (explicit) mention of frustum culling in the preceding chapter. Similarly, including "Lights and Shadows" as one of the "Special Cases" seems quite strange. Also, I'd personally wished for more details - and further analysis of some of the performance results, but given that this is an introduction (and that the source is available) I can't complain too much.
Chapters 11-16 consists of various "bits and pieces" of varying usefulness. I got a lot out of the chapter on Managed Languages, which is an area I knew little about.
The chapter on Consoles felt unnecessary. It's short (10 pages), and all it really says it that with fixed hardware you can do more tricks. Perhaps focusing on one specific Console platform, or having a chapter on mobile game development (Android/iPhone) would have been more useful? Similarly, the chapter on GPGPU is too short to bring any real value. After an introduction to what GPUGPU is, there's only room for about a page of bottleneck-detection, and then it's finished.
Unfortunately, the book seems rushed, in that it's riddled with typos and minor errors.
A few examples:
* "such as OpenGL's GetLastError()", p.30. GetLastError is a Win32 API, glGetError is what's intended.
* "Consistency of frame rate, ..., is more important than the frame rate being too high.", p.33.. I assume "too low" is what's intended.
* Figure 10.1 and Figure 10.2 seem to be identical (except the x-axis is shifted). This is problematic since the text asks the reader to compare the graphs.
* "As you can see from this graph, ..", p.262. But there's no graph - only a formula.
There are also occasions where results are misquoted, e.g., "shows that it's about 100x faster", p.249, but the graph shows that it's about 6x faster. This is a shame since it reduces confidence in the numbers and figures quoted, which limits the usefulness of including these (otherwise very interesting) performance measurements in the first place.
Overall, this book has some good content, but it would have been easier to recommend if more of the bugs had been crushed before the book was published.
I had the chance to spend some quality time with Preisz & Garney's recent book "Video Game Optimization" a few weeks back, as I was trapped in a 14 hour plane flight. I hardly spent all that time with it, though I probably should have spent more. Instead, "Shutter Island" and "It's Complicated" (with bad audio) are four hours out of my life I'll never get back.
This book goes from soup to nuts on the topic: types of optimization, how to set and achieve goals, discussion of specific tools (VTune, PIX, PerfHUD, etc.), where bottlenecks can occur and how to test for them, and in-depth coverage of CPU and GPU issues. Graphics and engine performance are the focus, including multicore and networking optimization, plus a chapter on consoles and another on managed languages. Some of the information is in the "obvious if you've done it before" category, but critical knowledge if you haven't, e.g., the first thing to do when optimizing is to create some good benchmark tests and lay down the baselines.
There are many specific tips, such as turning on the DirectX Debug runtime and seeing if any bugs are found. Even if your application appears to run fine with problems flagged, the fact that they're being flagged is a sign of lost performance (the API has to recover from your problem) or possible bugs. I hadn't really considered that aspect ("code works even with the warnings, why fix it?"), so plan to go back to work with renewed vigor in eliminating these when seen.
I also liked reading about how various optimizing compilers work nowadays. The main takeaway for me was to not worry about little syntactic tricks any more, most modern optimizers are good enough to make the code quite fast.
There's very little in this book with which I can find fault. I tested a few terms against the index. About the only lack I found was for the "small batch problem", where it pays to merge small static meshes into a single large mesh when possible. This topic does turn out to be covered (Chapter 8), but the index has nothing under "batch", "batching", "small batch", etc. There is also no index entry for "mesh". So the index, while present (and 12 pages long), does have at least one hole I could detect. There are other little index mismatches, like "NVIDIA PerfHUD Tool" and "NvPerfHud Tool" being separate entries, with different pages listed. Typo-wise, I found one small error on page 123, first line should say "stack" instead of "heap", I believe.
Executive summary: it's a worthwhile book for just about anyone interested in optimization. These guys are veteran experts in this field, and the book gives specific advice and practical tips in many areas. A huge range of topics are covered, the authors like to run various experiments and show where problems can occur (sometimes the cases are a bit pathological, but still interesting), and there are lots of bits of information to mull over. Long and short, recommended if you want to know about this subject.
One little update: Carmack's sqrt trick, mentioned in the book on page 155, is dated for the PC. According to Ian Ameline, "It has been obsolete since the Pentium 3 came out with SSE. The rsqrtss/rsqrtps instructions are faster still and have better and more predictable accuracy. Rsqrtss + one iteration of Newton/Raphson gives 22 (of 23) bits of accuracy, guaranteed."
It does touch on all right points, but is almost completely devoid of detail in every area. It's basically just a lot of describing of what things ARE, with very little HOW or WHY. It'll tell you what vTune *is*, and what a cache miss *is*, and what a branch misprediction *is*, and what it means for something to be CPU bound vs GPU bound, but I found almost nothing in this book that I didn't already know. A lot was just definitions with very superficial explanations of what is going on behind the scenes.
What this book really needs are case studies at the end of every chapter. It needs before and after source code, an explanation of how a profiler was used to arrive at various conclusions and tune the code. Knowledge is useless if you can't apply it.
If you have a cursory understanding of the types of problems that arrive in optimization of graphical applications, then you might want to do a more thorough read of some of the pages fo the book before you make a final purchasing decision.
I gave it 3 stars because it's ok as one's first introduction to the subject. But if you have any practical experience, even if you just hear about other people talking about optimization, you might already know a lot of the material in the book.
I believe there is a lot of invaluable stuff in here for modern day programmers in particular, many of whom seem to know less than nothing about writing optimized code and have never had to deal with programming in assembler or at the register level or with only 48K total memory and have either self-taught without ever bothering to think about issues of speed and efficiency or went through one of those programs where OO interpreted languages are treated as the second coming and if you must 'go to the metal' and use C++ make sure to go totally, absolutely crazy in object-orienting your C++ code to the nth to the nth degree (don't get too frightened though, it's not a book that by any remote means says to avoid OOP).