Optimization for Video Games
by Eric Preisz · 02/22/2007 (7:25 pm) · 8 comments
I'm working on moving some of what I have been writing to a web page for everyone to read. I really enjoy to making games run as fast as possible.
A lot has changed since Mike Abrash wrote his book, the Zen of Optimization, back in 1994. He writes a lot about using assembly to get the most out of your CPU, since processing, not memory, is usually the bottleneck. Today, assembly won't fix the most common bottlenecks such as drivers, gpu stages, and busses. We can do thousands of operations during the time that it takes to recover from just one cache miss. We can do millions of operations in the time it takes to fetch paged system memory from the hard drive.
Here's a preview of what the web-site is about.
-When optimizing video games, every PC is at a minimum dual core (GPU & CPU)
-Optimizing the incorrect core, or parallel stage, can result in zero FPS gains
-Optimizing anything other than the slowest bottleneck or hotspot is not an efficient use of our time
-Optimizing hotspots smaller than 8% is waste of time
-Optimization is NOT something we do ONLY after we write the code.
-You can make a slow game in OpenGL or DirectX. An API is the interface to the hardware. This sight will focus on the hardware.
-Big "O" notation works great on paper, today's algorithms run on complex hardware. My hardware bubble sort is faster than your software quick sort.
It's only about half written, but I have content for every section (slides, etc.). Hopefully I will be able to convert everything over the next six months or so. I also want to create drill down areas to cover the topics that I assume you already understand. Over time, I hope the information will be more and more valuable as others provide feedback. Any feedback is appreciated. I wasn't too worried about grammar so don't ping me too hard on my writing. I've not real learned on using that part of my brain yet...
http://www.vertexbuffer.com
A lot has changed since Mike Abrash wrote his book, the Zen of Optimization, back in 1994. He writes a lot about using assembly to get the most out of your CPU, since processing, not memory, is usually the bottleneck. Today, assembly won't fix the most common bottlenecks such as drivers, gpu stages, and busses. We can do thousands of operations during the time that it takes to recover from just one cache miss. We can do millions of operations in the time it takes to fetch paged system memory from the hard drive.
Here's a preview of what the web-site is about.
-When optimizing video games, every PC is at a minimum dual core (GPU & CPU)
-Optimizing the incorrect core, or parallel stage, can result in zero FPS gains
-Optimizing anything other than the slowest bottleneck or hotspot is not an efficient use of our time
-Optimizing hotspots smaller than 8% is waste of time
-Optimization is NOT something we do ONLY after we write the code.
-You can make a slow game in OpenGL or DirectX. An API is the interface to the hardware. This sight will focus on the hardware.
-Big "O" notation works great on paper, today's algorithms run on complex hardware. My hardware bubble sort is faster than your software quick sort.
It's only about half written, but I have content for every section (slides, etc.). Hopefully I will be able to convert everything over the next six months or so. I also want to create drill down areas to cover the topics that I assume you already understand. Over time, I hope the information will be more and more valuable as others provide feedback. Any feedback is appreciated. I wasn't too worried about grammar so don't ping me too hard on my writing. I've not real learned on using that part of my brain yet...
http://www.vertexbuffer.com
About the author
Manager, Programmer, Author, Professor, Small Business Owner, and Marketer.
#2
02/22/2007 (11:22 pm)
Sounds awesome, i'd love to see torque optimization develop further.
#3
I'd love to have a resource that looks at the modern issues in the same vein. Look forward to reading over your website!
02/23/2007 (3:17 am)
Eric: I agree about Zen of Optimisation being technically out of date. But I think Mike's book is still relevant to anyone wanting to learn about the mindset involved. Deciding WHEN to optimise and WHAT to optimise is a high level skill that I think Mike really teaches very well. Its also an amusing read.I'd love to have a resource that looks at the modern issues in the same vein. Look forward to reading over your website!
#4
I answer that question is with a set of guidelines, but a lot of times, I feel it comes down to something that's more of a gut feeling.
Here's a link to my version of the [url="http://www.vertexbuffer.com/node/3"]why, where, when.[/url]
02/23/2007 (4:09 am)
@Phil, I agree with what you say about Mike's book. It's still a good read. Asking someone when to optimize is one of my favorite questions. It's very case by case and I enjoy hearing them work through the answer.I answer that question is with a set of guidelines, but a lot of times, I feel it comes down to something that's more of a gut feeling.
Here's a link to my version of the [url="http://www.vertexbuffer.com/node/3"]why, where, when.[/url]
#5
02/23/2007 (4:25 am)
Had a quick read over the first couple of sections, its a pretty interesting read. Optimisation is an area I'm pretty ignorant about at the moment, so I'll definitely check back in the future as you add more content.
#6
02/23/2007 (1:04 pm)
Great read! very informitive
#7
02/23/2007 (2:20 pm)
I'm interested. Will the site also have some more basic tips on optimization as well? Its a subject I unfortunately haven't had a lot of experience in.
#8
After I finish writing everything, I plan on adding highlighted words and sections that fill you in on topics that i think the beginner optimizer might not understand. If you are a beginner C++ I'm afraid you wouldn't be ready for too many details yet.
I also have illustrations that will help clarify.
02/23/2007 (3:29 pm)
@Ian,After I finish writing everything, I plan on adding highlighted words and sections that fill you in on topics that i think the beginner optimizer might not understand. If you are a beginner C++ I'm afraid you wouldn't be ready for too many details yet.
I also have illustrations that will help clarify.

Torque Owner Ed Johnson
Live Free and Prosper
-Ed Johnson