1. Are you ready for the Galaxy S20? Here is everything we know so far!

Game Dev / Screen Resolution

Discussion in 'Android Development' started by appDev, Sep 25, 2018.

  1. appDev

    appDev Lurker
    Thread Starter

    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..
     


Loading...
Similar Threads - Game Dev Screen
  1. freekgamer
    Replies:
    0
    Views:
    51
  2. App Update
    Replies:
    0
    Views:
    40
  3. freekgamer
    Replies:
    1
    Views:
    99
  4. App Update
    Replies:
    0
    Views:
    63
  5. App Update
    Replies:
    0
    Views:
    65
  6. GeoGen
    Replies:
    0
    Views:
    264
  7. App Update
    Replies:
    0
    Views:
    202
  8. Eugene Lazebny
    Replies:
    2
    Views:
    723
  9. 23tony
    Replies:
    1
    Views:
    432
  10. Appstronaut
    Replies:
    0
    Views:
    423

Share This Page

Loading...