Compared to the power of a desktop computer or a console, Android devices have significantly less GPU size and flash memory performance. This dissimilarity in system structure can make it difficult to predict your game’s performance on an Android device. This guide aims to help you optimize your game so that its performance is reliable across various devices.
By following each of these guidelines, your users will be able to play and enjoy your game without encountering problems like sudden framerate drops or input lag. You will also experience shorter loading times because assets that need to be loaded—such as images—will begin loading earlier. Last, but not least, your game will last longer on the device’s internal memory, reducing the need to worry about how much storage space to use.
This guide is meant for developers who want to reduce GPU strain on Android. The guidelines are categorized into sections according to the types of games that use a lot of GPU power. Each section contains details about common issues that can occur when developing games for Android and suggestions for solutions that you can incorporate into your code.
If you are a consumer (unlike a developer), please take note: Although this guide is intended for developers, it remains relevant even if you are using your Android device as a gaming machine (though under normal circumstances your game’s performance may change).
The guidelines in this guide are organized according to the types of game titles that use a lot of GPU power. Here is the list:
* Action games (e.g. [Tom Clancy’s EndWar]) – need an average amount of GPU.
* Puzzle games (e.g. [Candy Crush Saga]) – runs on minimum GPU.
* Strategy games (e.g. [Lords of War] or [Real Racing 3]) – need some amount of GPU.
* FPS games (e.g. [Modern Combat 5: Blackout], [Call of Duty: Strike Team], or [Alien Shooter: Vengeance]) – This type of game needs more GPU.
* RPG/MMO*shooters (e.g. [Planetside 2], [GunZ: The Duel]) – runs on minimum GPU.
The first goal of this guide is to try and make your game run up to 70% faster. Some additional goals are to reduce the amount of memory that your game uses and to make sure that you do not end up with unexpected results when you debug your game on various Android devices. You should also make sure that your pictures load more frequently and start rendering faster when randomizing their size so that users can continue enjoying the game uninterrupted.
When Device is Small, Show Less.
Your game should display fewer graphics or video assets on an Android device if its screen is much smaller than that of a desktop computer. For example, if your game uses a low-resolution image designed for a desktop screen in combination with a high-resolution image designed for an Android device, you should use the latter as the main image and show the former only when users tap or touch the screen. You can also implement this solution by generating two different sets of graphics: one for desktop computers and another one for mobile devices running your game.
You can alternatively decide to scale an image or video asset by reducing its size while maintaining the same aspect ratio. If you are using Flash Professional, first ensure that you have set the proper DPI values in the field properties of your artboard. Then you should go to Window > Output Settings and add a function that scales your image or video assets in such a way that they will look crystal clear on Android devices—as if they were designed for these devices in the first place.
You may also want to consider using a web browser or other devices, such as a smartphone or tablet, for testing the visuals of your game to make sure that they are not distorted or visually unappealing on larger devices.
Basically, when users use an Android device with a screen resolution of around 1000 x 800 pixels, your game should display fewer pieces of information on-screen—such as character sprites and buildings—than users can comfortably see. If you happen to have more texture assets than your game can fit into its memory, you should export them so that they do not take up more space in the memory than necessary.
Some tips on how you can change your code to achieve this goal include:
* Eliminate low-resolution graphics. Use a graphics editor like Adobe Flash Professional to enlarge the image or video asset and scale down its quality. Do this before you import the asset into your game. Or you can create a new graphic using a graphics editor and then export it for use in your game so that users see fewer things onscreen at once.
* Disable parallax scrolling if your game uses perspective effects and if users are not able to interact with objects that appear behind other objects.
For more information, see [THIS BLOG POST].