I'm making a game in Swift
using SpriteKit
. I have a SKSpriteNode
who is running a basic action. When I run it on Xcode
using an Iphone 4s, everything is smooth(high fps). However, when I run it on a bigger display like an Ipad, it's very slow (low fps). Here's is the basic code I use:
var node = SKSpiteNode()
//...
self.addChild(node)
//...
let action = SkAction.scaleBy(4, duration: 2)
//...
node.runAction(action)
Any ideas why? Thanks in advance... Anton
This is a common phenomena but has nothing to do with the different devices, but with the simulator of Xcode.
Don't compare the simulator-rendering with the real device-rendering.
If your game works on your iPhone 4S, it will most likely work on any other device. The Simulator isn't as powerful as the device. In 99.9% of all cases, the performance on a real device is much better.
So if you ever want to check the performance of your game, check it on a real device. Apple allows every developer to test it on the device, without buying a developer-account.