Hello Guest

Author Topic: Static Sprite Batcher  (Read 4835 times)

spartan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Static Sprite Batcher
« on: May 12, 2012, 07:06:13 pm »
@unikron, I have been working on a game that needs a lot of sprites on the scenario (Ground is composed by sprites). So I decided to use the Static Sprite Batcher. But I have an issue, I grouped different sprites on game objects inside the static batcher to have it organized because I don't want to drop thousands of sprites of different type inside the static batcher without groups.
When I click on commit it says that no Sprite childs founds, but the sprites are inside the game object childs (each game object is a group of sprites). I think that there are 2 ways, make different Static Sprite Batchers (one for each group) or if you will consider to add a scan child objects when "commit" is clicked.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Static Sprite Batcher
« Reply #1 on: May 13, 2012, 12:04:40 am »
I think a hierarchical representation of children is beneficial for more than just this so I'll go ahead and implement it. Drop me an email and I'll send you a code drop when its ready.

Edit: The system won't really support hierarchical scaling, as this is troublesome for more than one reason - the static sprite batcher doesn't store a full matrix which would be required for the flat structure it stores the data in. For example, a non-uniformly scaled parent with a rotated child will result in a skewed matrix for the child, which isn't supported at the moment.
« Last Edit: May 13, 2012, 12:14:23 am by unikron »