Group Group Group Group Group Group Group Group Group

Video Tutorial: How to Make a Game Like Flappy Bird

#1

Enjoyed the video course creating the game. Was wondering if there is a way to prevent Felipe from flying off screen above the cactus and scoring points?

#2

@paradox927 Can you please help with this when you get a chance? Thank you - much appreciated! :]

#3

Hi @bbishop1958. Sorry for not seeing your question earlier.

There are a number of ways to accomplish this, however, one of the easiest and quickest ways is to create an additional physics body. As an example:

let upperLeft = CGPoint(x: 0, y: size.height)
let upperRight = CGPoint(x: size.width, y: size.height)
let upperBody = SKPhysicsBody(edgeFrom: upperLeft, to: upperRight)
physicsBody = SKPhysicsBody(bodies: [lowerBody, upperBody])
closed #4

This topic was automatically closed after 166 days. New replies are no longer allowed.