kivent
kivent copied to clipboard
No clear way to sprite z sort
Specific to my situation (using a Tiled map), I'd love to have sprites in a layer that can be z ordered based on their Y positioning. If this can't be done without heavy workaround, is it in the plans for the future?
@spinningD20 I guess it's a very specific use-case. Is it something like u have a player and u want to make it disappear (or appear) as the player moves along the y-direction ?
http://www.cocos2d-x.org/wiki/TileMap#Using-multiple-TMX-Layers-and-z-order
See the example image underneath that section, that's what I'm after
@spinningD20 I had talked to @Kovak about this when I first started implementing layers in the maps module. Currently, the way to add z-index is to create multiple systems and place them in correct order, and let kivy handle the overlapping. This is what is being done in the init_map_systems right now.
I think having a z-index param in the renderer would need rethinking of the batching code and maybe something more.
EDIT: One more problem would be that you wouldn't be able to combine sprites and coloured polygons to get something like sprite-poly-sprite, because they require different systems.
+1 For having the ability to manage order in rendering sprites.