Mobile Targets

With the penetration of mobile devices in the world ignoring mobile targets for your games and applications is ignoring a huge audience.

Mobile devices even though amazing have particular bottlenecks not present on desktop targets. The bottleneck most significant to HaxeFlixel games is the low powered CPU. HaxeFlixel's answer to this is to make use of GPU acceleration provided by OpenFL.

CPU

The processing power of mobile CPUs are often the biggest bottleneck when compared to a desktop target. Mobile CPUs are constrained by low power architectures and are simply not as powerful. Manipulating pixels like bitmap filters do with Flash software rendering is simply too slow for mobile devices. HaxeFlixel has answered this for Flixel games to use the GPU for rendering your sprites instead of using software rendering like its done with Flash.

Memory

Memory on mobile devices as you can imagine does not compare to the desktop. When we talk about memory it relates to how many textures your game can store to render as well as the amount of raw data and objects in your game's runtime state. Memory lets you cache objects for quick runtime access instead of creating objects during your gameplay which may cause skipping and low performance. This is why HaxeFlixel uses destroy method and has implemented support for texture atlas'.

Texture Size Limits

Due to the nature of mobile hardware there are often maximum sizes for textures that are much lower than desktop hardware. There is no definitive guide to size limits as it depends on the hardware of each device individually.

Here you can see an overview of size limits obtained from WebGL browsers http://webglstats.com/#h_texsize

You can also look up a device on glxbench.com, under the GL config tab look for GL_MAX_TEXTURE_SIZE.

Here is an overview of the variety in devices, feel free to add to the list;
























































**Device** **Processor** **Max Texture Size** **Display Resolution** **Memory**

iPhone

Armv6

1024x1024

480x320

128MB

iPhone 3G

Armv6

1024x1024

480x320

128MB

iPhone 3GS

Cortex-A8

2048x2048

480x320

256MB

iPhone 4

Cortex-A8

2048x2048

960x640

512MB

iPhone 4S

Cortex-A9 Dual-Core

4096x4096

960x640

512MB

iPad

Cortex-A8

2048x2048

1024x768

512MB

iPad 2

Cortex-A9 Dual-Core

2048x2048

4096x4096 (iOS 5.1)

1024x768

512MB

iPad 3 Cortex-A9 Dual-Core 4096x4096 2048x1536 1024MB