ios - Applying an effect to a SKScene is that expensive? -


i developing game using spritekit. in response user getting bonus, flash screen 3 times while play action continues. flashing inverting scene colors, open use other effect.

i have tried use cifilter on scene, frame rate dropped 60 fps 13 fps, making game unplayable.

i have tried use cifilter on whole scene, doing this

cifilter * (^invert)(void) = ^ {    cifilter *filter = [cifilter filterwithname:@"cicolorinvert"];   [filter setdefaults];   return filter;  }; 

and changing scene

self.filter = invert(); self.shouldenableeffects = yes; 

i long time user of cocos2d. did kind of effect on app of mine developed cocos2d in past , had barely no impact on frame rate compared miserable frame rate using spritekit.

i have tried apply effect character represents user, barely 100x100 pixels. frame rate dropped 60 30fps... better game unplayable.

any way or achieve impressive brief effect whole screen play evolves?

thanks

i have game flash screen , following piece of code runs smoothly, can try out , repeat action per need :)

// flash background if contact detected         [self runaction:[skaction sequence:@[[skaction repeataction:[skaction sequence:@[[skaction runblock:^{             self.backgroundcolor = [skcolor redcolor];         }], [skaction waitforduration:0.05], [skaction runblock:^{             self.backgroundcolor = [skcolor bluecolor];         }], [skaction waitforduration:0.05]]] count:4], [skaction runblock:^{             //do additional wan run during flash period         }]]] withkey:@"flash"]; 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -