So, you’ve probably heard about this new SpriteKit thing in iOS 7, right? If not, here’s the elevator pitch:
Sprite Kit is a powerful graphics framework for 2D games such as side-scrolling shooters, puzzle games, and platformers. A flexible API lets developers control sprite attributes such as position, size, rotation, gravity, and mass. Sprite Kit’s OpenGL-based renderer efficiently animates 2D scenes. Built-in support for physics makes animations look real, and particle systems create essential game effects such as fire, explosions, and smoke. To assist SpriteKit-based game development, Xcode supports texture atlas creation and includes a particle creator.
Pleasant change having all that in your OEM toolkit, isn’t it? Here’s what you have for documentation:
The next question is, why would we decide to use anything else? Well, let’s see what Ray Wenderlich thinks:
After this a lot of you may be thinking, “Well, which 2D framework should I choose?”
The answer that depends on what your goals are. Here’s my 2c:
- If you are a complete beginner, or solely focused on iOS: Use Sprite Kit – it’s built in, easy to learn, and will get the job done.
- If you need to write your own OpenGL code: Stick with Cocos2D or another option for now, as Sprite Kit does not currently support this.
- If you want to be cross-platform: Choose Cocos2D-X or Unity. Cocos2D-X is nice because it’s “down to the wire”, built for 2D games, and you can do just about anything you want with it. Unity is nice because it gives you more flexibility (i.e. you can add some 3D aspects into your game if you want), however you have to go through a few more hoops to make 2D games.
The first two are gimmes, but the third takes a bit more thought. How’s your C++ or C# skills these days? You anywhere near as productive with either as in Objective-C? Make sure you factor that into your decision. How much of everything you want to do is actually cross-platform, and how much is going to require platform-specific work no matter what you do? How much extra time are you going to spend in the write once — debug everywhere loop? And what benefit are you actually going to get from jumping through all those hoops?
Around these parts, we’re solid advocates of doing whatever is fastest to get your MVP out, which means one platform, with all the latest labor-saving APIs. If it’s a hit, you’ll have plenty of money to hire people who know their stuff tp port it for you and/or write version 2 in a cross-platform manner while version 1 finances it. If it’s not … well, better you found that out before wasting more time and money on a cross-platform release, isn’t it? Make your own incremental revenue vs. extra resources invested vs. opportunity cost of delay model, and work it out for yourself. We’re pretty confident the ‘quick as you can with the least investment possible’ strategy comes out top under virtually all reasonable assumptions.
And just to put some sweet icing on that opinion cake, consider Apportable: cross-compile your iOS app for Android — surprisingly close to working last we tried it, and getting better all the time so we hear. And really, what other platform is worth any effort at all? Why, none worth even considering making part of your core competency, that’s our answer.
If that makes sense to you, and it should, consider doubling down on the iOS-first bet and going with Steffen Itterheim’s Kobold Kit:
Kobold Kit adds the following features above and beyond what Sprite Kit offers.
Add that up with their partnership with Apportable, and you’ve got a pretty interesting rapid development framework for the iOS-centric programmer.
Compelled yet? Here’s some more reading:
iOS Games by Tutorials is another Wenderlich team epic, and the best $54 you’ll spend getting up to speed. If you’re not that certain yet, of course there’s free tutorials in abundance:
Here’s some other notes and samples worth flipping through:
sprite-kit.com aims to be “a central hub of tutorials, books, open source projects and various assets for developers working with Sprite Kit”
and search Github for other tidbits too!
UPDATES:Continue Reading →