Unity.4.x.Game.Development.by.Example.Beginners.Guide.Dec.2013
文件大小:
9803k
资源说明:Chapter 1: That's One Fancy Hammer! 9
Introducing Unity 3D 9
The engine, the tool, and the all-weather tires 10
Unity takes over the world 11
Why choose Unity? 11
Why burn this book and run away screaming? 12
Browser-based 3D – welcome to the future 13
Time for action – install the Unity Web Player 13
Welcome to Unity 3D! 14
What can I build with Unity? 14
FusionFall 14
Completely hammered 15
Should we try to build FusionFall? 15
Another option 16
Off-Road Velociraptor Safari 16
Fewer features, more promises 17
Maybe we should build Off-Road Velociraptor Safari? 17
I bent my Wooglie 17
Big Fun Racing 18
Diceworks 18
Lovers in a Dangerous Spacetime 20
Showcase Showdown 20
Unity Technologies – "Made with Unity" page 21
Kongregate 21
The iOS App Store 22
Table of Contents
[ii ]
Walk before you can run (or double jump) 22
There's no such thing as "finished" 23
Stop! Hammer time 23
Fight Some Angry Bots 24
The wonders of technology! 26
The Scene window 26
The Game window 27
The Hierarchy panel 28
The Project panel 29
The Inspector panel 30
Heads Up? 31
Layers and layout dropdowns 33
Playback controls 33
Scene controls 33
Don't stop there – live a little! 34
Summary 35
Big ambition, tiny games 35
Chapter 2: Let's Start with the Sky 37
That little lightbulb 38
The siren song of 3D 39
Features versus content 40
A game with no features 40
Mechanic versus skin 41
Trapped in your own skin 41
That singular piece of joy 42
One percent inspiration 42
Motherload 43
Possible additional features: 45
Heads up! 46
Artillery Live! 46
The skinny on multiplayer 50
Bang for your buck 51
Pong 52
The mechanic that launched a thousand games 54
Toy or story 56
Redefining the sky 58
Summary 59
Let's begin 59
Table of Contents
[iii ]
Chapter 3: Game #1 – Ticker Taker 61
Kick up a new Unity project 62
Where did everything go? 63
'Tis volley 63
Keep the dream alive 64
Slash and burn! 64
The many faces of keep-up 65
Creating the ball and the hitter 65
Time for action – create the Ball 66
A ball by any other name 67
Time for action – rename the Ball 68
Origin story 68
XYZ/RGB 70
Time for action – move the Ball Into the "Sky" 70
Time for action – shrink the Ball 71
Time for action – save your scene 72
Time for action – add the Paddle 73
What's a Mesh? 75
Poly wants to crack your game performance? 78
Keeping yourself in the dark 78
Time for action – add a light 79
Time for action – move and rotate the light 80
Extra credit 83
Are you a luminary? 84
Who turned out the lights? 84
Darkness reigns 84
Cameramania 85
Time for action – test your game 86
Let's get physical 87
Add physics to your game 87
Understanding the gravity of the situation 88
More bounce to the ounce 89
Time for action – make the Ball bouncy 89
Summary 92
Following the script 93
Chapter 4: Code Comfort 95
What is code? 95
Time for action – write your first Unity Script 96
A leap of faith 97
Table of Contents
[iv ]
Lick it and stick it 99
Disappear me! 99
It's all Greek to me 100
You'll never go hungry again 101
With great sandwich comes great responsibility 102
Examining the code 103
Time for action – find the Mesh Renderer component 103
Time for action – make the ball re-appear 104
Ding! 105
Time for action – journey to the Unity Script Reference 105
The Renderer class 107
What's another word for "huh"? 110
It's been fun 111
Time for action – unstick the Script 111
Gone, but not forgotten 112
Why code? 113
Equip your baby bird 113
Time for action – create a new MouseFollow Script 113
A capital idea 115
Animating with code 116
Time for action – animate the Paddle 117
Why didn't the Paddle animate before? 118
Pick a word – (almost) any word 118
Screen coordinates versus World coordinates 119
Move the Paddle 120
Worst. Game. Ever. 121
See the matrix 121
Time for action – listen to the paddle 121
A tiny bit o' math 122
Tracking the numbers 123
Futzing with the numbers 124
Time for action – Log the New Number 124
She's a-work! 125
Somebody get me a bucket 125
Time for action – declare a variable to store the Screen midpoint 126
Using all three dees 128
Time for action – follow the y position of the mouse 129
A keep-up game for robots 129
Once more into the breach 130
Table of Contents
[v ]
Time for action – re-visit the Unity Language Reference 130
Our work here is done 131
Time for action – add the sample code to your Script 131
One final tweak 133
What's a quaternion? 133
Wait, what's a quaternion? 133
WHAT THE HECK IS A QUATERNION?? 133
Educated guesses 134
More on Slerp 135
Right on target 136
Keep it up 137
Beyond the game mechanic 138
C# Addendum 138
Chapter 5: Game #2 – Robot Repair 143
You'll totally flip 144
A blank slate 145
You're making a scene 146
Time for action – set up two scenes 146
No right answer 147
Time for action – prepare the GUI 148
The beat of your own drum 149
Time for action – create and link a custom GUI skin 150
Time for action – create a button UI control 152
Want font? 156
Cover your assets 158
Time for action – nix the mip-mapping 159
Front and center 160
Time for action – center the button 161
The waiting game 162
The easiest button to button 162
To the game! 164
Time for action – add both scenes to Build List 165
Set the stage for robots 166
Time for action – prepare the game scene 167
The game plan 167
Have some class! 168
Time for action – store the essentials 170
A matter of great import 171
Table of Contents
[vi ]
Building a better bucket 172
How big is your locker? 173
Start me up 174
Going loopy 175
The anatomy of a loop 175
To nest is best 176
Seeing is believing 177
Time for action – create an area to store the grid 178
Build that grid 179
Now you're playing with power! 181
C# addendum 182
Chapter 6: Game #2 – Robot Repair Part 2 187
From zero to game in one chapter 187
Finding your center 189
Time for action – centering the game grid vertically 189
Time for action – centering the game grid horizontally 192
Down to the nitty griddy 194
Do the random card shuffle 195
Time for action – preparing to build the deck 195
Let's break some robots 196
Time for action – building the deck 196
Time for action – modifying the img argument 200
What exactly is "this"? 202
Random reigns supreme 205
Second dragon down 205
Time to totally flip 205
Time for action – making the cards two-sided 206
Time for action – building the card-flipping function 207
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。