O'Reilly logo

iOS Game Programming Cookbook by Bhanu Birani, Chhavi Vaishnav

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating physics bodies in the world

In this recipe, we will be creating a fresh game project and will set it up to be used in all the recipes. The game project will hold together the creation of a physics world along with some physics body objects. We will be using these physics objects to add joints between them.

Getting ready

To develop a mini game using the physics engine, start by creating a new project. Open Xcode and go to File | New | Project and navigate to iOS | Application | SpriteKit Game. In the popup, provide the product name as Physics Joints and navigate to Devices | iPhone and click on Next as shown in the following screenshot:

Getting ready

Click ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required