3

I am using andengine to develop a game . The game is running in LANDSCAPE and emulator resolution is 320*480. when I place the background image as size (320*480) . The images is cleared. But when i place large image (1440*400). The images become faded images. The game play is to move the background image from left to right. The images width automatically increases and makes fade . How do I fix that problem . I used FillResolutionPolicy

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));
    }

But still having same problem. Any help would be appreciated.

Mohit Verma
  • 3,025
  • 1
  • 20
  • 36
JohnRaja
  • 2,377
  • 6
  • 26
  • 47

3 Answers3

2

Many phones have maximum OpenGL ES texture size of 1024x1024, so you 1440 width might be the reason.

You can check your phones limit with an OpenGL query, see How can I find the maximum texture size for different phones?

Community
  • 1
  • 1
vertti
  • 7,539
  • 4
  • 51
  • 81
1

Try RatioResolutionPolicy instead. Problems when put large image in screen

AndEngine forums should always be your first place to search for answers

Moog
  • 10,193
  • 2
  • 40
  • 66
-1

You will have to use

android:layout_width="fill_parent"
android:layout_height="fill_parent" 

In your image view tag, it will automatically adjust to your screen, if u are using it as a background image then you have to define in it your Linearlayout tag

Mohit Verma
  • 3,025
  • 1
  • 20
  • 36
SRam
  • 2,832
  • 4
  • 45
  • 72
  • But i am using andengine . I also implement this "fill_parent" in Manifest.xml file. But still same problem – JohnRaja Jul 22 '11 at 05:57