I'm trying to reduce the framerate to a maximum of 30 FPS. The official documentation says to use:
skView.frameInterval = 2;
I read through all the available documentations as well as every similar question asked here on stackoverflow or in other pages/blogs/etc. I tried it in so many ways but where ever I tried to set the property it did not affect the FPS.
I am not using any other timing mechanisms than those from SpriteKit. I am setting it up accordingly to the documentation and to the answers here on Stackoverflow.
I even started the basic SpriteKit template provided with Xcode and tried to set the frame rate property but even that did not work out.
Does anyone experience any similarities? Is there an alternative way to reduce max fps? What else can I try to reduce FPS?
BTW.: I am working on OS X and have a first-gen Retina Macbook Pro - Maybe it's a hardware issue?
EDIT:
I am not overriding the -(void)update:
method - only -(void)didSimulatePhysics
This is what I do in a NSViewController Subclass which I set in Interface Builder. self.spriteKitView
is an outlet to the NSView
of my NSViewController
-Subclass
-(void)setupSpriteKitView {
self.spriteKitView.frameInterval = 2;
self.spriteKitView.ignoresSiblingOrder = YES;
self.spriteKitView.showsFPS = YES;
self.spriteKitView.showsDrawCount = YES;
self.spriteKitView.showsNodeCount = YES;
}
-(void)viewDidLoad {
[super viewDidLoad];
[self setupSpriteKitView];
[self loadStartupScene];
}
I even tried to put this into my SKScene-Subclass, attach it as user-property inside Interface Builder to the SKView.
How I now it's not working? Both in my game and the Xcode template the debug output says 60 FPS. And even when reducing skView.frameInterval = 4
the animations stay smooth.