Hello Guest

Author Topic: How many sprite collections to have?  (Read 3497 times)

Afro-Ninja

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 62
    • View Profile
How many sprite collections to have?
« on: December 06, 2013, 09:22:53 pm »
I know there is no hard and fast rule on this subject, but I'm trying to feel it out and plan accordingly for my game.

Right now my main sprite collection takes about ten seconds to commit when making changes. I'm about to add a very large boss to the game with a lot of sprites and odd shaped-moving parts. I feel like this will take a large toll on my existing collection. I think it makes sense to put the boss in his own collection because he only appears in one scene of the game, no need to have him loaded at all times.

So that begs the question- should each boss be in their own collection?
Is there any inherent risk to having too many collections altogether?

Right now I have a collection for my tiles, a collection for elements that don't need lighting, and then everything else. I just don't want to go overboard with the collection process. Much akin to how someone new to OOP starts making a class for everything they can think of.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How many sprite collections to have?
« Reply #1 on: December 07, 2013, 03:08:36 pm »
Thats perfectly fine. You don't need absolutely everything in one collection.
Think about draw calls - if something only appears once theres no harm in keeping it in its own collection, in fact it would be better as you'd be freeing up room in your main collection.

What you don't want to end up doing is having so many collections that you're drawing all of them all the time - you'll be paying quite dearly in terms of draw calls.