Android game running on all screen sizes

I am trying to specify art sizes for an Android game with ~ 10 screens. I want the game to run on API 8+ and on all size screens except the "small" ones.

Since we are using API 8, I am using the old "4 screen categories" feature - I plan to support

  • normal (480 x 320 and up to 640 x 480).
  • large (640 x 480 and up to 960 x 720).
  • xlarge (960 x 720 and up to 1920 x 1200).

The PNG file 1920x1200 is ~ 4.1MB. So 10 of them are 41 MB, and we almost blew up the 50 millionth size of the application size (Play Store).

So, three questions: 1. How do people support detailed illustrations for game screens? Should I use soft colored 9 patch png files for background? Or can you save all 960x720 art and allow it to be resized for Android for large and regular screens? 10 background files of this size are approximately 15 MB, which leaves 35 MB for everything else.

What if i used jpg instead of png? What quality would I lose? Since I would only ever cut back, this should be fine, right? 10 jpgs 960x720 is only 4.3 MB.

  • Android , , 4: 3 960x720? XML " , " " , "? ( xlarge- 960x720 - )?

  • DPI ? DPI , , - res, , . ?

, . ? post install ( ), 9 ?

. 25 , , .

+1
1

(): - , . , , ( ) ( ).

, , ( ). , (, , ) Out Of Memory/Exceeding VM / , . .

, bmp ( getResources(). openRawResource (id) BitmapFactory.decodeResource( ..) [ ] load/create FileDescriptor), bmp createScaledBitmap(), ( ). BitmapOptions, .inScaled, , , Rect drawcall.

( ) , Android- (hdpi ..) , .

, "bmp VM". bmps; Google/Googlers , Android , bmps (), , . - (/ ..) . //dpi BitmapOptions/canvasses/SurfaceViews Windows.

, - .

+1

All Articles