1

I am developing an Android game using AndEngine which support all screen resolution (Large,medium & small screen). The camera width=720, camera height=480 and I am using all in-game Graphics according to this screen size(i.e 720x480).

I have a problem that when I install my game on small screen resolution devices, all my in-game Images(graphics) are getting stretched or shrink. I am loading all Image resources from assets folder*strong text*.

If I use Ratio Resolution Policy() then entire screen will not cover. Is there any solution for this? Thanks in advance

Johnson
  • 11
  • 2
  • 1
    what ResolutionPolicy are you using? can you show us the code where you create the engine – jmroyalty Oct 11 '13 at 13:04
  • public Engine onLoadEngine() { this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT); return new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new FillResolutionPolicy(), this.mCamera).setNeedsMusic(true).setNeedsSound(true)); } – Johnson Oct 16 '13 at 04:30
  • have you tried it with a RatioResolutionPolicy? See this post for some insight - http://stackoverflow.com/questions/11399045/sprite-size-on-different-screen-size-andengine-android/11412294#11412294 – jmroyalty Oct 16 '13 at 10:37
  • yes i have tried this, but entire screen will not cover. – Johnson Oct 17 '13 at 09:09
  • 1
    well, you basically have the 2 choices - RatioResolutionPolicy and possibly not filling the entire screen - or FillResolutionPolicy which will cover the screen but to do that it will have to stretch the graphics. You need to decide which is more important - filling the screening or not stretching the graphics. Even if you get it to work on your device(s), it's not going to be the same on every device - personally, I'd go with the RatioResolutionPolicy and live with the padding. – jmroyalty Oct 17 '13 at 19:26
  • Thanks. now i got clear idea – Johnson Oct 18 '13 at 07:07

0 Answers0