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:
Sprite Kit Programming Guide
Sprite Kit Framework Reference
Texture Atlas Help
Particle Emitter Editor Guide
SpriteKit Physics Collisions
The next question is, why would we decide to use anything else? Well, let’s see what Ray Wenderlich thinks:
Sprite Kit Tutorial for Beginners
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:
Features and Requirements
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:
Sprite Kit Tutorial for Beginners
Sprite Kit Tutorial: Animations and Texture Atlases
Sprite Kit Tutorial: How To Drag and Drop Sprites
How To Make a Game Like Space Invaders with Sprite Kit Tutorial: Part 1 and Part 2
Procedural Level Generation in Games Tutorial: Part 1 and Part 2
Sprite Kit Tutorial: Making a Universal App: Part 1 and Part 2
Here’s some other notes and samples worth flipping through:
SpriteKit Animations and TextureAtlasses describes how the always-awesome TexturePacker is a nice upgrade to the Xcode workflow
2D Game Development With SpriteKit — source at ChrisGrant / FirstSquadron
Spritekit Particle Fun — source at 7sharp9 / SpriteKit-Fsharp-Samples
iOS 7 Sprite Kit PhysicsDebugger
How I Went From 0 to Game with Sprite Kit in iOS 7
iOS 7 Sprite Kit: My Top 5 Pros and Cons
Sprite Kit vs. Cocos2D
Free Sprite Kit Video Tutorials
Use SpriteKit to Give Your iOS 7 Menu Some Animation!
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!
iOS 7 Tutorial Series: Introduction to Sprite Kit
Sprite Kit Tutorial: Space Shooter
Using Glyph Designer with Sprite Kit
SKPhysicsBody Path Generator
Open Source iOS Sprite Kit Helper Library That Makes Performing Common Behaviors Easier
iOS Library That Uses Swizzling To Draw Physics Bodies Makes Debugging Sprite Kit Physics Easier
Custom drawing in SpriteKit
Integrating Spine with SpriteKit Tutorial
SpriteKit Animations and TextureAtlasses
Airplay Tutorial: An Apple TV Multiplayer Quiz Game
Sprite Kit Tutorial: How to Make a Platform Game Like Super Mario Brothers – Part 1
Sprite Kit Helper Library Adding Support For Tileable Textures, Easier Animations And More
Continue Reading →