How stable is Swift + Sprite Kit as a framework for building a 2D iOS game?

Started by
2 comments, last by Serapth 9 years, 6 months ago
I wrote my last iOS game in C++ on top of Cocos2d-x but am unhappy with version 3 of Cocos2d-x and the direction that that framework is going. I'm thinking about switching to Swift for my next game, basically for the fun of learning a new language

I'd rather not have to fight with my development environment, though...

Advertisement

I looked at Swift and Spritekit to create this tutorial series shortly after it was announced. This was before Xcode 6 was released and the language has evolved a bit.

Swift is nice enough, but it is going to have some glaring defects due to being developed in a vacuum. That said, it's a massive improvement over Objective-C. Frankly it's one of those languages you can learn incredibly easy and Playgrounds make it even easier. The biggest fight you will probably have is adapting ObjC documentation to Swift.

SpriteKit on the other hand is just frankly great. It's small, focused and effective. The only parts I found frustrating were ones that relied on underlying Cocoa libraries, like for geometry.

If you are going to develop exclusively for iOS ( and most recent ones to boot ), SpriteKit and Swift are a great pick.

Serapth, do you know how much Swift has changed since you wrote your tutorial? (I'm looking for a Swift + Sprite Kit tutorial...)

The biggest breaking change was array syntax changes at beta 3. Plus some api changes too, but not much there since it's mostly underlying ObjC code.


This post discusses the change:

http://blog.teamtreehouse.com/keeping-changes-swift


I had someone contact me today about my tutorials and from what I can tell, there was only one breaking change and it was due to mutability I think. That's the big change, other than syntax.

A "let" array is unmutable now while a var array is.

This topic is closed to new replies.

Advertisement