Sandy Bridge and Game Development

When we were making Ghostbusters a few years ago, we were approached by Intel to try out their new 4 series graphics media accelerator systems. After working closely with Intel for over a year, we were very happy with the resulting performance of the game, and the Graphcis Performance Analyzer tool. Ghostbusters out of the box was able to run very well on the 4 series chips, but not with every feature turned on.

Now, it’s the beginning of 2011, and we have Sandy Bridge, the next graphics series processor from Intel. Going back and trying Ghostbusters, I was in for a treat. Not only did I enjoy going back to the Ghostbusters universe not having played the game in over a year (we have been busy working on the new Star Wars game for Kinect with the Infernal Engine), Ghostbusters ran smoothly with every feature turned on at 1024x768, the highest resolution I could get my beta hardware to run at. More or less, this means great 720p gaming performance!

This is excellent news for console/PC game developers - your base system PC from Intel will be able to run your full graphics options (and then some) without the user having to purchase additional graphics hardware (unless they want to run at insane resolutions). This is also good news because you will be able to purchase a laptop that you can do serious game development on, get great battery life, and not break your back when you need to travel overseas (or back home for Thanksgiving...).

Sandy Bridge isn’t just about graphics performance. The high end Core i7 will give you 4 cores, 8 threads, and turbo boost. What can we do with all of this extra horsepower? Stan Melax (famous for his convex hull code, aptly named “StanHull”) has a great paper on cloth simulation on the Intel developer website that uses all available threads to demonstrate advanced cloth simulation. This code uses the new 256-bit AVX vector instructions. While the SOA (structure of array) approach may not be applicable to every algorithm due to memory access patterns, this is still quite impressive.

Zane Mankowski (and others) have a very interesting paper on offloading shadow map generation from the GPU to the CPU for added performance. This is a very interesting technique for me in particular, as we used it in the nineties when graphics acceleration was in its infancy for spaceship and vehicle shadows. It’s great to see this used for full blown shadow map generation - if your engine has all these threads available and isn’t using them for physics or animation, it’s a good example of load balancing - use all of the system, rather than overload one specific component. You see a lot of PS3 developers lately using this technique on SPUs to speed up their performance as well for SSAO (screen space ambient occlusion), vertex transformations, HDR bloom generation, etc. All of these could be done on those extra CPU cores as well as needed.

In the Infernal Engine, we make good use of all available CPU and GPU resources as well. Animation blending is something that we have used a lot of lately - it is typical for an AI character to have over 50 core animations in a blend tree, so that is a must to offload on other CPUs. Animation is great for multithreading, because if you have a good parallel chain, you won’t need the data until next game loop iteration and it can fill in the leftover odd time gaps between the other parallel operations of physics, particles, and rendering.

No matter how much code you have in parallel, you still will have portions of your game engine code that remains in serial. Sandy Bridge will address this code quite nicely with Turbo Boost. Turbo Boost will run one core at a higher frequency than the rest. Ideally, this will be the main thread of your game engine, which will be scheduling up the other threads, performing synchronization, and running the game logic that inevitably cannot be run in parallel.

2011 is going to be an exciting year for game developers (and players too!!!)
For more complete information about compiler optimizations, see our Optimization Notice.