Apple's Sprite Kit framework targets games on iOS 7, OS X Mavericks & potentially Apple TVApple's new Sprite Kit development framework aims to make it easier to create 2D arcade style games for both iOS 7 mobile devices and the Mac desktop, and hints at a future strategy for games on Apple TV.
Sprite Kit is named after "sprites," the independent graphic elements in a video game that are typically animated over a separate background layer (think of the alien ships in Space Invaders or Pac Mac and the ghosts that chase him).
In addition to animating sprites (which can include other media elements such text and video) within a scene, Sprite Kit also simulates realistic physics to depict the force of gravity and inertia (such as in the swinging, weighted candy in Cut the Rope or the motion of balls bouncing off the banks of a billiard table) and can, like Motion, generate particle effects (such as clouds of fog or the flames erupting from a rocket's thrusters).
Sprite Kit offers a higher level framework for games developers that animates the components of their game artwork on the screen without requiring advanced knowledge of the underlying OpenGL code it abstracts below it, running at a much lower level on a device's graphics processor cores.
This puts Sprite Kit on a similar level to Core Animation, a framework Apple introduced with the iPhone to enable app developers to build smooth transitions and other graphic effects without needing to master the complexities and specialized GPU programming involved with coding raw OpenGL.
Zynga and Cocos2D
The concept behind Sprite Kit isn't at all new; iOS developers can already use one of a variety of third party gaming frameworks, such as Cocos2d-iphone, to get similar functionality.
However, by building its own Sprite Kit, Apple not only gained the ability to tightly integrate the framework with its Xcode development tools, but it also can ensure that its developers have access to tools that will both be around in the future, and grow in directions Apple desires.
One issue facing existing third party gaming frameworks is that, despite often being open source like Cocos2D, they may be acquired and taken in directions that aren't great for either Apple or its OS X and iOS developers.
In the case of Cocos2D, this happened last summer when Zynga hired Ricardo Quesada, the project's lead developer, leaving the project's future direction in question.
Months prior to his hiring, Quesada had described plans to bring Cocos2D to the Mac, but now that he's working for Zynga, that project's future is also unknown.
It also told developers they could now use its new Cocos2D JS to "write your code just once and have run in all major web-browsers through HTML5 and with close to native performance on iOS and Android devices."
Zynga's interests in focusing on HTML5 apps do not align with Apple's desire to have iOS remain the best native platform for gaming, and it doesn't do anything to help port great games to the OS X App Store either.
Apple storms the castle for 2D games on iOS, OS X
Apple has increasingly moved away from depending upon third parties to supply strategic components of its platform, whenever possible.
From developing its own Safari web browser to writing its own implementation of SMB to declaring its independence from Adobe Flash, Apple is working to avoid having its platforms hijacked in the pattern of Office, Adobe apps or Google Maps.
Writing about Apple's Sprite Kit launch, games developer Steffen Itterheim notes that, in possessing its own framework, Apple can make sure developers don't suffer through "compatibility problems with new [iOS] software releases," stating that "Sprite Kit will work flawlessly with new versions of Xcode, iOS, OS X, and whatever other software Apple changes."
"Sprite Kit is beginner-friendly. It has the typical well-designed, trimmed, sleek API youd expect from Apple."
In particular, Apple can maintain very similar versions of its Sprite Kit for both iOS and OS X, and even deliver an Apple TV version the moment it decides to opening up an HDTV App Store, something a third party web app publisher or a resource-constrained open source project is unlikely to even have on its radar.
Itterheim, who literally wrote the book on developing with Cocos2D, said the framework "was constantly being changed. Practically every new version introduced some changes that forced developers to change their code," and added that the "Cocos2D API leaves a lot to be desired," and that "concise, consistent and complete documentation does not exist anywhere."
In contrast, he expects Apple's new Sprite Kit to remain stable, predicting that developer's "half-life of knowledge, tutorials and books will increase, perhaps tremendously so."
He also states, "Sprite Kit is beginner-friendly. It has the typical well-designed, trimmed, sleek API youd expect from Apple. Its got excellent documentation thatll stay up to date and is complete."
Quesda, the lead developer of Cocos2D, agreed in a tweet: "Sprite kit is very good," he wrote. "less features than cocos2d but better. I like the physics integration."
Sprite kit is very good. With less features than cocos2d but better. A like the physics integration. Ricardo Quesada (@ricardoquesada) June 12, 2013
Apple and 3D development
Itterheim also stated that he doesn't expect Apple to rush to next deliver a 3D gaming engine like Unity and Unreal, which are used by a specialized set of major game developers including id Software, Epic, Ubisoft and EA.
"3D games are dominated by big game developers and publishers," he states. "Its one way they can distinguish themselves most easily from Indie productions."
In 2011, Apple introduced Scene Kit as OS X-only framework designed to import COLLADA 3D objects and build scenes composed by cameras, lights, and meshes.
The framework provides tools for manipulating the bounding volumes, geometry and materials used in the scene, acting as a middleware between low level OpenGL and higher level frameworks like Core Animation or Sprite Kit.
Apple's gaming push
However, Apple hasn't yet ported its Scene Kit framework to iOS yet, which has kept it isolated from the mainstream of App Store development. Instead, Apple is targeting the mass market for 2D arcade style games in iOS 7, the types of titles that make up the majority of downloads in the App Store.
Combined with this new software push, Apple is also working to define standard game controllers as part of its "Made for iPod/iPhone/iPad" programs.
Along with iOS 4's Game Center, which Apple ported to OS X Mountain Lion last year, the company's most recent efforts to standardize, monetize and facilitate game development in the App Store points to an increasingly strong position in mobile gaming that many observers expect the company to eventually transition into the living room.
On Topic: Apple TV
- Rumor: Apple could be plotting new multitouch Bluetooth remote, OS X El Capitan beta reveals
- Apple expressed interest in 4K video streaming in 2013, leaked Sony documents show
- Apple TV leaps into first place as iOS dominates online video market, Adobe reports
- Updated Apple TV hardware not coming to WWDC 2015, report says
- CBS bringing standalone, cable-free Showtime subscription to Apple TV [u]