iOS spritekit nodes stutter when transitioning from scene

Posts: 1
Joined: 2014.12
Post: #1
I'm developing a game in iOS Spritekit using Objective C. I created a menu view in viewController and from that I'm calling a gameScene. In gameScene I uses five different nodes which has to released one by one randomly from the top of the screen. Each of those five nodes have 4 different images so it is stored in atlas. If the node moves to the bottom of the screen I change the image in the node and release from the top of the screen.

I'm releasing the node using the following code
self.wait = [SKAction waitForDuration: 1.0]; = [SKAction runBlock:^{
if ([nodesArray count] > 0) {
   //select the node to release randomly and remove it from array
self.seq = [SKAction sequence: @[self.wait,]];

Those five nodes are stored in an array called nodesArray.

Now my problem is that I noticed a stutter when the nodes are released from the array. I don't know why these stutter are occurs as it's random, these predominantly occurs when the scene is restarted or If I come from another scene to game scene. When I come directly to GameScene without any intermediate scene with just a Launchscreen.xib , there is no stutter.

For restarting the scene I call the scene by the following code
GameScene *firstScene = [GameScene sceneWithSize:self.size];
[self.view presentScene:firstScene transition:[SKTransition fadeWithDuration:1.0]]

PS. I also tried implementing Menu as a scene and returning to game scene, nevertheless it too causes random stutter in the game scene irrespective of whether I remove the Node's & Actions before I leave the Game Scene.

This is the bug which is stopping me from releasing the game, so any help will be appreciated.
Quote this message in a reply
⌘-R in Chief
Posts: 1,277
Joined: 2002.05
Post: #2
A screen recording would be really useful to see what's going on. Without that it's not reaaaally clear what you mean.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  SpriteKit or Unity3d ? chits_12345 2 3,600 Jan 18, 2015 02:33 PM
Last Post: MattDiamond