So you have written a game and now you want to tweak, optimize and package it for BlackBerry 10? This blog post will cover some details that are important for game developers regarding chipset configurations and cellular radio variants. If you choose to use texture compression in your games, this will help you determine which vendor specific texture compression formats you should package with.
BlackBerry 10 device models will have two different radio variants: 4G HSPA+ and 4G LTE.
Game developers are often required to take hardware-specific features into consideration, such as CPU and GPU speeds, supported texture compression formats and display resolution. To make your life a bit easier, we are providing the following chart, showing all of the display and chipset configurations for the new BlackBerry 10 and existing BlackBerry PlayBook tablet models:
|Device Model + Radio Variant||Display + Chipset|
|BlackBerry 10 – Z10||
|BlackBerry PlayBook 4G + WiFi||
|BlackBerry PlayBook WiFi||
OpenGL ES support
All chipsets for BlackBerry 10 will continue to support OpenGL ES 1.1/2.0 with several common extensions. There are also several vendor-specific extensions available, although aside from texture compression extensions, these are typically not required for developing a high quality game.
The most important thing to call out for game developers is that there are two different GPUs available across all the BlackBerry 10 and BlackBerry PlayBook models. All though the selected GPUs are on par with one another, game developers need to understand that they can create two separate BAR files on models that have different GPUs. Here is the major consideration for this:
Texture compression is becoming more commonly used in mobile games since texture data often takes up a large bulk of your game assets. Not only does texture compression drastically reduce the memory footprint of your game, it can also result in significant performance gains, especially during level loading. Depending on your game title, the loss in texture quality introduced by compression may or may not be tolerable. However, for very large mobile games that will reach sizes close to or above 1GB, texture compression becomes more of a necessity.
Thankfully, using texture compression is quite easy! The steps required are usually as follows:
- Compress images offline using texture compression tools or game engines that typically includes them for all the major GPUs on the market.
- Create a different build configuration for each target chipset that requires a different texture compression format and add the correct compressed textures to each configuration.
- Write texture loading code to read the texture data into an OpenGL texture, passing the correct compressed texture format parameter.
For a good reference of how to apply dynamic loading of textures supporting various vendor formats, check out the GamePlay 3D framework at www.gameplay3d.org. The Texture class, found directly in the repository at https://github.com/blackberry/GamePlay/blob/master/gameplay/src/Texture.cpp contains code for loading such textures. The sample gameplay-samples/sample06-racer, also found in the repository, demonstrates how to setup your IDE project to have 2 different BlackBerry packaging outputs for different sets of compressed files.
Texture Compression Format and Packaging (1 or 2 BAR files)
Now that you are planning to consider texture compression, you need to decide which images you want to compress and what quality and format to use. You may want to avoid compressing certain textures that require higher quality, such as those used in user interfaces, fonts and main characters. For those that you do plan to compress, there are a couple common options to choose from:
|Chipset GPU||Texture Compression Format16bit – No Alpha||Texture Compression Format16/32 bit – with Alpha|
|Imagination GPU||ETC1||PVRTC (4 formats)|
|Qualcomm GPU||ETC1||ATC (3 formats)|
Scenario #1: Lower Quality Compression with One Generic .BAR File
If you are able to use 16-bit compressed textures with no alpha and uncompressed textures for all other images, you can use the ETC1 texture compression format. This format is supported on all BlackBerry 10 and PlayBook models, meaning you need only make a single .BAR file to distribute.
Scenario #2: Higher Quality Compression with Two Vendor Specific .BAR Files
If you require higher quality compression or alpha in your compressed textures, then you must choose to use a vendor specific compression format. This means that you will need at least two different .BAR files to distribute to support all the BlackBerry 10 and PlayBook models.
Vendor GPU SDK’s and Texture Tools
Imagination PowerVR SDK with Texture Tool:
Qualcomm Adreno SDK with Texture Tool:
BlackBerry World + .BAR File Distribution
The developer portal for BlackBerry World will allow developers the ability to upload either a single .BAR file for each model. However, on models like the BlackBerry 10 All Touch and PlayBook shown below that have 2 GPU (Imagination GPU and Qualcomm GPU), developers may choose to upload 2 separated BAR files with different compressed textures in each. When the user downloads the game from BlackBerry World they get the appropriate BAR file for the device chipset. See BlackBerry World here:
Crank up the Graphic Effects and Rendering Techniques – Now in HD…
BlackBerry 10 devices push it to the limits with top GPUs models supporting leading edge graphics effects and rendering techniques used in today’s mobile games. Expect to see performance increases in a magnitude of 2x-4x in both Dual Core CPUs and GPU performance making them ready for all the next wave of kick butt gaming on the platform. New BlackBerry 10 owners will love the new gaming experiences they will get on these devices with emphasis on HD gaming and great gaming hardware to support it.