logo资料库

iOS Swift 4 游戏开发教程3D_Apple_Games_by_Tutorials_3.0.pdf

第1页 / 共473页
第2页 / 共473页
第3页 / 共473页
第4页 / 共473页
第5页 / 共473页
第6页 / 共473页
第7页 / 共473页
第8页 / 共473页
资料共473页,剩余部分请下载后查看
Table of Contents : Extended
Introduction
A history of SceneKit
What you need
Who this book is for
How to use this book
Whatʼs ahead: an overview
Section I: Hello, SceneKit!
Section II: The SceneKit Editor
Section III: Intermediate SceneKit
Section IV: Cross Platform Games
Section V: Advanced SceneKit
Section VI: Bonus Chapter
Book source code and forums
Book updates
License
Acknowledgements
Section I: Hello, SceneKit!
Chapter 1: Scenes
Getting started
The game project
Challenge
Cleaning up the game project
Setting up SceneKit
Where to go from here?
Chapter 2: Nodes
Getting started
Asset catalogs
The SceneKit coordinate system
Cameras
Geometry
Built-in view features
Challenges
Where to go from here?
Chapter 3: Physics
Getting started
Introducing the game utilities
Physics
Forces
Torque
Adding flair
Where to go from here?
Chapter 4: Render Loop
Getting started
The renderer delegate
Spawn timers
Removing child nodes
Where to go from here?
Chapter 5: Particle Systems
Getting started
Particle systems
Heads-up displays
Touch handling
Challenge
Shaping particle explosions
Adding juice
Where to go from here?
Section II: The SceneKit Editor
Chapter 6: SceneKit Editor
Getting started
SceneKit game project
SceneKit editor
Present a SceneKit scene
Cleaning up the scene
Where to go from here?
Chapter 7: Cameras
Getting started
The floor node
Heads-Up Display (HUD)
Cameras
Camera visual effects
Add a camera node
Node binding
Device orientation
Where to go from here?
Chapter 8: Lights
Getting started
Surface normal
Sphere nodes
Lights
Three-point lighting
Add light nodes
Where to go from here?
Chapter 9: Geometric Shapes
Getting started
Geometric shapes
Build barriers
Build the paddle
Challenge
Where to go from here?
Chapter 10: Basic Collision Detection
Getting started
Add physics
Handling collision detection
Adding touch controls
Camera tracking
Add a trailing effect
Challenge
Where to go from here?
Section III: Intermediate SceneKit
Chapter 11: Materials
Getting started
Lighting models
Materials
The game project
Skyboxes
Where to go from here?
Chapter 12: Reference Nodes
Getting started
The main character
Materials
Texture filtering
Challenge
Where to go from here?
Chapter 13: Shadows
Getting started
Shadows
Organizing the scene
Lighting
Re-usable sets
Challenge
Finishing touches
Where to go from here?
Chapter 14: Intermediate Collision Detection
Getting started
Setting up the SceneKit scene
Game utilities
Bit-masks
Enabling physics
Challenge
Where to go from here?
Chapter 15: Motion Control
Getting started
Game helpers
Sound effects
Node binding
Game state management
Motion control
Health indicators
Camera and lights
HUD updates
Finishing touches
Where to go from here?
Section IV: Cross Platform Games
Chapter 16: macOS Games
Getting started
Converting SceneKit games
Shared content for multiple targets
Final steps
Adding mouse input
Adding final touches
Where to go from here?
Chapter 17: tvOS Games
Getting started
Porting to tvOS
Sharing content between targets
Cleaning up the project
Adding platform specific code
Top-shelf and App icons
Where to go from here?
Chapter 18: watchOS Games
Getting started
Adding watchOS support
Sharing content between multiple targets
Adding the interface controller
Adding touch input
Adding final touches
Where to go from here?
Section V: Advanced SceneKit
Chapter 19: Transitions
Getting started
Create the game project
Set up the SceneKit view
Working with multiple scenes
Transitions
Where to go from here?
Chapter 20: Advanced Scene Creation
Getting started
Add the hero
Set up camera and lights
Add highways and traffic
Add trees
Add coins
Where to go from here?
Chapter 21: Actions
Getting started
Actions
Action timing functions
The action editor
Challenge
Coded actions
Add movement gestures
Where to go from here?
Chapter 22: Advanced Collision Detection
Getting started
Hidden geometry for collisions
Create a hidden collision node
Use the collision node
Create the render loop
Adding physics
Handling collisions
Where to go from here?
Chapter 23: Audio
Getting started
Add finishing touches
Challenge
Audio in SceneKit
Oh, thereʼs one more thing! :]
Where to go from here?
Section VI: Bonus Chapter
Chapter 24: 3D Art for Programmers
Getting started
Creating a voxel model
Exporting the voxel model
Importing voxel models
Challenge
Where to go from here?
Conclusion
3D iOS Games by Tutorials 3D Apple Games by Tutorials Chris Language Copyright ©2017 Razeware LLC. Notice of Rights All rights reserved. No part of this book or corresponding materials (such as text, images, or source code) may be reproduced or distributed by any means without prior written permission of the copyright owner. Notice of Liability This book and all corresponding materials (such as source code) are provided on an “as is” basis, without warranty of any kind, express of implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in action of contract, tort or otherwise, arising from, out of or in connection with the software or the use of other dealing in the software. Trademarks All trademarks and registered trademarks appearing in this book are the property of their own respective owners. raywenderlich.com 2
3D iOS Games by Tutorials Dedications "To my wife Corné and my daughter Marizé. Thank you for your patience, support, belief, and most of all, your love. Everything I do, I do for you." — Chris Language raywenderlich.com 3
3D iOS Games by Tutorials About the author Chris Language is a seasoned coder with 20+ years of experience, and the co-founder of Day Of The Indie. He has fond memories of his childhood and his Commodore 64; more recently he started adding more good memories of life with all his iOS devices. By day, he fights for survival in the corporate jungle of Johannesburg, South Africa. By night he fights demons, dragons and zombies! For relaxation, he codes and creates cool stuff for Day Of The Indie. You can find him on Twitter @ChrisLanguage and at DOTI (dayoftheindie.com). Forever Coder, Artist, Musician, Gamer and Dreamer. About the editors Toby Stephens is the technical/final pass editor for this book. Toby has been a software developer for over 25 years, working mainly in the financial sector. He is now Head of Development for Fuse, based in the UK. In his spare time he tinkers with writing Unity games, drawing Manga and creating music. You can follow him on Twitter @tjshae. Chris Belanger is the editor of this book. Chris is the Book Team Lead and Lead Editor for raywenderlich.com. He was a developer for nearly 20 years in various fields from e-health to aerial surveillance to industrial controls. If there are words to wrangle or a paragraph to ponder, he‘s on the case. When he kicks back, you can usually find Chris with guitar in hand, looking for the nearest beach. Twitter: @crispytwit. Tammy Coron is the senior technical/final pass editor of this book. Tammy is an independent creative professional and the host of Roundabout: Creative Chaos. She’s also the co-founder of Day Of The Indie and the founder of Just Write Code. For more information visit TammyCoron.com. raywenderlich.com 4
3D iOS Games by Tutorials Table of Contents: Overview Introduction Section I: Hello, SceneKit! Chapter 1: Scenes Chapter 2: Nodes Chapter 3: Physics Chapter 4: Render Loop Chapter 5: Particle Systems Section II: The SceneKit Editor Chapter 6: SceneKit Editor Chapter 7: Cameras Chapter 8: Lights Chapter 9: Geometric Shapes Chapter 10: Basic Collision Detection ............................................................. .................................. ............................................ ............................................. ........................................... ................................... ............................ .......................... ............................ ........................................ ........................................... ........................ ............ .................... ..................................... ........................ .................................... Chapter 11: Materials Chapter 12: Reference Nodes Chapter 13: Shadows Chapter 14: Intermediate Collision Detection Chapter 15: Motion Control ........................................................ ........................... 15 29 31 40 59 71 80 101 102 117 136 151 174 197 198 216 229 250 268 5 Section III: Intermediate SceneKit raywenderlich.com
3D iOS Games by Tutorials Section IV: Cross Platform Games Chapter 16: macOS Games Chapter 17: tvOS Games Chapter 18: watchOS Games Section V: Advanced SceneKit Conclusion 285 286 306 321 336 337 Chapter 19: Transitions 362 Chapter 20: Advanced Scene Creation Chapter 21: Actions 386 Chapter 22: Advanced Collision Detection 414 438 Chapter 23: Audio 453 454 472 ................... ........................... ............................... ......................... ........................ .................................. ........ ....................................... ... ......................................... ............................... ............ ............................................................ Chapter 24: 3D Art for Programmers Section VI: Bonus Chapter raywenderlich.com 6
3D iOS Games by Tutorials Table of Contents: Extended Introduction A history of SceneKit What you need Who this book is for How to use this book Whatʼs ahead: an overview Section I: Hello, SceneKit! Section II: The SceneKit Editor Section III: Intermediate SceneKit Section IV: Cross Platform Games Section V: Advanced SceneKit Section VI: Bonus Chapter Book source code and forums Book updates License Acknowledgements Section I: Hello, SceneKit! Chapter 1: Scenes Getting started The game project Challenge Cleaning up the game project Setting up SceneKit Where to go from here? Chapter 2: Nodes Getting started Asset catalogs The SceneKit coordinate system Cameras ............................................................. ........................................................................... ..................................................................................... ............................................................................. ........................................................................... .................................................................. .................................................................... ............................................................ ........................................................ ....................................................... ............................................................ .................................................................. ............................................................ ...................................................................................... ................................................................................................ ............................................................................. .................................. ................................................... ..................................................................................... ................................................................................ ............................................................................................ ............................................................. ............................................................................. ...................................................................... ................................................... .................................................................................... ..................................................................................... ........................................................ .............................................................................................. 15 16 17 17 17 18 19 20 21 22 24 25 26 26 27 28 29 31 31 32 35 35 36 39 40 40 42 48 49 raywenderlich.com 7
3D iOS Games by Tutorials ............................................................................................. ........................................................................... ........................................................................................... ...................................................................... ................................................. .................................................................................... .............................................................. ................................................................................................. .................................................................................................. ................................................................................................. .......................................................................................... ....................................................................... .......................................... ..................................................................................... ......................................................................... ....................................................................................... ......................................................................... ....................................................................... ................................... .................................................................................... ................................................................................... ............................................................................... .................................................................................... ............................................................................................ ................................................................ ......................................................................................... ...................................................................... Geometry Built-in view features Challenges Where to go from here? Chapter 3: Physics Getting started Introducing the game utilities Physics Forces Torque Adding flair Where to go from here? Chapter 4: Render Loop Getting started The renderer delegate Spawn timers Removing child nodes Where to go from here? Chapter 5: Particle Systems Getting started Particle systems Heads-up displays Touch handling Challenge Shaping particle explosions Adding juice Where to go from here? Section II: The SceneKit Editor Chapter 6: SceneKit Editor Getting started SceneKit game project 51 55 57 58 59 59 59 61 64 66 68 70 71 71 73 75 76 79 80 80 81 91 93 96 97 99 99 101 102 102 103 .......................... ................................... ................................................................................... ...................................................................... raywenderlich.com 8
分享到:
收藏