Monday, December 10, 2012

Starling vector textures

If you have ever tried to create mobile applications you may faced with a problem of choosing the right size of bitmap textures. In our world there are tones of devices with different screen resolutions even screen aspect ratios, for developer it could be cause of nightmare. Starling documentation has a good post called Multi-Resolution Development wich shows how to manage textures using contentScaleFactor but the problem with quality of texture images remains. Many developers just create two different bunch of textures one for low resolution mobile devices and another one for high resolution tablets called "HD". In this case you will lose with size of application because you need to pack two bunch of textures, of course you can create two applications but even in this case problem with texture quality is not completely resolved.

What if I say you that you can create vector assets and generate textures with right size for specific device on the fly during loading application. First time this technic we've used for our game Squeeze Me, we've achieved the same good quality on all devices and extremely smal size of game only 680kb excluding Adobe AIR. All textures were created in FXG format. But we faced with a problem that loading textures for Retina Display of iPad 3 takes lot of time and can lead to "stop working" dialog, for this game we decided to make a hot fix and make lower size of textures for iPad 3 specificaly, thats why the quality on this device is not so good as on others.

To resolve issue with time of loading we need to make this process asynchronous. Unfortunately Adobe hasn't created workers for mobile platform yet so we have to emulate concurrency by ourselve. In that moment our in4ray Gaming SDK was born. This platform was used in our next game Christmas Toys and shows that we can get high quality for any resolution devices even with retina display.

Next post will lead you through development process and show more detailes.

1 comment:

  1. Thanks for all the information, it was very helpful I really like that you are providing information..............Get More details about Oracle Fusion Financials Courses.

    ReplyDelete