Whether you’re developing a new game or have an existing game that you want to port to the netbook platform, it’s important to know how to optimize it. The netbook market is growing steadily and creating new opportunities for game developers on this mobile platform. According to a 2009 report from the NPD Group, nearly 40 million netbooks have shipped so far, and around 139 million are projected to be shipped by 2013.

The best way to show you how to optimize your game for netbooks is to describe what we did when creating a demo for Fireflies. It’s a great example of the easy optimizations and quick performance gains you can achieve when developing games for this fast-growing market.

The Lowdown on Developing for NetbooksNetbooks are lightweight, portable PCs targeted for casual, on-the-go use. With an average of around 10 hours of battery life, they have enough running time for most gamers. Netbooks have smaller keyboards, and their screen sizes are also smaller than what PC game developers are used to, with a typical size of 10 inches at a resolution of 1024 x 600. Still, they offer a full Web experience, supporting Flash and other plug-ins, and they can handle high-definition video.

Netbooks typically do not come with an optical drive, so users won’t be installing your game from a disc. Netbooks do come enabled with Wi-Fi and Bluetooth, and it’s safe to assume that a webcam and a microphone will be mounted on the lid.

Porting Games to NetbooksYour netbook is likely to have an in-order processor, unlike the out-of-order functionality built into the larger processors in high-end desktop machines. As instruction streams enter an out-of-order processor, the processor can reorder them to cover up latency and extract instruction-level parallelization. If an instruction hits a pause and needs to fetch data from memory, the processor can fill that slot with another instruction stream, making the stall less severe.

With a netbook processor’s in-order instruction scheduler, reordering the instruction stream at the processor level is not possible. However, you can use a C++ Compiler to minimize the processor’s sensitivity to dependency stalls and help achieve the maximum frames per second (fps) for your application. A C++ Compiler uses various optimizations that specifically target the netbook processor, such as being able to handle the processor’s trade-off between longer battery life and less out-of-order execution. When we tested the Fireflies demo, we set a few flags on the C++ Compiler, compiled the code, and achieved a 1.2x to 1.3x speed-up.

You can also improve performance by taking advantage of the Streaming SIMD Extensions 3 (SSE3), a standardized instruction set some netbook processors support. Including support for SSE3 ensures that your game will run on just about any x86 processor. On our Fireflies demo, we implemented SSE using the XNA Math Library that comes with DirectX, resulting in about a 1.1x to 1.3x speed-up with only the hand-coded SSE.

Hyper-threading is also very important. On an in-order processor, it is more likely for the processing and execution stream to stall because of latencies, but hyper-threading alleviates these types of bottlenecks by letting two threads run on a single core, allowing the core to actively swap between threads as they’re needed.

Tips for Maximizing Game Performance on NetbooksDuring the testing of our demo, it was important to run the application at full screen size. Maximizing the application to take up the full screen actually minimizes the amount of context switching in Microsoft Windows 7, which improves performance. Balancing the work on the CPU and the GPU is important, and using graphics performance analyzers can help you do this. When running a heavy graphics workload, you’ll want to take hyper-threading into account.

We also found it helpful to compress texture, minimize multiple passes, minimize post processing, decrease the amount of data pushed to the chips and use standard tricks such as index buffers and triangle strips to bring down the vertex count that hits the chipset.

Try these tips to help address the smaller screen size:

Position elements on the screen relative to where they belong. This is especially important when positioning the heads-up display. Keep only those items that are necessary for gameplay on the screen. It is also a good idea to scale the assets based on resolution or screen size.

Use expressive icons. Instead of using an icon that has both a symbol and text, consider dropping the text. Keep the icon if it’s expressive enough for the user to know what it is used for, and maybe add the text to the tool-tip for that button.

Lastly, pay attention to the netbook battery life. Most have longer battery life than the average laptop, but games typically drain the battery faster than other applications. When your game is running on a netbook, be aware of whether the network is plugged in, if the lid has been closed and if the netbook is running out of battery life.