Hello Guest

Author Topic: A question about performance  (Read 3995 times)

mheydlauf

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
A question about performance
« on: June 09, 2014, 06:59:45 pm »
Hello,

I'm developing a side-scrolling 2D game using 2D toolkit.  For my backgrounds I have 2 layers of city buildings for parallaxing.  Originally I had one SpriteCollection spanning 6 atlases.  Each layer of background was 1 large 2dtkSprite (about 2000x1000).  In order to make things more efficient I broke the background elements down into individual building sprites, and then created Prefabs with multiple sprites side by side to recreate the landscape (some of these smaller sprites are hflipped for variety).  I now have just one atlas for all my backgrounds.

However, since moving to this scheme I've noticed a slight hiccup in performance every once in a while -- just looks like the game drops a few frames intermittently.  Any ideas why going from one large sprite to multiple smaller ones (all in the same collection/atlas) in a prefab might negatively impact performance?

Many thanks for your insight,
Mike.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: A question about performance
« Reply #1 on: June 10, 2014, 10:39:32 am »
No idea, but you should grab a profile for this. It will almost instantly tell you what it is thats causing the hiccup.