You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 8, 2018. It is now read-only.
It seems that using groups for both collision and depth sorting is quite inefficient. There are situations where you'd want the whole scene to be depth sorted, but only partial elements of it to be collision checked.
Consider a player in a scene full of objects, where you're not especially concerned about collisions between objects but you do want the player to collide with things (maybe a level made of static IsoSprites). In this situation, you only want to call collide between the player and the objects, and make use of the QuadTree/Octree for speed, but unless you pass a group in, the collision handler will simply check all objects in the scene.
Also, because IsoSprites usually need to be depth sorted, it feels like there should be a container that handles this automatically. With this in mind, I feel like an IsoGroup or IsoScene (or both) container should be implemented just to handle display ordering, and then groups could be placed in that to handle collision and so on, while allowing the groups to be used for collisions.
Any thoughts?
The text was updated successfully, but these errors were encountered:
This sounds like great idea. I also struggled with the differences between sorting and collision. But this seems like it would handle all scenarios and give flexibility without too much configuration.
At the moment, you can sort groups, which will mean a whole group is above or below another. This is probably what you meant anyway but I think the sorting should be on the children of the child groups and arrays. That way, if we have a cactus group, and a roadrunner group, we can sort them individually while colliding the roadrunners with the cacti with each otheri.
I ran into the same issue. I thought I could add isosprites to multiple groups. So I had a group for depth sorting and another for collisions. Of course I soon realized each sprite can only belong to one group.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It seems that using groups for both collision and depth sorting is quite inefficient. There are situations where you'd want the whole scene to be depth sorted, but only partial elements of it to be collision checked.
Consider a player in a scene full of objects, where you're not especially concerned about collisions between objects but you do want the player to collide with things (maybe a level made of static IsoSprites). In this situation, you only want to call collide between the player and the objects, and make use of the QuadTree/Octree for speed, but unless you pass a group in, the collision handler will simply check all objects in the scene.
Also, because IsoSprites usually need to be depth sorted, it feels like there should be a container that handles this automatically. With this in mind, I feel like an IsoGroup or IsoScene (or both) container should be implemented just to handle display ordering, and then groups could be placed in that to handle collision and so on, while allowing the groups to be used for collisions.
Any thoughts?
The text was updated successfully, but these errors were encountered: