The following is a report from Mark Haack, Senior Software Engineer at Raydon Corporation, who attended the Microsoft Developer Day on Tuesday and submitted his report to me.
Microsoft Developer Day at GDC '05
The Microsoft Game Developer’s Day at GDC ’05 consisted of a series of lectures about current and future tools and technologies. The intro talked about the history of DirectX and Windows gradual acceptance as a gaming platform. They also introduced (at least to me) the XP Game Advisor that checks your system to see if it is compatible with the latest game titles.
The lectures kicked off with the overview of the Common Game Controller that was introduced last year. The CGC is a PC and Xbox compatible game controller, which should allow developers to write one controller interface for at least the Windows and Xbox platforms. MS also seems to be trying to push more games away from the mouse/keyboard IF for PC’s, but many PC games require much more functionality than a controller can provide, so it may be a hard sell. They also talked about upgrading the vibration feedback to provide more types of feel cues.
The next topic was Advanced Pre-Computed Radiance Transfer. I uh, had to take a phone call during this lecture, so I missed most of it. That’s my story and I’m sticking to it.
After that, was a lecture on the Performance Investigator for Xbox (PIX). PIX is a profiler of both the CPU and GPU and also provides some debugging capabilities. It shows all of the draw calls at an API level and points out anomalous or out of sequence API calls. There is also a mesh debugger which shows vertex density and a pixel debugger that provides call data on a per-pixel basis. A Windows version has been released, but it is does not have all of the Xbox PIX’s capabilities…yet. The next version of PIX will be in the April ’05 DirectX SDK release.
The best practices for Window and Xbox development was discussed next. A common mistake is to wait until late in the lifecycle to profile and address performance issues. Profiling should be done early and often to avoid schedule slipping resulting from a major content or code redesign due to poor performance. Here are a few suggestions to enhance your performance without using a little blue pill:
• Make sure draw calls are on screen and in view.
• Don’t give every vertex 4 bones.
• Use Mipmaps but not on the UI or the sky box.
• Don’t make AI decision every frame.
• Inline high-frequency functions
• Use const liberally.
• Don’t do dynamic memory alloc/dealloc per frame.
• Keep multi-threading in mind during design to optimize for multi-core systems.
• Don’t test if a file exists before opening it, just open it and handle the error if it’s not there.
And finally Visual Studio 2005 was introduced. Visual Studio Enterprise edition was replace with a Team System edition. Team System provides custom version of VS for the different team members. The team architect has design tools while the tester has bug-reporting tools. There is also an express version that is for novice users that will have limited functionality and either will be free or at least pretty cheap. The Professional edition and up will have some handy new features:
• Task points: A breakpoint that doesn’t have to break, but can print out useful information such as the callstack or even run a macro.
• Improved STL debugging, containers are displayed as expected.
• New, customizable floating point model. Compiler switches can optimize for speed or precision.
• An improved profiler.
• 64-bit support.
• Easier to mix native and managed code.
• New Source Control system
And finally the new feature that I found really cool was the OpenMP support. There are two types of OpenMP parallelization, for loop and sections. For loop parallelization splits the iterations among the available processors. Here is an example…
void loopTest()
{
#pragma omp parallel for
for (int index=0; index<1000; index++)
{
SomeThreadSafeFunction(index);
}
}
If there are four CPU’s iterations 0..249 go to CPU1, 250..499 go to CPU2 etc. Note the iterations cannot be inter-dependent and function calls need to be thread safe.