"sprite" entries

Parallax scrolling for iOS with Swift and Sprite Kit

Learn how to add this popular visual effect to your iOS project.

Up until the mid 1990s, the pinnacle of video game graphics was parallax scrolling: the use of multiple scrolling backgrounds, which created a sense of depth and perspective in the game. When you’re being a 2D game in Sprite Kit, you can create this effect by creating multiple sprites, and managing their position over time.

In this example, we’re creating a scene where there are four components, listed in order of proximity:

  • A dirt path
  • Some nearby hills
  • Some further distant hills
  • The sky

You can see the final scene below:

Read more…