If you're using C or C++ to develop or customize a game engine, the following requirements are critical to integrating Android support into your game engine.
- Take advantage of Android development tools
- Construct an activity
- Draw to the screen
- Process input events
- Output audio
- Manage memory
- Test and polish
- Publish to Google Play
The requirements described on this page do not teach you how to develop a game engine from scratch, but rather identify the areas where Android is relatively unique compared to other platforms.
Take advantage of Android development tools
Android Studio includes tools you can use to:
- Configure your project
- Build, debug, and package your game
- Examine the performance of your game using system, CPU, and memory profilers
- Inspect the contents of your game’s package or application bundle
- Integrate additional features of the Android SDK and NDK
The Android Graphics Inspector can characterize the rendering performance of your game and help you investigate the details of rendered frames using frame capture.
If you're primarily using Microsoft Visual Studio, you can use the Android Game Development Extension (AGDE) to add an Android target to existing projects. AGDE supports native debugging in Visual Studio and includes standalone versions of many of the Android Studio profiling tools.
Construct an activity
Read about the
which integrates and meets the
Activity-related needs (game window,
lifecycle, rendering, handling events) of native C or C++ game engines.
Draw to the screen
Android devices support different display refresh rates. Learn about rendering in game loops to prevent frame drops and frame buffers glitches.
Process input events
A game engine receives input events from a variety of sources. For an immersive gaming experience, learn to support different Android input sources:
Your game engine needs to output audio across different devices and Android versions. Learn about Oboe, our open-source C++ audio library to incorporate high-performance audio in your game.
Use Oboe to achieve the lowest latency, avoid specific audio bugs, and auto select the best available native library (such as AAudio or OpenSL ES).
On Android devices, the system tries to use as much system memory (RAM) as possible and performs various memory optimizations to free up space when needed. Learn to manage memory usage to avoid slowing down or exiting your game.
Test and polish
An Android app crashes whenever there’s an unexpected exit caused by an unhandled exception or signal. Learn about how to detect and diagnose crashes, read stack traces, memory and networking exceptions, how to use logcat, and how to understand Java and Kotlin-specific errors.
Publish to Google Play
Players download your game with various Android devices in different countries, network conditions, and data plans. Learn how to use Google Play to deliver app bundles and asset packs for large games with the benefits of a content delivery network.