- Game Development with Swift
- Stephen Haney
- 181字
- 2021-07-16 13:45:39
Chapter 2. Sprites, Camera, Actions!
Drawing with SpriteKit is a breeze. We are free to focus on building great gameplay experiences while SpriteKit performs the mechanical work of the game loop. To draw an item to the screen, we create a new instance of a SpriteKit node. These nodes are simple; we attach a child node to our scene, or to existing nodes, for each item we want to draw. Sprites, particle emitters, and text labels are all considered nodes in SpriteKit.
Note
The game loop is a common game design pattern used to constantly update the game many times per second, and to maintain the same gameplay speed on fast or slow hardware.
SpriteKit wires new nodes into the game loop automatically. As you gain expertise with SpriteKit, you may wish to explore the game loop further to understand what is going on "under the hood".
The topics in this chapter include:
- Preparing your project
- Drawing your first sprite
- Animation: movement, scaling, and rotation
- Working with textures
- Organizing art into texture atlases
- Centering the camera on a sprite
- 計(jì)算機(jī)組成原理與接口技術(shù):基于MIPS架構(gòu)實(shí)驗(yàn)教程(第2版)
- 程序員修煉之道:從小工到專家
- Unity 5.x Game AI Programming Cookbook
- Spark快速大數(shù)據(jù)分析(第2版)
- Learning Spring Boot
- 揭秘云計(jì)算與大數(shù)據(jù)
- 軟件成本度量國(guó)家標(biāo)準(zhǔn)實(shí)施指南:理論、方法與實(shí)踐
- SQL優(yōu)化最佳實(shí)踐:構(gòu)建高效率Oracle數(shù)據(jù)庫的方法與技巧
- 云數(shù)據(jù)中心網(wǎng)絡(luò)與SDN:技術(shù)架構(gòu)與實(shí)現(xiàn)
- 視覺大數(shù)據(jù)智能分析算法實(shí)戰(zhàn)
- 云計(jì)算寶典:技術(shù)與實(shí)踐
- 數(shù)據(jù)庫應(yīng)用系統(tǒng)技術(shù)
- 中國(guó)云存儲(chǔ)發(fā)展報(bào)告
- 信息融合中估計(jì)算法的性能評(píng)估
- 離線和實(shí)時(shí)大數(shù)據(jù)開發(fā)實(shí)戰(zhàn)