Cocos2d has issues with properly displaying game characters and other sprites behind partially occluding tiles in tile maps, unless you apply the following steps:
1、 select the Ground layer and clickLayer➤Layer Properties....Add a new property named cc_vertexz and set its value to -1000.
Do the same with the Objects layer but instead of entering -1000, enter the string automatic 。
2、
Listing 11–1.Manually Initializing cocos2d’s EAGLView
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];if ([CCDirector setDirectorType:kCCDirectorTypeDisplayLink] == NO)
[CCDirector setDirectorType:kCCDirectorTypeNSTimer];
CCDirector *director = [CCDirector sharedDirector];[director setAnimationInterval:1.0/60];
EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
pixelFormat:kEAGLColorFormatRGB565
depthFormat:GL_DEPTH_COMPONENT24_OES];
[director setOpenGLView:glView];[window addSubview:glView];[window makeKeyAndVisible];
// this fixes the zoomed out ground layer:[director setProjection:kCCDirectorProjection2D];