Jan02

An Introduction to Apple’s Sprite Kit

Sprite Kit is graphics rendering and animation infrastructure for 2D game development which was announced along with iOS 7 at the Apple World Wide Developer Conference.  Game developers have long used sprites as independent graphic elements in game programs that are animated over a different background layer.  By way of example, the title character in Pac-Man, as well as the ghosts that chase it, are sprites.

Sprite Kit is another example of Apple encouraging developers to use the native APIs built into the iOS development environment to create elements.  In this case, Sprite Kit is intended to be used in game development.  So let’s take a closer look at it.

Of course, there are other 2D frameworks that the iOS developer could use, but Apple is making it easy for developers to work with what will be seen as a development standard by having Sprite Kit baked into the app creation environment.

Sprite Kit Benefits

While non-native 2D frameworks may have their merits, there are some key benefits to using Sprite Kit for game development:

  • Support for future iOS Versions: Let’s be honest – using Apple’s development tools ensures that the stuff will work with future versions of iOS.  We saw a massive revamp to the development environment as well as the look and feel of the operating system itself with iOS 7.  There is no telling where Apple may go with iOS 8 and beyond, and therefore there is no certainty that a 3rd party framework will be compliant with upcoming changes Apple might push.
  • Ease Of Use: While using third party framework like Cocos2D, we need to use Box2D or Chipmunk in order to support a physics simulator.  Sprite Kit has a physics simulator integrated with it.
  • Performance: The nature of a native framework means that developers will likely see performance gains out of the box, so long as they employ best practices.
  • Tools: Automatic atlas creation and Built-In Particle editor are couple of very good built-in tools available in Sprite Kit.

Sprite Kit Gotchas

There are some points where SpriteKit also some major drawbacks:

  • Platform Limitation –As Sprite Kit only works within the iOS development environment, you won’t be able to easily create versions of your game for Android or Windows Phone platforms.
  • Feature Limitations – As Sprite Kit is still in its infancy, it simply isn’t as robust as other frameworks, so it lacks features like Shaders and Camera.
  • Existing Pitfalls – Some aspects of the Sprite Kit like multitasking, stretched textures and scene setup don’t work as our developers would expect and we’re finding the documentation to be lacking.

Despite the pros and cons, it is clear that Apple recognizes that developers want to create games for the iPad and iPhone, and the company is committed to making game development easier for iOS developers. We touched on this in an earlier blog post looking at the new iPhone game controllers officially blessed by Apple.

Apple's iPad mini

Overall, Unbounded Solutions iOS developers give high marks to Sprite Kit.  It makes it relatively simple to create game applications for that platform.  It is simple and intuitive to use and has an expressive API.  There are some limitations as noted above, and the physics system might not be suitable for all game concepts.  But for developers targeting the iOS space with their games, Apple has come up with a winner in Sprite Kit.

What are your thoughts and experiences with Sprite Kit?  Please add your comments and concerns below and if you find this to be useful, please be sure to share this across your social networks.

 

Leave a Comment

Your email address will not be published. Required fields are marked *