AndEngine doesn't fill correctly an image on my device

Posted by Guille on Game Development See other posts from Game Development or by Guille
Published on 2013-06-29T08:52:25Z Indexed on 2013/06/29 10:30 UTC
Read the original article Hit count: 331

Filed under:

I'm learning about AndEngine a little bit, I'm trying to follow a tutorial but I don't get to fill the background image correctly, so, it's just appear in one side of my screen. My device is a Galaxy Nexus (1270x768 I think...). The image is 800x480.

The code is:

public EngineOptions onCreateEngineOptions()
    {
        camera = new Camera(0, 0, 800, 480);
        EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new FillResolutionPolicy(), this.camera);
        engineOptions.getAudioOptions().setNeedsMusic(true).setNeedsSound(true);
        engineOptions.getRenderOptions().setMultiSampling(true);//.getConfigChooserOptions().setRequestedMultiSampling(true);
        engineOptions.setWakeLockOptions(WakeLockOptions.SCREEN_ON);
        return engineOptions;
    }

I have been trying with several values in the camera, but it doesn't fill in all the screen, why?

© Game Development or respective owner

Related posts about andengine