Create a permission-independent Android game

I am new to Android game development (and Android in general).

My first question arose when I created the background for my first game: what size should I choose? If I choose, for example, 800x480, will this work out well in any other resolutions? What about my main character? If I do this 5px / frame (I already know how to make it independent of fps, this is just an example), it is not the same as moving 5 pixels on a screen with a width of 320 pixels, not 800 pixels wide. Any advice on this?

thank

+3
source share
4 answers

You must have separate resource files for each of the screen densities that you want to support.

+2

, , , , . .

+1

@PaulSonier, .

"dp" "dip". .

, 9-.

0

, . , , , :

  • 854x600 100%
  • 1024x800 120%
  • 1280x1024 160%
  • 1536x1152 192%
  • 1920x1200 240%
  • 2560x1600 320%

: http://bigosaur.com/blog/31-android-resolutions-definite-answer

The best solution is to make all full-screen images at least 2733x2134 pixels, and then scale them. Well, you can scale the image if you have text, it is better to use a smaller font size and put it on top of the image. You can do this at run time or pre-visualize the text in advance. You can use ImageMagick to automate everything for 6 different sizes, so you don't do it manually.

0
source

All Articles