Run a Playground Physics Simulation

Before jumping back into the Gloop Drop game project, open the PhysicsSimulation.playground file in the projects/playgrounds folder. Playgrounds offer an interactive development environment where you can prototype and test your code in real time. The PhysicsSimulation playground is a small, custom playground that you can use to play around with the SpriteKit physics engine.

The image shows the PhysicsSimulation playground in its running state.

images/WorkingWithPhysicsAndCollisionDetection/playground-callouts.png

To run the playground, click the Execute button in the bottom-left corner. This action runs the code and loads the SpriteKit scene in the Live View. You may need to start ...

Get Apple Game Frameworks and Technologies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.