martedì 27 novembre 2012

Support for more screen size...at a cost

A little digression on JaTris support for devices with 600x1024 or bigger resolution.
As you can see from the images below JaTris full (designed as JaTris free for 480x800 pixel), supports 600x1024, 720x1280 and 800x1280 modes better than the free counterpart.






















However this support has a cost, JaTris is 3Mb while JaTris free is 1.2Mb long.

Some of this space is due to skin system graphics and a little end of game animation but 1.5Mb is due to the replication of sprites for higher resolution screen support.

The problem is the mix of DPI and pixel resolution used by Android system to render graphics.

It works well for smartphones (little screen dimension, with a bunch of pixel resolutions); you ake the graphics for the biggest resolution and let the automatic rescaling do the job for you (it works like a charm).

Unfortunately tablets are different, bigger screens mostly with mid dpi and a bunch of pixel resolutions; the graphics done for smartphones is far too small when rendered on tablets.

The only solution seems to duplicate graphics in high dpi for smartphone in mid dpi for large screen and then the rendering is good on tablets too; unfortunately this doubles the game size.

I tried to avoid this using the resource alias feature, but it does not work well when the alias and the original resource have a different dpi (this is related only to drawables).

With little games like JaTris this is a viable solution but for bigger ones the only solution is to make different apk for different classes of devices.

This problem will get worse with the arrival of full hd devices :-(

Nessun commento:

Posta un commento