Skip to content

Screenshots and visual checks

Screenshots are useful for documentation and for comparing rendering changes. Run the scene at a known window or device resolution, move the camera to a repeatable position and capture the image using the operating system, emulator or simulator. On Android Emulator and iOS Simulator, use the simulator's screenshot command to capture the actual application output. A simulator image does not prove behavior or performance on a physical device.

Capture from the application

To let users take screenshots while the game is running, attach a ScreenshotAppState during initialization:

ScreenshotAppState screenshotState = new ScreenshotAppState();
stateManager.attach(screenshotState);

The default key is KeyInput.KEY_SYSRQ, commonly labeled Print Screen. Screenshots are saved to the system's default storage folder unless you provide a custom output path to the constructor; include the trailing path separator. See the API reference for the available options.

When comparing visual output, keep the same renderer, display scaling, asset versions, camera and tone-mapping settings. Differences in GPU, drivers and framebuffer precision can still affect the result.