0

I'm trying to show a map created with Tiled map editor using Cocos2d in an android game, but all tiles get corrupted I cannot add the image 'cause I don't have the reputation to do so. Do you have any idea why this is happening and how to solve this issue? The tiles appear but the color is screwed up, showing color gradients instead of a fixed color. Thanks! Pedro Zuppelli

1 Answers1

0

Add this code in your activity from where you are starting cocos 2d scene.

CCGLSurfaceView surfaceView;
surfaceView = new CCGLSurfaceView(GameStartActivity.this);
surfaceView.setEGLConfigChooser(8, 8, 8, 8, 0, 0);
surfaceView.getHolder().setFormat(PixelFormat.RGBA_8888);
setContentView(surfaceView);
Morten Kristensen
  • 7,412
  • 4
  • 32
  • 52
Ajit
  • 214
  • 1
  • 6