game-dev-monkey Posted April 7, 2016 Share Posted April 7, 2016 I have a group of clouds and from what I understand groups work like sprite pools, but also their creation order specifies the render order in the scene. I have 4 groups that I use for layering : backgroundLayer playerLayer foregroundLayer UILayer I have a cloud group that has my clouds an it's currently a child of my backgroundLayer so the clouds get rendered behind the player. The issue is that is some situations I want to have clouds in foregroundLayer. what is the best way to handle this? 1---> Should I have two groups of clouds, one for each layer? 2---> Or should I have one cloud group and add a cloud to the appropriate layer when needed and then when killing it move it back to the cloud group so that it's back in the pool I am spawning from? #2 seems messier, but only requires one cloud group. Link to comment Share on other sites More sharing options...
drhayes Posted April 8, 2016 Share Posted April 8, 2016 Two groups! I do something like that in game I'm working on, works great. Link to comment Share on other sites More sharing options...
Recommended Posts