Original Title: 如何实现 2D 游戏效果
Author: 肖世飞 (Shifei Xiao, WWDC 17/18/19 Scholarship Winner)
Recording (Mandarin): https://b23.tv/BV1Mi4y1K7mb
SpriteKit
- Cross-platform, used by quite a lot of WWDC submissions
- Should probably use in-conjunction with other Frameworks
- vs UIKit: UIKit/SwiftUI has implemented a lot of controls, not necessarily great for creativity
- Why Game? A lot of freedom and user control, which SpriteKit also provides for development
Example Project - Math Adventure
Learning basic operations through SpriteKit game (Gold Miner but catch fish with the right answer)
xuekedou/MathAdventure
Why SpriteKit was a good choice for implementing this program?
- Per frame animation
- Collision detection (did the hook catch the fish?)
<aside>
💡 Though this playground was designed for Hong Kong elementary school students, it has all the elements of a great WWDC submission: music, attractive visual, music, instructions, a little coding, ...
</aside>
How to Learn SpriteKit?
Read the sample project above (modify the code to see if your understanding is correct), or read
2D Apple Games by Tutorials
For UW students, go to O'Reilly, login with UW account. Here are some alternative SpriteKit books:
- Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit will give you a quick tour of everything
- Getting Started with SpriteKit is more comprehensive
- iOS Swift Game Development Cookbook, 3rd Edition probably has everything you'll ever need to know
Recommended Topics to Learn