I'm making a little iphone game, and I would get some clues. Let's imagine:
Two background sprites moving pretty fast from right to left, and moving up and down with accelerometer.
I guess I can't use animations here, cause the movement of the background is recalculated at each frame. So I use a schedule with an interval of 0.025s and move my sprites at each clock with a :
sprite.position = ccp(x, y);
So here is my problem: the result is laggy, with only these two sprites.
I tried both declaring sprites in the header, and getting them with CCNodes and Tags. It's quite the same.
So if someone can give me a hint on what is the best way to do that, that would be so nice. I wonder if the problem can't be the fact that sprites are moving very fast, but i'm not sure.
Anyway, thanks for your time.
© Stack Overflow or respective owner