4 ms·
Hi, thanks for asking... At the time, I didn't have any game-specific tutorials for Swift when I started. That's largely because I started with the first Xcode
by Arjuna 11y ago
Hi, thanks for asking...
At the time, I didn't have any game-specific tutorials for Swift when I started. That's largely because I started with the first Xcode beta (Xcode 6 Beta 1) that was released with Swift support in 2014. It was so new, that there just wasn't much out there.
That said, I used the Swift documentation that Apple released as a guide to the language. I also used the Objective-C (There wasn't a Swift version at the time) SpriteKit Guide [1] as a way to get a handle on SpriteKit. If you aren't familiar with it, it's essentially an Apple framework for working with sprites, physics, collision detection, etc. It's similar in spirit to Cocos2d, if you are familiar with that.
Then, I just brute-forced my way through a Swift equivalent of the syntax. It was a slow process. My first version of the game was just displaying the player's ship on the screen, and then I iteratively built the game up from there.
On a related note, I'm really proud of the way the enemy drones fly in the 3rd level. If you go to this link [2], it's the 4th screen-shot from the left. I implemented a Catmull-Rom spline generator that creates flight patterns for the enemy drones.
Fast-forward.... now, I think more game-specific Swift tutorials are available. I would definitely check out http://www.raywenderlich.com http://www.raywenderlich.com , for example.
Good luck!
[1] https://developer.apple.com/library/ios/documentation/GraphicsAnimation/Conceptual/SpriteKit_PG/SpriteKit_PG.pdf https://developer.apple.com/library/ios/documentation/Graphi...
[2] https://itunes.apple.com/us/app/rocket-renegade/id955229059?mt=8 https://itunes.apple.com/us/app/rocket-renegade/id955229059?...