isometric game with large objects and depth buffer in cocos2D

by Jimmy Xu   Last Updated July 06, 2017 21:13 PM

It looks like Cocos2D offers an abstraction layer on top of openGL by allowing the developer to set the depth via zOrder or vertexZ on a per node basis. This breaks down for large than 1x1 nodes (e.g. 1x2, 2x1, 2x2) that span multiple isometric tiles, as multiple vertexZ values are needed for different parts of the node.

One solution to this is breaking the node up into 1x1 nodes each with their own vertexZ value. This is fairly cumbersome and requires additional logic and manually slicing up the sprite. The alternative solution, in openGL, seems to be running a depth test on each pixel using a depth buffer. Is this possible to do within cocos2D? or will it require a different rendering path completely?

Related Questions

iOS isometric game development workflow (Cocos2D)

Updated April 26, 2015 21:05 PM

Error running an Action in Cocos2d-x

Updated April 19, 2015 21:05 PM

How to update Cocos2D in an outdated ios app?

Updated October 05, 2017 11:13 AM