0
votes

I am designing an android game, and have so far test it only on a 480 x 800 pixel emulator, obviously this isn't suitable for all phones. I completely understand with layouts and xml and drawables the need to create them in different sizes, but what about when it comes to canvas methods such as drawing bitmaps, because they would be drawn in different positions on different size screens etc

Thanks in advance

Ben

2

2 Answers

1
votes

Personally I dont use different size images for different phones, my images are scales up/down depending on the phone but I make sure the resolution looks good on all phones.

It depends how you have coded really, best way to find out is to scale some of your objects and try it on a different emulator. If its all messed up you will need to make changes.

Have you made the game by pure points such as x = 200, y = 200 of have you done something like x = screenLength/3, y = screenHeight/10?

0
votes

The problem isn't just the number of pixels, but also how many pixels are in an inch. That's why Android uses "density independence pixels". If you follow Android's dpi conventions and allow it to fit bitmaps for you, you'll find that scaling, positioning, etc. becomes automatic.