Share via


Additional considerations when developing GDK games for handheld Windows devices

In addition to the checks already listed in Optimize GDK games for handheld Windows devices, there are several other considerations a developer should keep in mind when developing their games to work on handheld devices.

Docked behavior of a handheld

Some handhelds may be played when docked. While there isn't a simple API to check if the handheld is docked, a docked device will likely have an external display attached. Developers can check for an external display by using the EnumDisplayDevices and EnumDisplaySettings APIs.

Note that there are many other ways to also determine that there are external displays.

When a handheld device is docked:

  • Check for additional gamepads. The built in one from the handheld will be there; however, the user may hae connected additional gamepads.
  • Check the screen sizes of attached displays.
  • Virtual keyboard recommendations remain as the gamepad is still the primary input mechanism.
  • Some folks may attach mouse and keyboard, similar to what happens on consoles today.

Guaranteed input

While different gaming handhelds may have additional input options, developers can rely on gaming handhelds to have the following inputs:

  • A, B, X, Y buttons
  • Left and right bumper
  • Left and right trigger
  • Left and right thumb sticks
  • D-pad
  • Menu button
  • View button

While it was mentioned as something to check for when docked, in all instances, docked or not, developers should always make sure to check for all attached gamepads and input devices.

Power

Games wanting to know if the handheld is using AC power instead of the battery can call the GetSystemPowerStatus function. Not only does this function let the game know if the device is connected to AC power, it also gives a high-level view of the battery charge state (high, low, critical, charging).

Developers should also consider the impact on battery life of the device, as its not obvious how much power a given game might require. We have general recommendations on possible power savings in the Xbox Sustainability Toolkit, which can also apply to handhelds.

The biggest power savings come from:

  • Enabling vsync to help the GPU have more idle time and save power.
  • Reducing the internal rendering resolution and using an upscale pass.
  • Reducing the frame rate to save power, but this may impact the gameplay.
  • Stop rendering the world when full screen menus or UI elements are shown (or when the game is paused).
  • Pause the game when input idle is detected, in cases where the player has walked away.

Screen dimensions

While different gaming handhelds may have varying screen resolutions, you can rely on the following:

  • The screen size will be at least 7 inches.
  • The screen will have an aspect ratio of either 16:9 or 16:10.

Developers wanting to know the screen size for a display physically integrated into the device can call the GetIntegratedDisplaySize function. This function will report diagonal screen size for the display physically integrated into the machine.