Sprites, Batches, Layers


This may be a simple question.

I have a scene composed of a few layers. I want some of the layers to contain sprites which are batched.

I guess I can have those layers contain a sprite batch node, which then contains sprites.

But then I wonder, do I need the layer at all? Maybe for those layers, instead of layer~~>batch~~>sprites I could just have batch->sprites.

In that case, can the batch node serve as the layer node? If not, what is the layer node giving me over and above the batch node?


AFAIK, the layer can additionally provide you support of touches and accelerometer. But surely you don’t need them on each layer, so your scene for instance can look as follows:

  |___ layer_game_nodes
  |      |______ batch_node_game_nodes_1
  |      |______ batch_node_game_nodes_2
  |      |______ batch_node_game_nodes_3
  |      |______ batch_node_game_nodes_4
  |      |
 ...    ...
  |___ layer_ui
  |      |______ batch_node_ui
 ...    ...


OK, I did manage to transform some of my layers into batch nodes, thanks.