At the developer conference WWDC, in June this year, Apple showed a new class in SpriteKit: SKConstraint. It can be used to define constraints for the orientation, the distance or the position of SpriteKit nodes. In my todays blog post I'll show how to use SKContraints to implement a follow and targeting behavior. I have updated this tutorial to XCode 6.1!
Monday, September 22, 2014
HowTo: Implement targeting or follow behavior for sprites with SpriteKit and SKConstraint in SWIFT
Welcome to Part 14 of my blog series about iOS game development.
Thursday, September 18, 2014
How to use an Universal Storyboard in Xcode
Welcome to Part 13 of my blog series about iOS game development.
At the developer conference WWDC, in June this year, Apple showed a nice concept for targeting multiple form factors: The Universal Storyboard. Basically this replaces the iPad and the iPhone specific storyboards with one universal storyboard. To enable different layouts for tablet and phone form factors it's working closely together with Autolayout and Size Classes.
I'll not explain Autolayout and Size Classes deeply in this post. My main motivation was to find out how to convert an old Xcode project with two storyboards into one universal storyboard. If you start a new project, the universal storyboard will be created by default.
I'll not explain Autolayout and Size Classes deeply in this post. My main motivation was to find out how to convert an old Xcode project with two storyboards into one universal storyboard. If you start a new project, the universal storyboard will be created by default.
As a start project you can use the MyGame project from my earlier posts. You can download it from GitHub: v0.9
This sample needs Xcode 6.
Subscribe to:
Posts (Atom)