I am currently struggling with the following problem:
I am creating a Sprite Kit game in Objective-C, in which I have to use a parallax-animation in all 3 scenes. I use clouds with randomly generated X and Y positions. They appear in the greeting scene, in the game scene and in the highscore scene.
Problem: whenever I switch from one scene to another, I have to restart the parallax-animation, which leads to an messy interruption.
What might be the best strategy to keep the "cloud scene" running all the time in the background, no matter how many times you switch between the game scenes?
Thanks in advance.
For this purpose, consider using only one scene and for each game theme (i.e greeting, game, highscore) use an SKNode
which will contain the required elements for its purpose (e.g. the greeting node will have its greeting elements).
This way you can easily keep a "constant" SKNode
(i.e. add it once to the scene when the game is first loaded) which will contain your parallax clouds and add/remove required node for the greeting game and highscore when necessary
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With