Reputation: 1851
I'm quite new to Android game development (and Android development in general).
My first question came when I was creating the background for my first game: which size should I choose? If I choose 800x480 for example, will it show good on any other resolutions? And what about my main character? If I make it move 5px/frame (I already know how to make it fps independent, it's just an example), it's not the same to move 5 pixels on a 320px-width screen than on a 800px-width one. Any advices on this?
Thanks
Upvotes: 3
Views: 2851
Reputation: 61138
You should have a separate set of graphics for each of the resolutions you want to support. If you really want to cover all the current devices and have the crisp and sharp graphics on every one of those and you want to make sure that the aspect ratio doesn't make your game look weird on some devices, you need to prepare your assets in the following resolutions and scales:
Source: http://bigosaur.com/blog/31-android-resolutions-definite-answer
The best solution is to draw all full-screen images at least 2733x2134 pixels and then scale it down. Well, you can scale down images, if you have text, better to use smaller font size and put it over the image. You can do this at run-time or pre-render the text in advance. You can use ImageMagick to automate all that for 6 different sizes so you don't do it manually.
Upvotes: 0
Reputation: 4262
As @PaulSonier said, don't worry about supporting multiple resolutions until the end.
For now just develop on one device and use 'dp' or 'dip' units whenever possible. This will make it easier at the end to support multiple screen sizes and densities.
As for the background, consider using 9-patches.
Upvotes: 0
Reputation: 618
You should have separate resource files for each of the screen densities you wish to support.
Upvotes: 2
Reputation: 39480
Pick the background size that's supported natively on the device you plan on developing on, and worry about supporting non-native resolutions or adding resources for other resolutions when you're near the end of the project. Don't get bogged down in the weeds.
Upvotes: 1