swiftsprite-kitflappy-bird-clone

Make physics change with self.speed in a Flappy Bird style game in SpriteKit?


I am currently using SpriteKit to create a Flappy Bird style game. I want the game to speed up under certain conditions, to make the game more difficult. At the moment, I am doing this via incrementing self.speed.

This works well for speeding up the game, but the issue is that the physics on the main character do not change, so if the character jumps up, they jump and fall the same as they would before the speed up.

This means the rest of the game-world is swept beneath their feet at high speed, allowing them to clear several obstacles on the path much easier than before.

Effectively, I need a way to change the physics, so that as it speeds up, the character's jump-arc stays relative to the objects on the screen.

Any advice on this would be great, thanks.


Solution

  • Use the physicsWorld .speed property to adjust the timing of your engine.