• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Game Dev / Screen Resolution

appDev

Lurker
I am working on developing a game.. I am finding that in using the folders drawable-hdpi through xxxhdpi for my images does not account for screen size..

I have scaled the images.. and if the res is lower the images display correctly.. but if Hi resolution.. it does not account for this.. and I have to scale for each screen size..
example:
res/
drawable-xxxhdpi/
awesome-image.png
drawable-xxhdpi/
awesome-image.png
drawable-xhdpi/
awesome-image.png
drawable-hdpi/
awesome-image.png
drawable-mdpi/
awesome-image.png


scaled image to:
  • 36x36 (0.75x) for low-density (ldpi)
  • 48x48 (1.0x baseline) for medium-density (mdpi)
  • 72x72 (1.5x) for high-density (hdpi)
  • 96x96 (2.0x) for extra-high-density (xhdpi)
  • 144x144 (3.0x) for extra-extra-high-density (xxhdpi)
  • 192x192 (4.0x) for extra-extra-extra-high-density (xxxhdpi)
what I am seeing is when you have a xhdpi that is say 800*600 the image displays correct.. but if the res is 1044*... and still xhdpi the image is two small..

I feel I am missing something with this...
how can I get the image to display correctly without manually in the code checking the res.. and scale the image if it needs it?

Thank you - for any help given..
 
Back
Top Bottom