-
Notifications
You must be signed in to change notification settings - Fork 57
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
Pixi-display - worth using for simple depth sorting? #24
Comments
If you dont need to sort through the tree, you can code it on your own: https://github.com/pixijs/pixi-display/wiki#how-to-not-use-pixi-display As you see, I favor gradual approach. |
Ahh, thanks I missed the wiki. |
I'm sure you will figure out the best sorting algorithm for your game. When you actually need to sort through the tree, give me your cirrent algorithm and i'll tell you how to embed it into pixi-display. |
In my case the displaylist is really shallow.
|
That page was updated. I suggest to look at new version, it has faster sorting. |
Is pixi-display recommended to use for basic z-index management?
In my case I have a simple tile-engine where I need to handle z-index for the game character.
Similar to this http://labs.phaser.io/view.html?src=src\depth%20sorting\Depth%20Sorting.js
The charater is only one image (no shadows etc).
I understand that pixi-display has a lot of clever features for handling z-index. But I am wondering if it worth using for more simple depth sorting as the one above.
My own idea was just to keep all displayobjects in a array and sort them on yPos and then re-add them to the displaylist on each update.
The text was updated successfully, but these errors were encountered: