Since the fps, ingame, sometimes drops from 35 to 10, for about 2-3 seconds (I found out which group is responsible for it) and goes back to ~35, I have the following questions:
1 sprite gets created (as in tetris blocks, but all blocks are the same) multiple times (not at once), so that eventually there are 20-60 instances of this sprite are on screen.
question 1:
- do the amount of private variables (in this case) affect performance?
- do the amount of animations (ranging from 1-5 frames) affect performance?
question 2:
Can it be that the "for each"-condition can be the cause of the framedrop, when there are 30-50 sprites on screen?
(the for each-condition states: for each sprite that overlaps with a certain box, create a new "extra points"-sprite. - so that every box, that overlaps that certain box, shows to the gamer that it is earning the extra points - by displaying that "extra points-sprite".)