From this section onwards, we will develop a mini game that will have a dynamic moving body and a static body. The basic concept of the game will be to create an infinite bouncing ball with a moving paddle that will be used to give direction to the ball.
To develop a mini game using the physics engine, start by creating a new project. Open Xcode and go to File | New | Project and then navigate to iOS | Application | SpriteKit Game. In the pop-up screen, provide the Product Name as PhysicsSimulation
, navigate to Devices | iPhone and click on Next as shown in the following screenshot:
Click on Next and save the project on your hard drive.
Once the project is saved, you should be able to see something similar to the following screenshot:
In the project settings page, just uncheck the Portrait from Device Orientation section as we are supporting only landscape mode for this game.
Graphics and games cannot be separated for long; you will also need...