Summary

In this chapter, we saw how to make a 3D game in SceneKit. From making simple geometries to making floors, we created a fully-fledged game with a complete game loop. We added a scene already created in a 3D software package with animation and imported it into SceneKit.

We imported the COLLADA objects into the scene and saw how to access the objects through code. We added an enemy and physics to the scene. We used SceneKit's physics engine to calculate collision and also applied force to hero objects.

Additionally, we also saw how to integrate SpriteKit into SceneKit to display the score and buttons on the scene. We also used SpriteKit's touchBegan function to detect touches on the screen and created the play and jump buttons.

Parallax scrolling ...

Get Swift Game Development - Third Edition 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.