SpriteKit Perfomance

I noticed some performance issues with SpriteKit on iOS 9 beta 5 (at least on older devices).


My code on iOS 8.x runs at 60 FPS, but on iOS 9 beta 5 runs at ~30 FPS.

On the previous iOS 9 betas, the code ran at 60 FPS.


Does anybody else have the same issues?


My development devices are an iPad (4th generation) and an iPhone 4S. I don't have a newer device to test on.


Thanks,

Josh

Same experience here!

It appears 9.1 mostly fixed the FPS drop for me! Will drop to 40 fps for less than second then it goes back to 59~61 fps

Just updated to ios 9.1 and the FPS was closer to "normal" in my game. Not saying all issues has be resolved, but I think something has been fixed. I'm so motivated to continue using SpriteKit .. NOT 😕

Problems remain after iOS 9.1.


Building from the 9.1 SDK, to a 6S Plus running 9.1 still exhibits a notable FPS drop (60 to ~15 FPS) when running UIView animations in conjunction with pausing an SK scene. Never observed this issue prior to iOS 9. Filed a comprehensive radar - that ought to go without saying.


Pausing SKScenes while running UIView animations seem to be the only cause of poor performance since iOS 9.0. I haven't however observed weak performance in general - as so many complain of becoming locked at 40 FPS.

I suspect that the root cause is much lower-level than what has been described here, and so causalities are not quite so readily observable as that. For example, I'm not running any UIView animations in my game, and I still see the performance drops.

Yeah it's an odd thing - perhaps deeper than is obvious as you say...because I'm now the same as TOM above in that I no longer get occurences of locking out at 40fps .... so definitely something is fixed in 9.1 under certain circumstances.


LightingNode and Shader performance is still atrocious and unuseable for gameplay - fingers crossed this gets in the next few weeks.

9.2 beta has fixed the performance issues in my application as well as a bunch of other problems. The centerRect property is still broken but my game is almost back to functioning as it did on iOS 8. Hope some of you have luck with it as well.

Hi all,


Thank you for your patience. Many of these performance issues have been fixed in iOS 9.2 Beta 1 and Xcode 7.2 Beta 1, which are now available via the Developer Center. Please let us know if any of these issues persist, by filing a bug report or updating the original with a description.


Thank you.

Hi nilPill,


Thanks for testing out the 9.2 beta. Can you describe your centerRect issue in more detail, or do you have a radar for it that we could have missed. Please let us know if there are other issues still present.


Cheers

Hi greven,


Radar number 22874610. After setting the centerRect property and scaling the node, the texture appears stretched incorrectly. Compare the results with iOS 8 (or with how the documentation shows it working) and the difference should be easy to see. It would be great to see this fixed in 9.2 if possible.


Also can you provide information about how I should handle the two versions of iOS that run my game poorly? I would like to target iOS 8, just not 9.0 or 9.1. Should I warn the user when my app opens that they need to upgrade their OS? I'd like to know the correct protocol so my app isn't rejected when I submit it.


Thanks,

I've encountered another bug where the SKTransition properties pausesIncomingScene and pausesOutgoingScene are controlling the opposite scene. Setting pausesIncomingScene to NO will unpause the outgoing scene, while setting pausesOutgoingScene to NO will unpause the incoming scene. I've run the same project in iOS 8 where it behaves correctly.

Hi nilPill,


We see the issue in 22874610 if the sprite size is modified to stretch the texture before scaling. Is that the same issue you are seeing? If so; does your issue disappear if you don't first stretch the sprite via the size?


As for you second ask I'll have to seek guidance before giving a proper response; lest I relay incorrect or misguided information.


Cheers

Hi greven,


Here is the code I use that causes the problem (obviously you won't have the texture). It is pretty simple. If I don't resize the sprite in the initializer I still get incorrect results and it is not intuitive to work with it that way.


SKSpriteNode* t = [SKSpriteNode spriteNodeWithTexture:[SKTexture textureWithImageNamed:@"uv_checker_small.png"] size:CGSizeMake(60,60)] ;

t.position = CGPointMake(CGRectGetMidX(self.frame),

CGRectGetMidY(self.frame));

t.centerRect = CGRectMake(0.375, 0.375, .25, .25 ) ;

[t setXScale:5] ;

[self addChild:t] ;


Thanks for checking about the other issue, I look forward to any information you might provide.

Hi nilPill,


Thanks for bringing this to our attention. I'm able to reproduce this issue and have filed a bug report that we are actively working to fix. We will notify you (via this thread) as soon as a fix is in place.


Thank you.

Bump.


Hi greven, any word on how I should handle the different OS versions? Also when can I expect a fix for the centerRect property? (it is still broken in 9.2 beta 3).


thx

SpriteKit Perfomance
 
 
Q