Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No clear way to sprite z sort #211

Open
spinningD20 opened this issue Feb 28, 2017 · 4 comments
Open

No clear way to sprite z sort #211

spinningD20 opened this issue Feb 28, 2017 · 4 comments

Comments

@spinningD20
Copy link

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?

@saqib1707
Copy link
Contributor

@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 ?

@spinningD20
Copy link
Author

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

@udiboy1209
Copy link
Contributor

udiboy1209 commented Mar 1, 2017

@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.

@sireliah
Copy link

sireliah commented Apr 9, 2017

+1 For having the ability to manage order in rendering sprites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants