Chapter 5. Utilizing the Hardware and Graphics Processor

In the last chapter, we learned some techniques that helped us give our game an aspect of a complete and marketable product. In the following pages, we will make use of the capabilities of mobile devices as well as the accelerometer to add dynamic behavior. We will also learn some visual techniques, the use of shaders, and ways to add lighting and shadows to a game.

You will learn the following things in this chapter:

  • How to use the accelerometer
  • How to add shaders to the game
  • How to add lighting and shadows to the game

Using the accelerometer

One of the best technological advances brought by mobile devices is the accelerometer, which is a hardware mechanism that provides the capability of measuring ...

Get Getting Started with SpriteKit 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.