Hi, I'm currently in the process of writing a 2D game for Android. I have written my own level creator in order to create/edit levels, and I had a question about different screen densities/resolutions.
The only physical phone I have to test is a Droid Incredible, which has a resolution of 800x480 (hdpi). Obviously, I would like my game to be playable on other devices with different resolutions by the time it is completed. I have already created many levels that assume the screen resolution is 800x480, so when I export levels from my editor, each image appears at whatever pixel it was placed at in the level editor.
This is all fine and dandy for when I test the game on my Incredible, but, as I expected, it does not when I try it on emulators that vary in resolution/density. So, my question is this: I know that "dp" units exist and that they can be used to achieve density independence (Supporting Multiple Screens | Android Developers), but I'm not quite sure how to actually use them. If I have a very intricate level designed at the 800x480 resolution, how would I use these "dp" units to basically "scale" the entire level to look the same on any screen?
Or are there any other ways any of you would suggest?
Thanks so much in advance.
The only physical phone I have to test is a Droid Incredible, which has a resolution of 800x480 (hdpi). Obviously, I would like my game to be playable on other devices with different resolutions by the time it is completed. I have already created many levels that assume the screen resolution is 800x480, so when I export levels from my editor, each image appears at whatever pixel it was placed at in the level editor.
This is all fine and dandy for when I test the game on my Incredible, but, as I expected, it does not when I try it on emulators that vary in resolution/density. So, my question is this: I know that "dp" units exist and that they can be used to achieve density independence (Supporting Multiple Screens | Android Developers), but I'm not quite sure how to actually use them. If I have a very intricate level designed at the 800x480 resolution, how would I use these "dp" units to basically "scale" the entire level to look the same on any screen?
Or are there any other ways any of you would suggest?
Thanks so much in advance.