RepeatingSpriteBackground on MenuScene

andengine, android, background, repeat

Solution

I just discover my problem. The code was right the problem was in the image format, it has to be a power of two (it says that clearly in the source code comments)

Next time I will try to read carefully before asking

Problem

I have started using Andengine, and after following some tutorials I'm starting to develope for myself. Right now I have a a BaseGameActivity where I call one splashScene(working fine) and after that my MenuScene. If i set a simple background (just color) it loads fine (all menu text are displayed), but when i try to set a repeating sprite as background, a black screen appears (no error show in logcat) I'm using the example code for the background ``` super(BaseActivity.getSharedInstance().mCamera); activity = BaseActivity.getSharedInstance(); RepeatingSpriteBackground mGrassBackground = new RepeatingSpriteBackground(mCamera.getWidth(), mCamera.getHeight(), activity.getTextureManager(), AssetBitmapTextureAtlasSource.create(activity.getAssets(), "images/menu/background.png"), activity.getVertexBufferObjectManager()); this.setBackground(mGrassBackground); ``` I placed this code in the MenuScene constructor. Thanks in advance and sorry for my English

Original source