WEBVTT

00:00:17.000 --> 00:00:19.200
Welcome to Building Your
First Game with Unity.

00:00:20.040 --> 00:00:23.610
I am Adam Tuliper, a tech evangelist
with Microsoft. You can

00:00:23.660 --> 00:00:28.060
find me at adamt@microsoft.com. It's
an easy e-mail address to remember.

00:00:29.020 --> 00:00:32.510
Any questions you have on today's
session or working with Unity,

00:00:32.560 --> 00:00:35.280
please feel free to reach out to
me. We are all here to help.

00:00:35.330 --> 00:00:38.290
I'm here with my good friend
Carl Kalerwert from Unity.

00:00:38.340 --> 00:00:39.450
Tell us about yourself a bit.

00:00:39.500 --> 00:00:43.500
>> I am Carl Kalerwert. I work as
a public evangelist at Unity.

00:00:44.730 --> 00:00:48.300
Today I'm actually super excited to
be here at Microsoft and Unity.

00:00:48.350 --> 00:00:51.740
We have a great partnership that
allows us actually to give a

00:00:51.790 --> 00:00:55.690
full (inaudible) for free for Windows
8. But what I am really

00:00:55.740 --> 00:01:02.620
excited about is actually, like you, I like
to make rich, interactive content.

00:01:02.670 --> 00:01:03.620
I like to make games.

00:01:04.260 --> 00:01:06.190
And that's why I am going to show
you today how I make my own

00:01:06.240 --> 00:01:08.070
game and I am still working on it.

00:01:08.960 --> 00:01:11.790
From beginning to end, I want to
share that with you. As a public

00:01:11.840 --> 00:01:15.400
evangelist, there is no greater
excitement for me than to show

00:01:15.450 --> 00:01:19.170
and to meet with our community and
see later on your games also

00:01:19.220 --> 00:01:19.840
on the Windows door.

00:01:19.890 --> 00:01:22.760
>> You're going to learn that today
you can do some really, really

00:01:22.810 --> 00:01:26.740
powerful things real easily with
Unity. I found Unity probably

00:01:26.790 --> 00:01:29.850
less than a year ago. And it just
made sense, dove right in.

00:01:29.900 --> 00:01:32.130
So hopefully some of the things Carl
is going to demo today will

00:01:32.180 --> 00:01:35.420
kind of get you down that path. We're
going to be covering having

00:01:35.470 --> 00:01:38.760
Carl creating the game. He's going
to show you beginning to end,

00:01:38.810 --> 00:01:42.400
audio, how to create this cool looking
little runner. And then

00:01:42.450 --> 00:01:45.180
I will show you how to export from
Unity to run onto Windows

00:01:45.230 --> 00:01:48.890
phone and Windows 8, how to integrate
with the platform's specific

00:01:48.940 --> 00:01:51.350
features and then how to publish
your application. Just a couple

00:01:51.400 --> 00:01:54.240
little things to know since probably
a lot of folks in this room

00:01:54.290 --> 00:01:55.920
already know how to publish an ap.

00:01:56.610 --> 00:01:58.720
And this is what we're
going to create today.

00:01:59.400 --> 00:02:03.330
We can call it... I don't know... Flappy
Yeti or got any good names?

00:02:04.270 --> 00:02:05.440
>> Yeti and the Mushrooms.

00:02:05.780 --> 00:02:07.790
>> What? Yeti and the Mushrooms?

00:02:08.290 --> 00:02:10.230
>> That's my game.
It's my title.

00:02:10.280 --> 00:02:12.270
>> Whatever you want to call it.

00:02:12.320 --> 00:02:13.470
>> I'm the designer.

00:02:13.520 --> 00:02:16.570
>> Let me switch you over
here. It's all yours.

00:02:19.610 --> 00:02:21.370
>> So here we can see the little game.

00:02:22.390 --> 00:02:23.650
We see the software, Unity.

00:02:24.210 --> 00:02:28.430
But before I continue, who is new
to Unity? Raise your hand.

00:02:29.400 --> 00:02:32.840
Fantastic. Hold on a second.
Who has used Unity?

00:02:34.270 --> 00:02:36.540
Fantastic. Even better.

00:02:37.410 --> 00:02:40.650
So the benefit of listening to my
presentation and watching what

00:02:40.700 --> 00:02:44.420
I do is that you will see how easy
it is to become a successful

00:02:44.470 --> 00:02:46.490
game developer. Super easy.

00:02:47.320 --> 00:02:52.290
This is Unity. It's our software.
We can input artwork and then

00:02:52.890 --> 00:02:56.420
file export to all different platforms.
First thing, I'm going

00:02:56.470 --> 00:02:59.550
to show you the final result. The
final result is here displayed.

00:03:01.040 --> 00:03:07.850
I'll load here. So I have my friend Yeti
and my Yeti friend likes mushrooms.

00:03:08.330 --> 00:03:12.730
So we are going to collect some
mushrooms, champagne, and

00:03:12.780 --> 00:03:16.680
that's like an endless one, and
I could consider running around

00:03:16.730 --> 00:03:17.750
to get mushrooms.

00:03:19.400 --> 00:03:21.330
So we're going to recreate this.

00:03:21.950 --> 00:03:24.450
What I want to show you is here
and this view port is where we

00:03:24.500 --> 00:03:25.820
create our game.

00:03:26.900 --> 00:03:28.120
So here I can show you...

00:03:28.960 --> 00:03:31.060
>> I notice you had a flying bird
in there. Was that influenced

00:03:31.110 --> 00:03:31.980
by anything?

00:03:33.250 --> 00:03:34.140
>> Flappy bird.

00:03:35.200 --> 00:03:37.770
So we're going to, first of all,
create the environment.

00:03:39.010 --> 00:03:42.040
We can place the objects in there,
the artwork. Then we're going

00:03:42.090 --> 00:03:46.490
to focus on animation like how we actually...
where's my bird here?

00:03:46.540 --> 00:03:50.820
Okay. So there's a bird here. How
we can actually import the

00:03:50.870 --> 00:03:54.570
bird animations in there. And then
we're going to focus on our

00:03:54.620 --> 00:03:58.410
character, our character walking
around, jumping, and picking

00:03:58.460 --> 00:04:00.490
up mushrooms. Just going
to recreate this.

00:04:03.050 --> 00:04:06.300
What we're doing to do is recreate
this project. We are going

00:04:06.350 --> 00:04:09.750
to open here a current project.
It's actually an empty slate

00:04:09.800 --> 00:04:12.120
where the task is just
artwork imported here.

00:04:13.400 --> 00:04:16.610
The artwork was made in the software
PhotoShop where you can

00:04:16.660 --> 00:04:18.480
use all the software (inaudible).

00:04:19.130 --> 00:04:20.840
So you are going to quickly
open this here

00:04:22.230 --> 00:04:25.400
and 1, 2, 3. So an empty project
here. And along the way, I

00:04:25.450 --> 00:04:27.730
will explain the layout of the software.

00:04:28.810 --> 00:04:32.160
So here's the project folder where
I input my PhotoShop files,

00:04:32.210 --> 00:04:35.330
drag and drop in there, and they're
here. So you take here my

00:04:35.380 --> 00:04:42.350
platform, this image my artist created.
Actually, that's not true.

00:04:42.400 --> 00:04:45.770
What I did is I went to the Windows
store. We have here a store.

00:04:47.540 --> 00:04:50.500
The asset store it's called. And
there we can buy contents.

00:04:50.550 --> 00:04:55.170
I bought it and I import it. I
bought it for $25, and then I

00:04:55.220 --> 00:04:56.350
can start to make my game.

00:04:57.060 --> 00:05:00.130
So I drag and drop here the first
element in here that I can see.

00:05:01.000 --> 00:05:04.420
This is my camera that shows what's...
how it looks in the final game.

00:05:04.470 --> 00:05:06.650
I'm just going to put it in perspective.

00:05:07.650 --> 00:05:09.230
I go quickly to treaty modes.


00:05:10.040 --> 00:05:13.350
Now I can move my camera a little
back and start to stage this.

00:05:13.970 --> 00:05:18.250
Go back into treaty modes, take
my other part of the platform,

00:05:19.450 --> 00:05:21.240
and drag it in, and there it is.


00:05:22.170 --> 00:05:25.950
Take the other one, the end
one here, and drag it in.

00:05:26.810 --> 00:05:31.700
It's so easy. You can start to make
your own game. So my camera,

00:05:31.750 --> 00:05:35.280
when I move it around, I might
see some artifacts here

00:05:36.500 --> 00:05:39.550
because it doesn't know which one
is rendering first because

00:05:39.600 --> 00:05:42.740
everything is flat and they're overlapping.
So what we're going

00:05:42.790 --> 00:05:45.780
to do is quickly in the slate object
here and say, well, render

00:05:45.830 --> 00:05:48.880
this one on top of those other
ones. How do we do that?

00:05:49.440 --> 00:05:54.080
The order of layer allows me to
say put that one up. So I put

00:05:54.130 --> 00:05:57.900
one up in the rendering. And I see we
have our first platform created.

00:05:59.640 --> 00:06:03.620
Okay. Now, let's add three here
to make it a little bit nicer.

00:06:03.670 --> 00:06:08.880
The mushroom we're going to put
here. I will put it also two

00:06:08.930 --> 00:06:10.180
up so it's nicely on top.

00:06:11.220 --> 00:06:16.340
I can scale it, big mushroom, small
mushroom. We are going to

00:06:16.390 --> 00:06:19.780
add some trees to it. So we are
going to go here, my tree,

00:06:21.180 --> 00:06:26.580
nice tree here, drag it in and scale
it. You can use a uniform scale.

00:06:26.630 --> 00:06:29.490
You can even rotate it if you
want an upside down tree.

00:06:29.540 --> 00:06:34.240
We will put it nicely there like
this. Okay. Cool. I want

00:06:34.290 --> 00:06:38.190
some backgrounds. All the artwork I
got actually from the access store.

00:06:39.600 --> 00:06:44.860
So there was nothing I produced.
I will place it here. I will

00:06:44.910 --> 00:06:47.890
put a little bit in the
back, so minus two.

00:06:47.940 --> 00:06:50.870
Okay. I want to give it a little
bit different tint because I

00:06:50.920 --> 00:06:53.560
want to match it nicely with the
background blue color. How we

00:06:53.610 --> 00:06:58.160
change that is click on the color
and make it a little nice bluish

00:06:58.210 --> 00:07:00.230
color, nicely integrated now.

00:07:02.090 --> 00:07:04.610
Let's duplicate that. So
just simply control D.

00:07:05.870 --> 00:07:08.390
I need to learn how to press two
buttons at the same time.

00:07:08.440 --> 00:07:13.410
And there we have already my environment
created. Take my camera

00:07:13.460 --> 00:07:17.920
and place it a little bit
better in my scene.

00:07:18.620 --> 00:07:23.840
There we have it. Now I want a bird
flying back and forth. Real simple.

00:07:24.130 --> 00:07:25.820
Go here to the image bird.

00:07:26.390 --> 00:07:30.680
I have it here and I drag and
drop it into my scene,

00:07:32.020 --> 00:07:39.760
and there it is. The problem is we
have a whole collection of birds.

00:07:40.920 --> 00:07:43.840
I wanted one using all those
different animations.

00:07:44.760 --> 00:07:46.380
Let's do that. So we're
going to delete it.

00:07:47.230 --> 00:07:50.620
That one image I need to
cut up each image...

00:07:51.140 --> 00:07:51.850
boring job...

00:07:52.580 --> 00:07:55.760
and go to make a script
to play one by one.

00:07:56.490 --> 00:08:00.980
In version 3 we changed that. How you
do that? Instead of a single image...

00:08:01.030 --> 00:08:02.690
I will say actually a multiple image.

00:08:03.560 --> 00:08:08.560
We are going to change that. So
let's open our software A,

00:08:08.610 --> 00:08:10.630
the built-in solution
here, open this.

00:08:11.220 --> 00:08:11.800
Now I can

00:08:14.810 --> 00:08:19.380
cut images out, but I don't want
that. What are you going to do?

00:08:19.430 --> 00:08:20.620
Do it automatically.

00:08:20.670 --> 00:08:25.150
Slice. And now it cuts for you
each image out already.

00:08:25.690 --> 00:08:26.970
Super easy.

00:08:28.330 --> 00:08:34.010
Lazy. I press apply,
and there it is.

00:08:35.650 --> 00:08:41.190
And you close that menu. What I
have here now is each image is

00:08:41.240 --> 00:08:44.690
separate now. Look at this. I don't
want to start to make a script

00:08:44.740 --> 00:08:48.020
and say begin to play to end all
those things. No. Really simple.

00:08:48.070 --> 00:08:52.270
I select the first one, select last
one, and drag and drop that

00:08:52.320 --> 00:08:56.240
into Unity, in the editor. It's asking
me, is that an animation?

00:08:56.290 --> 00:09:00.150
Yes. Save that as. I could
type in flying.

00:09:00.810 --> 00:09:06.630
Let's zoom in to that object and
that display, and now I'm going

00:09:06.680 --> 00:09:09.570
to see that the bird is nicely flying.

00:09:10.210 --> 00:09:14.390
I can easily quick as an artist.
If you're an artist (inaudible)

00:09:14.440 --> 00:09:16.530
animations, adjustments,
it can go in here.

00:09:17.240 --> 00:09:20.440
Look at the time line, speed
it up, slow it down,

00:09:22.040 --> 00:09:27.420
replace images, make him fly faster,
so display. There we have

00:09:27.470 --> 00:09:31.350
him flying much faster now. Okay.
All we want to do is you want

00:09:31.400 --> 00:09:35.430
to make that object fly
over the islands.

00:09:36.400 --> 00:09:39.670
Go to there and it goes back. So,
again, you create a placeholder

00:09:39.720 --> 00:09:42.860
for my object and then save.

00:09:43.430 --> 00:09:46.880
That bird is, actually, a child
of a placeholder. I can easily

00:09:46.930 --> 00:09:51.600
rename it and I call it placeholder.

00:09:52.520 --> 00:09:58.760
My spelling is not so good. I'll
key frame this. Simple.

00:09:59.020 --> 00:10:02.230
You click on the word here animation,
click. And this is the

00:10:02.280 --> 00:10:05.110
animation you want to make? Yes,
I want to make it moving.

00:10:06.030 --> 00:10:09.530
I have the time line here. You
can zoom over the time line a

00:10:09.580 --> 00:10:10.100
little bit.

00:10:10.860 --> 00:10:15.530
Say five seconds later my bird...
or maybe three seconds later,

00:10:15.580 --> 00:10:18.780
the bird should be here.

00:10:19.510 --> 00:10:23.490
So script a time line. So you see
the bird is nicely flying here.

00:10:24.050 --> 00:10:27.770
You press the play button to preview
all the animations in one

00:10:27.820 --> 00:10:32.750
shot together. We have the flying
and the moving directly together.

00:10:32.800 --> 00:10:37.590
All we see is the animation loops, but
I want the birds to fly backwards.

00:10:37.640 --> 00:10:38.600
Really simple.

00:10:39.120 --> 00:10:43.590
Select the bird. The game object
here. See that position, that

00:10:43.640 --> 00:10:46.290
(inaudible) from the beginning
and you copy that.

00:10:47.280 --> 00:10:54.020
I go to maybe six here. I will copy that
now. That valley (inaudible) there.

00:10:54.580 --> 00:10:57.970
I can just as nicely look. I
(inaudible) the time line.

00:10:58.520 --> 00:11:03.830
I see that the bird flies from one
place but sadly flies backwards.

00:11:05.640 --> 00:11:08.570
I can actually do that now here
in animation. I can go in here

00:11:08.620 --> 00:11:14.260
and scale the direction of my object.
I can say oooh like that.

00:11:15.550 --> 00:11:19.810
I can do two scripts. Why can I
do two scripts? You can, but

00:11:19.860 --> 00:11:23.910
the reason is if I do changes to
animations, maybe make my bird

00:11:23.960 --> 00:11:29.360
fly faster, slower, do those changes,
how do you want to do the

00:11:29.410 --> 00:11:32.810
changes of the scaling animation?
The script automatically takes

00:11:32.860 --> 00:11:34.330
care of that. Look here.

00:11:35.720 --> 00:11:36.770
I have a script.

00:11:38.390 --> 00:11:38.990
Flip it.

00:11:40.340 --> 00:11:42.750
Original name gets script here.

00:11:43.890 --> 00:11:47.100
Super simple script.
What we see is here.

00:11:47.740 --> 00:11:50.640
Transfer local scale and I'm going
to scale it in the negativeX

00:11:50.690 --> 00:11:57.550
(inaudible) run this, evoke this
function, it flips it.

00:11:57.600 --> 00:12:03.110
Hold up the script to my object
and drag it and it just puts

00:12:03.160 --> 00:12:06.450
on this object. With this object
now selected, you see that the

00:12:06.500 --> 00:12:10.160
script is attached to it. You see
it's component-based in Unity.

00:12:10.210 --> 00:12:12.940
Okay. Now that function didn't
(inaudible) evoke it. I want

00:12:12.990 --> 00:12:14.800
to say when you want
to run, oh, here.

00:12:15.370 --> 00:12:22.310
I can put in a time line even.
Click here at that frame, flip

00:12:22.360 --> 00:12:28.110
my bird, and here on the end of the
animation again, flip it here.

00:12:28.160 --> 00:12:33.690
You can evoke the function directly
on a frame in the animation.

00:12:34.880 --> 00:12:39.230
So the result is now very nicely
have the bird flying from one

00:12:39.280 --> 00:12:43.320
side to the other side and flipping.
So there you go and...

00:12:43.370 --> 00:12:44.510
all right... the other side.

00:12:45.030 --> 00:12:47.030
There he goes. Simple, simple.

00:12:47.720 --> 00:12:51.590
So far, you have seen how easy it
is to import artwork, create

00:12:51.640 --> 00:12:55.190
the environment, and you can go
to our store for more artwork

00:12:55.240 --> 00:12:58.750
and easy to do animations. I see
a little physics in characters.

00:13:00.120 --> 00:13:02.130
So now I go here to my Yeti.

00:13:03.510 --> 00:13:08.340
And I have here each separate animation,
each image from an animation.

00:13:08.390 --> 00:13:13.390
I will take here my idle animation.
I have exactly six frames,

00:13:13.440 --> 00:13:16.300
six images. So I

00:13:17.520 --> 00:13:21.140
select them, drag them,
drop in there again.

00:13:21.970 --> 00:13:24.600
We call it idle. He's standing still.

00:13:25.750 --> 00:13:26.120
Place it?

00:13:26.170 --> 00:13:31.290
Yes. Oh, he's a little bit too
small. We can scale it easily.

00:13:31.940 --> 00:13:32.830
There he is,

00:13:34.150 --> 00:13:38.510
and move it. You can move it up
here and maybe layer three.

00:13:39.780 --> 00:13:44.160
My character will move nicely
in idle animation.

00:13:45.340 --> 00:13:46.830
So here. Relax.

00:13:46.880 --> 00:13:50.920
Okay. What we are going to do is
add some physics to it so my

00:13:50.970 --> 00:13:55.500
character can fall, jump, and collide
with this island. So I

00:13:55.550 --> 00:13:59.200
take that character here, place
it up. What we're going to add

00:13:59.250 --> 00:14:04.830
here is what we're going to add
physics 2D. For the people that

00:14:04.880 --> 00:14:10.030
haven't really worked with Unity, we
have a box physics 2D integrated.

00:14:10.880 --> 00:14:14.830
So we are going to add
here my body to it.

00:14:15.930 --> 00:14:19.790
If I place no play, what we are going
to see is that our character

00:14:19.840 --> 00:14:22.510
will be... bye bye...
flying down.

00:14:23.070 --> 00:14:24.560
Gravity is applied to it.

00:14:25.320 --> 00:14:28.350
It lets you collide with the
environment. Really simple.

00:14:28.400 --> 00:14:32.420
Look. Take this object. I will
add physics again to it.

00:14:32.470 --> 00:14:35.680
We're going to add a line collider,
an edge collider here.

00:14:35.730 --> 00:14:40.200
Simple. Hold down shift and
add an adjustment here.

00:14:41.380 --> 00:14:46.380
Nicely. There we have it already.
I need a collider for my Yeti.

00:14:47.280 --> 00:14:50.740
Simple. Add a component,
physics 2D.

00:14:51.500 --> 00:14:53.650
We're going to add a circle
collider to it.

00:14:54.450 --> 00:14:59.820
We have a slider to adjust it so
it nicely fits his body. Cool.

00:15:01.440 --> 00:15:05.760
Display. We're going to see the
Yeti will fall on the ground.

00:15:07.730 --> 00:15:12.780
(Inaudible) Yeti starts
to roll a bit.

00:15:13.930 --> 00:15:17.610
>> He is a tired Yeti.
He works hard.

00:15:17.660 --> 00:15:20.530
>> So what we have to do is really
simple. Actually, if you want

00:15:20.580 --> 00:15:24.170
to start in physics to look, access,
it becomes very difficult.

00:15:24.430 --> 00:15:27.580
That's why we love taking the pain
for you of game development

00:15:27.630 --> 00:15:31.310
so you can enjoy it. There is a
little button here. Fix angle.

00:15:32.140 --> 00:15:35.380
Like that. And now when the Yeti
falls, he will not roll.

00:15:35.430 --> 00:15:40.200
He will be excited to go get his mushrooms.
See? There it is. Okay.

00:15:40.250 --> 00:15:45.840
Cool. So now I can create here a little
empty object as a placeholder

00:15:45.890 --> 00:15:48.090
for all my platforms that I want
to duplicate. So I want to

00:15:48.140 --> 00:15:53.770
select here three things. Making
a child (inaudible). There we

00:15:53.820 --> 00:15:58.250
have it. Zoom out. And
we can copy that

00:16:00.350 --> 00:16:01.250
nicely there

00:16:02.780 --> 00:16:05.010
and here, maybe a little bit higher.

00:16:06.380 --> 00:16:11.090
There's another one and I start
to make my game. That's it.

00:16:12.710 --> 00:16:15.450
So you can take the mushroom
here, duplicate it too.

00:16:16.360 --> 00:16:21.650
It's pretty cool, huh? Okay. There
it is. Okay. So we see how

00:16:21.700 --> 00:16:24.960
easy it was to do it with physics.
Also with script we can add

00:16:25.010 --> 00:16:27.900
more to the physics. We can move
the character, make it jump.

00:16:28.430 --> 00:16:31.870
We made a simple script here, script.

00:16:34.810 --> 00:16:39.340
I have to admit. Before I joined Unity,
I had never seen a variable even.

00:16:40.670 --> 00:16:45.610
So I learned about it. And I make
my own games and my own scripts.

00:16:45.660 --> 00:16:50.270
So if I can do it, you can do it for
sure. Look go to character start.

00:16:51.090 --> 00:16:56.700
It's really simple. Let's look
at this. If I press the button

00:16:56.750 --> 00:17:01.200
down fire 1, this is really cool,
because it works multiplatform.

00:17:01.510 --> 00:17:05.650
If I press on my computer, my fire
button, what I am going to

00:17:05.700 --> 00:17:09.690
do is the game is started. The
game started. It will actually

00:17:09.740 --> 00:17:14.040
evoke that... my character will
have a velocity of 10 meters

00:17:14.090 --> 00:17:15.170
of second forward.

00:17:15.760 --> 00:17:20.860
If I press the second time, if I
press jump for the second time,

00:17:20.910 --> 00:17:25.010
then it says jumped through. Jumped
through will add a velocity

00:17:25.420 --> 00:17:28.180
of jump force. What is a jump force?

00:17:28.800 --> 00:17:31.630
Well, I declare it outside the script.

00:17:32.140 --> 00:17:35.220
If I declare that outside the
script, it becomes a slider.

00:17:35.270 --> 00:17:38.540
So my designer and programmer for
the first time in life are

00:17:38.590 --> 00:17:40.200
happy and can work together.

00:17:41.310 --> 00:17:45.310
So what am I doing to do? I take
that script and I drag it onto

00:17:45.360 --> 00:17:45.950
my Yeti.

00:17:47.360 --> 00:17:48.520
So look here.

00:17:49.040 --> 00:17:52.880
I have my slider for my jump force.
Okay. Let's test the game.

00:17:52.930 --> 00:17:54.710
So I press play here.
I'm in the game.

00:17:55.420 --> 00:17:58.800
As I said, it's multiplatform. The
cool is thing is if you built

00:17:58.850 --> 00:18:02.000
that in this form, you just press
the fire button on the screen.

00:18:02.050 --> 00:18:05.690
You touch the screen and it works
right away. Nothing to change.

00:18:05.740 --> 00:18:10.540
So click here, and I click here and
I jump just like I would jump.

00:18:10.590 --> 00:18:11.210
Okay?

00:18:11.260 --> 00:18:12.460
>> You are strong, Yeti.

00:18:12.960 --> 00:18:17.970
>> I will have magical powers.
So what are we going to do?

00:18:18.020 --> 00:18:21.240
This is like Carl energy. Bring
it down a little bit down.

00:18:21.290 --> 00:18:22.500
Just maybe, 2, 300s.

00:18:23.600 --> 00:18:24.870
Let's see how Adam jumps.

00:18:24.920 --> 00:18:26.880
>> What are you saying?

00:18:27.890 --> 00:18:32.290
>> And click. And there Adam just
made it to the island.

00:18:32.340 --> 00:18:34.440
>> I did play basketball in
high school. Come on.

00:18:34.490 --> 00:18:36.390
>> Then we will give you 400.

00:18:38.000 --> 00:18:40.790
So you see how easy it is on the
fly to change. You can work

00:18:40.840 --> 00:18:43.880
with the designer. You can ask
in the community. We have more

00:18:43.930 --> 00:18:45.750
than 2 million people in our community.

00:18:46.500 --> 00:18:49.920
Ask to make a script, drag and
drop it there. Then with the

00:18:49.970 --> 00:18:52.570
sliders, you can adjust it
to whatever you want.

00:18:53.120 --> 00:18:57.190
Now we want to continue and make
these animations. Okay.

00:18:57.240 --> 00:18:59.410
Well, let me look here.

00:19:01.070 --> 00:19:01.740
My Yeti

00:19:03.200 --> 00:19:04.230
and the animator...

00:19:05.000 --> 00:19:09.230
not the terminator but the animator.
What we see is it says idle.

00:19:09.280 --> 00:19:13.210
The animator defines what animation
explains and what time.

00:19:14.250 --> 00:19:18.530
Just controls it. So currently it's
the idle animation. Look here.

00:19:18.580 --> 00:19:21.380
I made my full animation of my character.

00:19:21.980 --> 00:19:26.490
I have also the animations of jumping.
Okay? All those images

00:19:26.540 --> 00:19:30.110
I drag and drop in the scene already
and it creates an animation file.

00:19:30.870 --> 00:19:34.790
So look here. I have the animation
file of running and drag it

00:19:34.840 --> 00:19:39.870
in here, and drag and drop
the animation jump,

00:19:41.280 --> 00:19:46.170
and drag and drop the animation land,
and of course my character

00:19:46.220 --> 00:19:49.070
is falling. When it jumps up, you're
going to fall down. So you

00:19:49.120 --> 00:19:51.020
drag and drop all those
animations in there.

00:19:52.120 --> 00:19:55.590
The cool thing is how easy it is
to go from one animation to

00:19:55.640 --> 00:19:59.310
another animation. You right
click, make a transition.

00:20:00.280 --> 00:20:04.180
After playing the jump animation,
it can go to the run animation.

00:20:05.310 --> 00:20:07.230
I am going to just see here.

00:20:09.130 --> 00:20:12.610
Where is my idle animation? I don't
see it. I just want to make

00:20:12.660 --> 00:20:15.180
sure I have the correct
object selected here.

00:20:15.990 --> 00:20:18.290
My Yeti... oh, there's my idle
animation. Sorry. I will drag

00:20:18.340 --> 00:20:20.950
and drop here my run animation again.

00:20:21.630 --> 00:20:25.500
I can go from idle to run by clicking
on it and say go to run.

00:20:28.330 --> 00:20:31.930
After running we're going to go
to the animation jump. Drag it

00:20:31.980 --> 00:20:34.530
in from run to jump.

00:20:35.290 --> 00:20:37.910
When I'm in the air, I will fall
down. Drag and drop the fall

00:20:37.960 --> 00:20:40.600
animation there, and we go to fall.

00:20:41.110 --> 00:20:43.670
From fall, we're going
to land on the ground.

00:20:44.990 --> 00:20:48.400
And then from land, we're going
to go back to running.

00:20:49.640 --> 00:20:54.180
We nicely can see the display because
I can set my Yeti and press play.

00:20:54.230 --> 00:20:57.850
We are going to see that our character...
we are going to see

00:20:57.900 --> 00:21:02.830
it idle, run, jump, fall, land.
We see that here visually too.

00:21:04.130 --> 00:21:08.430
But I wanted to find when my character
will be landing and falling

00:21:08.480 --> 00:21:09.350
and jumping.

00:21:10.320 --> 00:21:11.500
Super simple.

00:21:12.630 --> 00:21:14.290
We can make some conditions.

00:21:15.080 --> 00:21:18.150
We can make like based on a trigger
or the bool or a float.

00:21:18.810 --> 00:21:22.690
Like a float, if I take the maybe
my X box controller forward,

00:21:22.740 --> 00:21:27.170
there is a value that drive there.
A trigger could be a button.

00:21:27.220 --> 00:21:30.710
In this case, a trigger a button
here. I am going to call it

00:21:30.760 --> 00:21:34.040
say jump when I click jump.

00:21:35.850 --> 00:21:40.680
A trigger called land, and
then trigger called start.

00:21:43.380 --> 00:21:49.010
In code, I can activate those parameters.
I will show you that

00:21:49.060 --> 00:21:51.470
later on. From here to idle to
run, when would I go from idle

00:21:51.520 --> 00:21:56.690
to run? Well, when I trigger the
word start. Then you should

00:21:56.740 --> 00:22:00.200
go to that chain of animation.
If not, just keep looping the

00:22:00.250 --> 00:22:01.260
idle animation.

00:22:02.310 --> 00:22:05.480
When would it go from run to jump?
Simple, simple. When would

00:22:05.530 --> 00:22:06.710
I create the button jump.

00:22:07.680 --> 00:22:11.180
When I go from jump to land, well,
automatically. When would

00:22:11.230 --> 00:22:14.610
I go from land to fall?
The moment I land.

00:22:15.450 --> 00:22:17.510
Now, in code I will go to my Yeti.

00:22:19.950 --> 00:22:22.110
And here in the project, I'm
going to update the script.

00:22:22.160 --> 00:22:26.120
It's just two lines of code
or three lines of code.

00:22:27.920 --> 00:22:33.240
I'll flip it with

00:22:35.180 --> 00:22:38.180
that character

00:22:40.750 --> 00:22:42.670
ord land.

00:22:43.840 --> 00:22:48.070
When I press the button
fire and I go to...

00:22:49.110 --> 00:22:51.370
let's say in the code I press fire.

00:22:51.900 --> 00:22:55.540
And if the game starts, if...

00:22:55.590 --> 00:22:56.580
>> One thing real quick.

00:22:58.830 --> 00:23:01.640
That's from a plug-in which I will
talk about very shortly.

00:23:01.690 --> 00:23:03.570
I just want to go to the default
here so you can see what the

00:23:03.620 --> 00:23:06.720
default is inside of Unity.

00:23:13.910 --> 00:23:18.220
>> By default it's monodevelop. But
you can use Adam's visual studio.

00:23:18.270 --> 00:23:19.720
You will be talking
about later on?

00:23:20.800 --> 00:23:21.550
>> Definitely.

00:23:22.760 --> 00:23:25.170
>> But I can actually keep showing
the code in Unity if you want.

00:23:25.220 --> 00:23:28.740
So we will scroll down here. If
I press the button fire here,

00:23:30.260 --> 00:23:32.650
if the game starts, just trigger
the word start. That's the

00:23:32.700 --> 00:23:37.550
only thing you have to do to change
from animation one line of code.

00:23:39.320 --> 00:23:40.260
Let's look at this.

00:23:40.820 --> 00:23:41.510
Press play.

00:23:42.220 --> 00:23:44.200
I'm only going to see here my Yeti.

00:23:45.510 --> 00:23:49.930
So nicely playing the idle animation,
click, go to run, jump.

00:23:49.980 --> 00:23:54.610
Go to camera follow. How do you
do that? Simple, simple.

00:23:54.660 --> 00:23:57.980
You select camera and drag it
to my Yeti. There it is.

00:23:58.680 --> 00:23:59.400
Press play

00:24:00.660 --> 00:24:03.210
and, come on, Yeti, let's start
the game. Let's run.

00:24:05.370 --> 00:24:08.430
Yay. Jump to the next level.

00:24:09.510 --> 00:24:12.740
What can I do to make it a little
bit more interesting? Go to

00:24:12.790 --> 00:24:13.420
my scene.

00:24:14.810 --> 00:24:19.060
2D modes. That's the beauty. Unity
is 2D and 3D. So I can select

00:24:19.110 --> 00:24:25.060
the background, drag it here to the
background, and both select them.

00:24:25.110 --> 00:24:27.930
We can scale this a bit.

00:24:27.980 --> 00:24:30.170
Cool. Go back to 2D modes.

00:24:31.460 --> 00:24:33.040
We can both duplicate them.

00:24:35.490 --> 00:24:38.950
Let's take another tree here, maybe
this tree, bring it in here,

00:24:39.730 --> 00:24:45.390
scale it up. We're going to put that
to maybe 5 up. We are going

00:24:45.440 --> 00:24:48.850
to go back to 3D modes and bring
it a bit closer to the camera.

00:24:48.900 --> 00:24:53.510
Nicely get a perspective. We don't
need to script anything with

00:24:53.560 --> 00:24:57.240
this going on. So duplicate,
bring it in

00:24:59.770 --> 00:25:03.960
here maybe. Let's see the game in
full action here. Let's play it.

00:25:06.710 --> 00:25:09.510
And there it is. Start,
yay, jump.

00:25:10.070 --> 00:25:12.120
It starts nicely interactive.

00:25:12.790 --> 00:25:17.550
We can easily add our sound files
then. I easily may script

00:25:17.600 --> 00:25:22.790
to pick up the objects. So here
(inaudible) the character.

00:25:22.840 --> 00:25:28.280
What we are going to do is we
will add a script, pick up,

00:25:30.020 --> 00:25:34.870
and pick up is a little script.
I will look at that.

00:25:35.790 --> 00:25:37.480
If on trigger enter 2D.

00:25:38.810 --> 00:25:44.240
So if I enter something, then pick
up the mushroom. We are going

00:25:44.290 --> 00:25:48.290
to for the moment remove those here,
which is going to destroy

00:25:48.340 --> 00:25:49.920
the mushroom if you pick it up.

00:25:52.950 --> 00:25:56.980
So my mushroom here, I am going
to give it a physics 2D,

00:25:58.680 --> 00:26:00.230
a box collider.

00:26:01.220 --> 00:26:05.370
We're going to say the box collider
is actually a trigger.

00:26:05.420 --> 00:26:08.040
So when I enter that zone,
I should pick it up.

00:26:08.770 --> 00:26:12.600
In my script I also said I will
make it smaller here.

00:26:12.650 --> 00:26:18.400
In my script I said only when I pick
up the mushroom, I tag mushroom

00:26:18.450 --> 00:26:20.420
because I could be picking
up the bird otherwise.

00:26:21.130 --> 00:26:23.320
I don't want to eat the bird.
I want to eat the mushroom.

00:26:23.370 --> 00:26:27.030
So I will take all those three
mushrooms, the first one, and

00:26:27.080 --> 00:26:30.570
I will add a tag here. I
will call it mushroom.

00:26:33.450 --> 00:26:38.280
Select my mushrooms, all three of them,
and say you have a tag mushroom.

00:26:39.360 --> 00:26:40.760
I hope I spell it correctly.

00:26:42.530 --> 00:26:48.200
And my character has a script in
it, display, and there we start

00:26:48.250 --> 00:26:48.870
the game,

00:26:50.730 --> 00:26:54.800
click, pick up mushroom 1, pick
up mushroom 2, I forgot to put

00:26:54.850 --> 00:26:58.590
the collider on the mushroom. Really
simple. I can just duplicate

00:26:58.640 --> 00:27:02.290
this one here, duplicate this
one to there, and the leap.

00:27:04.780 --> 00:27:07.690
Delete. And I will duplicate again.

00:27:09.080 --> 00:27:14.930
Place it here. So you can see how easy
it is to place a character...

00:27:14.980 --> 00:27:18.230
to place artwork into a game, can
get it from our store, from

00:27:18.280 --> 00:27:19.070
the asset store,

00:27:20.490 --> 00:27:21.770
make animations on it,

00:27:23.800 --> 00:27:27.710
control the animations, with script,
make interactive game play

00:27:27.760 --> 00:27:29.810
to collect in this case mushrooms.

00:27:30.610 --> 00:27:33.640
The last thing I wanted to say
is that you can go to file and

00:27:33.690 --> 00:27:37.190
build settings and export
it to Windows phone 8.

00:27:37.790 --> 00:27:40.840
But this is all about Adam's specialty
and Adam will take over.

00:27:40.890 --> 00:27:43.410
Thank you so much for listening
to me and afterwards I will be

00:27:43.460 --> 00:27:44.760
available for questions.

00:27:45.170 --> 00:27:45.930
>> Thank you, Carl.

00:27:51.230 --> 00:27:52.770
Very cool. Very cool.

00:27:55.020 --> 00:27:58.170
All right. Let's go ahead and

00:28:00.190 --> 00:28:01.410
save your changes.

00:28:07.810 --> 00:28:11.770
All right. Before we get back to
slides, you talked about the

00:28:11.820 --> 00:28:15.820
asset store. For me as a fairly
new'ish Unity developer, the

00:28:15.870 --> 00:28:17.940
asset store is absolutely amazing.

00:28:18.920 --> 00:28:22.810
I'm not good with graphics. I'm
more of the technical side.

00:28:22.860 --> 00:28:25.540
You know that whole argument, one
side or the other, rarely meet

00:28:25.590 --> 00:28:29.110
in the middle. So the asset store,
if I want a zombie, if I want

00:28:29.160 --> 00:28:34.030
a monster, if I want Mr. Big Kim,
I can come to the asset store

00:28:34.080 --> 00:28:38.250
and buy models, buy scripts. There's
tons of free stuff too.

00:28:38.300 --> 00:28:40.650
Unity has published a lot of free
stuff, free demo games.

00:28:40.700 --> 00:28:42.850
You can pick it apart and see how
they work. I believe you can

00:28:42.900 --> 00:28:45.800
actually reuse some of the content
from those games for your

00:28:45.850 --> 00:28:49.240
own game as well, for the free ones
as well as, of course, anything

00:28:49.290 --> 00:28:52.710
you purchase in there you can use in
your own games. Very, very powerful.

00:28:53.690 --> 00:28:57.460
>> Some people have published my
demo games I made. I buy them

00:28:57.510 --> 00:28:58.840
and I support the community.

00:29:01.840 --> 00:29:05.790
>> So how do we get here? How do we
get on the cool devices, Windows

00:29:05.840 --> 00:29:09.290
phone, and Windows 8? Take super
Yeti. Wait. What did you call

00:29:09.340 --> 00:29:10.310
it, Yeti and the Mushrooms?

00:29:10.360 --> 00:29:11.010
>> Yeti and the Mushrooms.

00:29:11.060 --> 00:29:13.660
>> So that's your brilliant idea.
You're sitting at home one

00:29:13.710 --> 00:29:16.270
home, 2 in the morning, and you wake
it up and you think of Yeti

00:29:16.320 --> 00:29:18.900
and the Mushrooms. Aha. That's
your great idea. Then you run

00:29:18.950 --> 00:29:23.770
Unity on Windows 8 and you develop
it, do all your testing inside

00:29:23.820 --> 00:29:26.010
of Unity. That's one of the powerful
things. You can do your

00:29:26.060 --> 00:29:29.990
coding and your testing right inside
of Unity before you even

00:29:30.500 --> 00:29:33.340
focus on the platform export for
Windows phone or Windows 8.

00:29:34.440 --> 00:29:37.230
Then Unity will export
the project out to...

00:29:38.010 --> 00:29:40.240
it will create a visual studio
project. You can open that in

00:29:40.290 --> 00:29:43.470
visual studio, for example, Ultimate
like retail additions.

00:29:43.520 --> 00:29:46.630
You can use visual studio express,
a free version, to do it as well.

00:29:47.340 --> 00:29:50.060
And then from there out, it's the
typical approach that we do

00:29:50.110 --> 00:29:53.290
on our applications. You can deploy
out to your devices from

00:29:53.340 --> 00:29:56.760
visual studio. You can deploy out
to a surface, deploy it locally

00:29:56.810 --> 00:30:00.150
on your system, deploy it out to a
Windows phone, deploy it remotely

00:30:00.200 --> 00:30:03.230
to a device in the network. Now, you
can do that from visual studio.

00:30:03.280 --> 00:30:06.270
You can actually deploy right to
a phone from inside of Unity.

00:30:07.140 --> 00:30:10.660
But, typically, the work flow I follow
is Unity to visual studio

00:30:10.710 --> 00:30:14.630
to devices. From there, we package
it up and send it to the store.

00:30:14.680 --> 00:30:17.290
Same process we always use there.
Then you get all the happy

00:30:17.340 --> 00:30:19.680
users using your application.
Right? Right?

00:30:21.200 --> 00:30:22.140
>> Correct.

00:30:22.190 --> 00:30:24.880
>> Let's talk about how you expert
from Unity and a couple things

00:30:24.930 --> 00:30:27.290
to be aware of and then we will
dive in and look at that.

00:30:28.470 --> 00:30:31.350
Inside of Unity, we have a great
multiplatform list. You select

00:30:31.400 --> 00:30:33.890
what platform you want to export
to. Make that your default

00:30:33.940 --> 00:30:35.840
platform, Windows store,
Windows phone 8.

00:30:36.810 --> 00:30:40.440
Then from then on, it's very important
to test using a feature

00:30:40.490 --> 00:30:43.680
set of whatever you're going to deploy
to. What do I mean by that?

00:30:43.730 --> 00:30:46.900
Different hardware supports different
graphics functionality.

00:30:46.950 --> 00:30:52.090
A surface is a very different animal
than a high end gaming desk

00:30:52.140 --> 00:30:55.220
top system. Right? They support different
shaders in the hardware,

00:30:55.570 --> 00:30:58.430
very different graphic cards. So
what you can do inside of Unity

00:30:58.480 --> 00:31:01.760
is you specify a direct X emulation
level. Now, it's probably

00:31:01.810 --> 00:31:04.240
not necessary for a simple game
that we are creating today.

00:31:04.290 --> 00:31:06.630
But if you're grabbing 3D content
off the net or writing your

00:31:06.680 --> 00:31:10.040
own shaders, it's always good to
change these settings around

00:31:10.090 --> 00:31:12.860
in Unity to see if anything changes.
And I will show you the settings.

00:31:13.710 --> 00:31:16.540
And then we set our plyer settings.
And this is just a way of

00:31:16.590 --> 00:31:20.450
saying we can set all the information
in Unity that pushes out

00:31:20.500 --> 00:31:24.010
to our manifest file. Think of
your phone manifest file.

00:31:24.060 --> 00:31:26.630
Think of your package on
apex manifest file.

00:31:27.230 --> 00:31:30.050
All those settings like your name
and your icon and splash screen,

00:31:30.100 --> 00:31:32.970
we can set those inside of Unity
so it creates a project that's

00:31:33.020 --> 00:31:36.430
already set for us. Then we just
simply build. There is also

00:31:36.480 --> 00:31:40.270
a build and run. Build and run in Unity
will deploy to a Windows phone.

00:31:40.320 --> 00:31:43.100
Build and run for a Windows store
application will actually just

00:31:43.150 --> 00:31:44.430
build it. It doesn't
actually run it.

00:31:45.120 --> 00:31:47.490
So let's look at that process
here inside of Unity.

00:31:47.540 --> 00:31:55.470
I'm going to take Carl's game
here. This one I added...

00:31:55.520 --> 00:31:57.840
well, Carl added some sound to
it and see if we can hear it,

00:31:57.890 --> 00:32:00.560
what it's supposed to sound like.
Can you guys here that?

00:32:03.840 --> 00:32:07.900
Now, I do want to point out that
that sound effect is Carl.

00:32:10.950 --> 00:32:13.190
>> It's true. It's true.

00:32:13.940 --> 00:32:16.570
>> So coming to our build settings, I'm
going to change this over to...

00:32:16.620 --> 00:32:18.000
let's do Windows store ap.

00:32:19.610 --> 00:32:22.490
Now that's our default platform.
That's what we see here.

00:32:23.050 --> 00:32:25.790
We have a couple different exports
we can do, which I will get

00:32:25.840 --> 00:32:27.190
back to in one second.

00:32:28.930 --> 00:32:31.710
The directX features level
I was talking about,

00:32:33.030 --> 00:32:37.120
edit graphics emulation, we can see
here directX 911 shader model

00:32:37.170 --> 00:32:40.760
2, that's synonymous to
like a surface device.

00:32:41.600 --> 00:32:43.850
You click on that. We don't see
any changes here, which is a

00:32:43.900 --> 00:32:46.230
good thing. I'm not expecting
to see anything here.

00:32:46.940 --> 00:32:49.610
I don't see anything there either.
So we're good. If I am using...

00:32:49.660 --> 00:32:52.290
again, maybe I pull some really
cool water package off the net

00:32:52.340 --> 00:32:55.680
or these metallic shaders, it's always
good to test these levels

00:32:55.730 --> 00:32:58.600
to see if the hardware I'm going
to deploy to supports it.

00:32:58.650 --> 00:33:01.090
And Unity does a great of emulating
those settings for us.

00:33:02.220 --> 00:33:06.020
So next in my build settings, which
is just file, build settings,

00:33:06.070 --> 00:33:08.540
or the same hot keys, visual
studio, control shift B,

00:33:10.360 --> 00:33:12.600
you need to add on the scene that
you want in your build.

00:33:12.650 --> 00:33:16.300
So we have got this scene right
here. We just add it.

00:33:16.350 --> 00:33:18.480
That's going to be included in our
build. If we have 100 scenes,

00:33:18.530 --> 00:33:20.210
we might not want every
one in our build.

00:33:20.740 --> 00:33:23.590
Now that we have that, notice on
the right-hand side here we

00:33:23.640 --> 00:33:26.360
have four different types of
projects that we can export to:

00:33:27.520 --> 00:33:30.850
DirectX project C plus plus, directX
project C sharp, Zaml C

00:33:30.900 --> 00:33:33.670
plus plus, Zaml C sharp.
Which one do you choose?

00:33:34.290 --> 00:33:37.240
If you say which one is more performant,
they are very similar

00:33:37.290 --> 00:33:38.410
in terms of performance.

00:33:38.930 --> 00:33:41.780
If you like to do Zaml and C sharp
code and you think you might

00:33:41.830 --> 00:33:45.650
integrate something into this on
the visual studio side, then

00:33:45.700 --> 00:33:48.630
choose this option. If you happen
to really know and love directX

00:33:48.680 --> 00:33:51.720
and you want to access some lower
level functionality, you'd

00:33:51.770 --> 00:33:53.960
choose this one. So it's whatever
you're comfortable with.

00:33:54.010 --> 00:33:55.100
I like this one here.

00:33:56.210 --> 00:33:58.860
From then on, we can build and we
will generate our project for us.

00:33:58.910 --> 00:34:01.520
I want to show you some of the platform
specific settings here

00:34:01.570 --> 00:34:02.960
under player settings.

00:34:03.980 --> 00:34:06.360
Player settings pops this up and we
can see all the various platforms

00:34:06.410 --> 00:34:09.700
here, which equate to various platforms
that we see on here.

00:34:11.570 --> 00:34:15.370
We know that Windows store applications,
for example, have an icon.

00:34:15.420 --> 00:34:18.150
We know that they have a splash
screen. When you first look

00:34:18.200 --> 00:34:20.530
at these settings, it kind of fooled
me too. I'm like icon not

00:34:20.580 --> 00:34:23.390
applicable for this platform.
I know there's an icon.

00:34:23.960 --> 00:34:26.290
I know there's a splash image.
You just have to keep working

00:34:26.340 --> 00:34:29.570
on them. All those settings are, actually,
under publishing settings.

00:34:29.920 --> 00:34:35.130
And here we can see your package
name. All the images that you'd

00:34:35.180 --> 00:34:38.380
generally assign inside a visual
studio, you can set here.

00:34:39.380 --> 00:34:43.200
So we have got our logos, small logo,
our splash screen, our colors.

00:34:43.250 --> 00:34:46.530
All of our capabilities, for example,
if we are going to do location

00:34:46.580 --> 00:34:49.400
services like GUI location. Or
if we need to communicate with

00:34:49.450 --> 00:34:52.400
the Internet, we need to check
off internet client. Or if we

00:34:52.450 --> 00:34:54.340
are going to be running the Unity
profiler, which I'll talk about

00:34:54.390 --> 00:34:56.540
later on, we actually need
Internet client as well.

00:34:57.670 --> 00:34:59.540
So once you got all those
settings done,

00:35:02.570 --> 00:35:04.870
you would build your application.
However, there's one quick

00:35:04.920 --> 00:35:08.670
thing I want to show you. Who here loves
creating all those multiple images?

00:35:09.140 --> 00:35:11.520
Like you get an icon and you generate
your splash screen and

00:35:11.570 --> 00:35:13.740
you generate your store images and
then you generate your tile

00:35:13.790 --> 00:35:18.350
and then this one, 150 by 150 and
this one 50 by 50. Right?

00:35:18.400 --> 00:35:19.950
I thought there would be
at least one hand up.

00:35:20.000 --> 00:35:22.400
>> Okay. Okay. I will do it.

00:35:23.570 --> 00:35:26.430
>> So another thing that
we can do here is...

00:35:27.520 --> 00:35:30.860
I have it linked to this at the
end and I love it because it's

00:35:30.910 --> 00:35:33.360
great for prototyping or if you want
to use it for your final version.

00:35:33.410 --> 00:35:37.050
You take your square'ish icon.
And note that you can go into

00:35:37.100 --> 00:35:40.070
Bing search for an image. You can
say, hey, find me a square image.

00:35:40.120 --> 00:35:42.610
Of course, you want to make sure
you have the rights to any image

00:35:42.660 --> 00:35:44.970
that you use or you can design your
own. The idea is it should

00:35:45.020 --> 00:35:47.640
be square'ish. Drag and drop

00:35:49.790 --> 00:35:53.540
it: Logo, small logo, splash screen,
store logo. Then you can

00:35:53.590 --> 00:35:56.340
take those. You can go into Unity
and select all your images

00:35:56.390 --> 00:35:58.840
that you want in there. You could
go in and assign them in your

00:35:58.890 --> 00:36:00.700
visual studio project if you want.

00:36:03.010 --> 00:36:05.970
You simply do build.
You create a folder,

00:36:07.360 --> 00:36:09.560
Windows store build.

00:36:11.020 --> 00:36:11.750
Call that three.

00:36:12.690 --> 00:36:15.310
You say select folder. It builds
and opens your folder.

00:36:15.360 --> 00:36:17.890
Just in the interest of time here,
I have got the build already

00:36:17.940 --> 00:36:18.930
created here.

00:36:20.440 --> 00:36:23.870
Let's close out the one that I
opened up before. I will talk

00:36:23.920 --> 00:36:26.760
about visual studio integration just
a little bit because you're

00:36:26.810 --> 00:36:30.770
probably wondering about it. One
of the things I want to add

00:36:30.820 --> 00:36:32.090
onto the platform...

00:36:33.020 --> 00:36:35.620
I like pause screens. If you switch
away from an application

00:36:35.670 --> 00:36:37.220
and you go back to the application,

00:36:38.730 --> 00:36:42.380
I like it so you can see something
that tells you, hey, we're paused.

00:36:43.610 --> 00:36:46.970
So what we want to add to this
version here is something that

00:36:47.020 --> 00:36:48.220
when we switch away from the

00:36:49.550 --> 00:36:52.050
ap, when we have a Windows phone
ap or a Windows store ap, we

00:36:52.100 --> 00:36:55.060
go away and we come back and it's
paused; so it doesn't thrust

00:36:55.110 --> 00:36:58.370
us right back into the game. We
can do that actually very, very

00:36:58.420 --> 00:36:59.250
easily here.

00:37:00.550 --> 00:37:03.170
So what I have done is I have
a pause screen here.

00:37:03.220 --> 00:37:11.310
I am going to drag and drop that
into the project, and a code

00:37:12.490 --> 00:37:16.020
file in C sharp called screen manager.

00:37:18.930 --> 00:37:20.490
Our pause screen looks like this.

00:37:21.530 --> 00:37:23.810
Now in Unity, everything that Carl
showed us is kind of these

00:37:23.860 --> 00:37:28.940
dynamic game actions. If we place
a mushroom and we run passed

00:37:28.990 --> 00:37:31.580
it, it goes out of view. There's
what is call the GUI system

00:37:31.630 --> 00:37:36.850
inside of Unity. And the GUI system
gives us things like a heads

00:37:36.900 --> 00:37:39.750
up display, something that's visible
to us at all times, maybe

00:37:39.800 --> 00:37:41.730
a health bar, maybe our current score.

00:37:42.540 --> 00:37:45.350
So no matter where we look,
it kind of shows up for us.

00:37:46.250 --> 00:37:49.650
So what I want to do is turn that pause
screen into a GUI component.

00:37:49.700 --> 00:37:53.080
And I can take this pause screen and
I can go to the game object menu.

00:37:53.130 --> 00:37:56.570
I want to mention game objects.
Think of them in .NET.

00:37:56.620 --> 00:37:59.790
Almost everything stems
from system.object.

00:37:59.840 --> 00:38:03.220
Right? Think of the same thing in
Unity. Almost everything stems

00:38:03.270 --> 00:38:06.500
from a game object. Everything you're
seeing, every single thing

00:38:06.550 --> 00:38:08.670
here is a game object; and the
game object just has these few

00:38:08.720 --> 00:38:11.620
properties with it: A name, its
position, rotation, and scale.

00:38:12.580 --> 00:38:16.290
So what I can do is highlight my pause
screen, game object, create

00:38:16.340 --> 00:38:20.070
a GUI texture, and there we have it.
It's there all the time though.

00:38:20.120 --> 00:38:21.360
I don't want it there all the time.

00:38:22.330 --> 00:38:23.280
So what we have to do

00:38:24.860 --> 00:38:29.560
is use our code to say, hey, as soon
as you start up, hide that image.

00:38:29.610 --> 00:38:32.450
And then when you detect someone has
moved away from the application,

00:38:32.500 --> 00:38:35.610
show the image. And when someone
hits escape, show the image

00:38:35.660 --> 00:38:38.110
and pause it. And when someone hits
escape again, hide the image.

00:38:38.690 --> 00:38:40.670
That screen manager
script here...

00:38:40.720 --> 00:38:47.000
I want to make sure I didn't
change my (inaudible).

00:38:47.720 --> 00:38:53.270
Perfect. So the screen manager
script... it's in C sharp.

00:38:56.630 --> 00:38:58.150
It's real basic. We simply say,

00:39:00.040 --> 00:39:02.950
because we inherit from monobehavior,
there's some functions

00:39:03.000 --> 00:39:04.630
that are available to us: Awake

00:39:06.030 --> 00:39:08.890
that we're going to use here, and we're
going to use start and update.

00:39:08.940 --> 00:39:11.870
Awake gets called first. It gets
called once. Start then gets

00:39:11.920 --> 00:39:15.220
called after that. Update gets called
every single tick. If your

00:39:15.270 --> 00:39:18.120
game is 60 frames a second, this
gets called 60 times a second.

00:39:18.170 --> 00:39:19.280
Your game (inaudible).

00:39:20.450 --> 00:39:22.940
So I'm saying when I wake up, I want
you to hook into this Window

00:39:22.990 --> 00:39:26.920
size change event. So if we snap
our application to the side,

00:39:26.970 --> 00:39:27.750
we're going to pause.

00:39:29.330 --> 00:39:34.280
When this code starts up, find an
object, not by name but by tag.

00:39:34.330 --> 00:39:36.420
It's a typical process in Unity.
You don't look for an object

00:39:36.470 --> 00:39:39.130
by name. You look for a string
tag. In visual studio we can

00:39:39.180 --> 00:39:41.170
assign a text tag to an object.

00:39:42.660 --> 00:39:44.890
Another way you can do it in Unity
is by dragging and dropping

00:39:44.940 --> 00:39:48.790
references ahead of time. We're going
to use this to find by tag.

00:39:48.840 --> 00:39:51.260
I will show you the tags. Then
we're going to hide it.

00:39:52.160 --> 00:39:54.720
This is our code here that
runs every single tick.

00:39:56.010 --> 00:39:58.810
If we'd hit escape, if we are
pause, resume. If we are not,

00:39:58.860 --> 00:39:59.640
go ahead and pause.

00:40:00.470 --> 00:40:03.370
Plus Carl showed earlier in order
to use this code we have to

00:40:03.420 --> 00:40:05.990
assign it as something. So I'm
going to create just an empty

00:40:06.040 --> 00:40:11.400
game object and call this screen manager.
The name doesn't actually matter.

00:40:13.410 --> 00:40:15.860
But then I can take my code here,
drag it right up there,

00:40:17.210 --> 00:40:19.490
voila, now we have something
that uses our code.

00:40:20.350 --> 00:40:21.210
When I click play...

00:40:25.670 --> 00:40:29.690
so notice it didn't go away because
I said I'm finding my pause

00:40:29.740 --> 00:40:33.400
screen by tag. I haven't actually
said that my pause screen has

00:40:33.450 --> 00:40:36.160
a tag of pause yet. So simple.

00:40:36.680 --> 00:40:37.720
What we need to do here...

00:40:38.900 --> 00:40:42.220
notice under our tags in visual studio
we can just type a free-form tag.

00:40:42.270 --> 00:40:45.320
In Unity, you actually have to define
a tag. And these are the

00:40:45.370 --> 00:40:48.510
predefined ones here. Carl added
a couple others. Simply go

00:40:48.560 --> 00:40:51.580
to add tag and it's this interface
here. You can just type in

00:40:51.630 --> 00:40:53.650
the tag name. We're going
to call this pause.

00:40:55.400 --> 00:40:58.750
Now we can go back to our pause
screen, assign that tag, pause.

00:40:59.880 --> 00:41:01.820
Now when it starts up it should
find it because it's looking

00:41:01.870 --> 00:41:05.320
for it by tag, and it should hide
it. There we go. I'm going

00:41:05.370 --> 00:41:08.990
to switch away, come back to. It's
paused. Now I didn't pause

00:41:09.040 --> 00:41:12.200
the sound. I think I have the code commented
out in there intentionally

00:41:12.250 --> 00:41:14.100
so you can see like a little
background noise.

00:41:15.210 --> 00:41:17.050
So this is the build that I created.

00:41:17.920 --> 00:41:20.860
So let's go over and see what was created
on the visual studio side.

00:41:25.180 --> 00:41:28.090
By default, this is actually a
good transition to talk about

00:41:28.680 --> 00:41:30.510
what happens when you know
you build your game.

00:41:33.670 --> 00:41:36.520
You can build over and over and
over and over and over again.

00:41:36.570 --> 00:41:39.680
What happens to your visual studio project?
Unity does not overwrite it.

00:41:39.730 --> 00:41:42.200
You can add your own custom codes
to that. The only thing Unity

00:41:42.250 --> 00:41:44.860
will overwrite is your data folder.
That's where it stores all

00:41:44.910 --> 00:41:47.950
of its own stuff. So this is cool.
Add your own code. It doesn't

00:41:48.000 --> 00:41:50.950
get overwritten. The down side...
not even a down side, just

00:41:51.000 --> 00:41:54.120
something to be aware of... is
if you go in later and specify

00:41:54.170 --> 00:41:56.910
images and settings inside of Unity,
they won't get pushed out

00:41:56.960 --> 00:41:59.600
to your project. You'll either have
to manually merge them using

00:41:59.650 --> 00:42:02.640
some sort of Compare tool like Beyond
Compare, or you can actually

00:42:02.690 --> 00:42:06.740
go in and just manually set the properties
in your visual studio

00:42:06.790 --> 00:42:07.860
project itself.

00:42:09.810 --> 00:42:14.180
So visual studio will default on
a Windows store build to ARM.

00:42:14.230 --> 00:42:16.710
It's assuming you're going to automatically
deploy out to like

00:42:16.760 --> 00:42:19.690
a surface tablet. So that's something
to be aware of because

00:42:19.740 --> 00:42:22.130
it gets a lot of people the first
time. You need to change it

00:42:22.180 --> 00:42:25.890
to x86, and I will show you that.
Secondly, as visual studio

00:42:25.940 --> 00:42:30.260
developers, .NET developers, we're
used to debug and release builds.

00:42:30.310 --> 00:42:34.640
Right? Now there's a new build in there
for this platform called master.

00:42:34.970 --> 00:42:37.550
Release is not your release build
that's going out to production.

00:42:37.600 --> 00:42:39.880
That's, actually, your master build.
Debug has the most amount

00:42:39.930 --> 00:42:44.040
of debug information. Release most
of the debug information is

00:42:44.090 --> 00:42:46.550
stripped out but still has profiler
support. There is a profiler

00:42:46.600 --> 00:42:49.010
in Unity. And master is the one
that you're going to want to

00:42:49.060 --> 00:42:50.310
build and send up to the store.

00:42:51.590 --> 00:42:55.350
Now, on your Windows phone projects,
you can use the emulator.

00:42:55.400 --> 00:42:58.460
Nothing different there. But because
it's a virtual machine of

00:42:58.510 --> 00:43:01.050
Windows phone, something to be
aware of is that uses the word

00:43:01.100 --> 00:43:02.350
software rasterizer.

00:43:02.890 --> 00:43:06.920
So it might support things in your
emulator that the actual devise

00:43:06.970 --> 00:43:09.720
that you're going to test on doesn't
support. So it's just something

00:43:09.770 --> 00:43:10.580
to be aware of.

00:43:11.240 --> 00:43:14.040
And the simulator in Windows 8 will
show you what your current

00:43:14.090 --> 00:43:16.390
symptom supports. It's not an
emulator. It's a simulator.

00:43:16.440 --> 00:43:20.130
It uses a feature of Windows 8 called
Child Sessions, which is

00:43:20.180 --> 00:43:24.120
actually, essentially, a form of remote
desktop. A remote desktops

00:43:24.170 --> 00:43:26.830
back into your local system, that's
what your simulator is.

00:43:26.880 --> 00:43:29.780
It allows you to scale the different
resolutions, great for testing,

00:43:29.830 --> 00:43:31.980
but I still highly recommend
testing on devices.

00:43:33.710 --> 00:43:38.220
Now let's talk about what we can do to
integrate from the best experience.

00:43:39.350 --> 00:43:41.870
We're going to build a visual studio.
Why would we want to add

00:43:41.920 --> 00:43:45.030
anything else onto that? We have
got our game. We can just deploy

00:43:45.080 --> 00:43:48.410
it out to the store. You can. But in
order to get the best experience,

00:43:48.820 --> 00:43:51.720
you want to use platform specific
features. You want to call

00:43:51.770 --> 00:43:55.770
it a rich Windows API, things like
customizing your live tiles,

00:43:55.820 --> 00:43:56.850
adding live tiles.

00:43:57.520 --> 00:43:59.770
If the user wants to review your
application, launching them

00:43:59.820 --> 00:44:02.250
off to be able to review, that
networking code. If you want

00:44:02.300 --> 00:44:04.440
to integrate with Azure, Azure
mobile services... right...

00:44:04.490 --> 00:44:07.960
you can add this code into your visual
studio project. GUI location

00:44:08.010 --> 00:44:11.040
and Windows RT, like two lines of
code, real easy to integrate.

00:44:11.410 --> 00:44:14.760
And, of course, we will have thousands
and thousands of Nuget packages.

00:44:15.430 --> 00:44:17.000
Let's go ahead and look at

00:44:21.700 --> 00:44:24.550
our default Windows store built
here. Notice it's ARM.

00:44:25.500 --> 00:44:28.080
So if I run this right now, I'm
not... our ARM system is not

00:44:28.130 --> 00:44:28.810
going to work.

00:44:29.340 --> 00:44:32.870
Easy fix. Configuration manager.
We change it to x86.

00:44:33.940 --> 00:44:36.620
And you're probably wondering,
well, do you really have a 32

00:44:36.670 --> 00:44:40.660
bit system? No. This is a 64 bit system.
The Unity... they provided

00:44:40.710 --> 00:44:44.770
two players. They have an ARM version
and then they have a 32

00:44:44.820 --> 00:44:47.700
bit version. They don't have a
64 bit version of the player.

00:44:48.670 --> 00:44:52.920
Now, remember that Unity is a native
code game engine. It's written

00:44:52.970 --> 00:44:56.260
in C plus plus. So as such they have
to do native code buildings

00:44:56.310 --> 00:44:59.760
for ARM and they have to do
native code building for x86: Dot

00:44:59.810 --> 00:45:03.230
net developers typically do any
CPU. You can run it anywhere

00:45:03.280 --> 00:45:05.110
because we are dealing with native
code. That's why we have

00:45:05.160 --> 00:45:07.780
to do each platform here.
So I'm going to do x86

00:45:11.380 --> 00:45:12.210
and run that,

00:45:14.070 --> 00:45:18.510
and then we should see Yeti and
the Mushrooms. I swear want

00:45:18.560 --> 00:45:19.770
to have a band name called that.

00:45:20.540 --> 00:45:25.690
There you go.

00:45:27.670 --> 00:45:30.510
Switch away from it. Go back.
There is our pause screen.

00:45:30.560 --> 00:45:32.510
Works as I would hope it to work.

00:45:35.390 --> 00:45:38.130
Now let's take it a step further.
Let's integrate some platform

00:45:38.180 --> 00:45:39.640
specific features into there.

00:45:40.620 --> 00:45:41.630
What we can do... I am

00:45:45.100 --> 00:45:47.960
going to go into my ap.zaml.C.sharp.

00:45:48.960 --> 00:45:52.060
There's an event in hereafter the
splash screen is removed, I'm

00:45:52.110 --> 00:45:55.270
going to go ahead and update the
live tile. Template code...

00:45:55.320 --> 00:45:57.060
we have all seen this code before.

00:46:00.870 --> 00:46:05.350
And, also, I'm going to add in my
actual live tile that I'm going

00:46:05.400 --> 00:46:08.680
to update here. Now, it probably
is important to note that I

00:46:08.730 --> 00:46:12.680
am doing this purely on the Zaml
site... sorry... in the C

00:46:12.730 --> 00:46:15.910
sharp side individual studio project.
What you can also do is

00:46:15.960 --> 00:46:19.270
you can integrate with Unity's
events. So you can raise...

00:46:19.320 --> 00:46:22.270
you can have an event defined in
Unity and that gets raised in

00:46:22.320 --> 00:46:24.950
Unity, and the visual studio side...
your visual studio project

00:46:25.000 --> 00:46:28.400
hooks into it. So the two can actually
talk back and forth real,

00:46:28.450 --> 00:46:31.000
basically, easy. Would
you call it easy?

00:46:31.050 --> 00:46:31.470
>> Super easy.

00:46:31.520 --> 00:46:34.060
>> I would call it super easy. Let
me drag my image in here and

00:46:34.110 --> 00:46:35.550
we can show you what this looks like.

00:46:37.350 --> 00:46:42.100
Add on not my pause screen, Adam.
We want three times fun.

00:46:42.150 --> 00:46:43.940
Triple mushrooms is better
than one mushroom.

00:46:44.650 --> 00:46:47.320
That's what my grandmother always
said. All right? She didn't

00:46:47.370 --> 00:46:52.880
say that. All right. Let's
build this and run it.

00:46:54.550 --> 00:46:57.330
I'm going to actually pin this
to my start screen as well.

00:46:59.260 --> 00:46:59.830
It's already pinned.

00:46:59.880 --> 00:47:04.100
Perfect. Yes, that is my start screen.

00:47:04.700 --> 00:47:07.720
I like it active. Right. I like to
see things that keep me updated;

00:47:08.910 --> 00:47:11.530
live tiles that flip things around.
A lot of games don't integrate

00:47:11.580 --> 00:47:13.060
with live tiles and I think it's
something that could really

00:47:13.110 --> 00:47:16.960
catch the user's attention there.
Even if it's not fully dynamic

00:47:17.010 --> 00:47:17.840
and flipping,

00:47:19.100 --> 00:47:21.350
like cut the rope tells you how
many stars you got in the game.

00:47:22.330 --> 00:47:23.440
So let's go ahead...

00:47:24.460 --> 00:47:27.980
>> We haven't played much
yet on the game.

00:47:28.850 --> 00:47:32.260
>> Funny story. My son played a
game on my phone the other day

00:47:32.310 --> 00:47:35.620
and posted it out to Facebook accidentally.
Someone posted something

00:47:35.670 --> 00:47:37.970
else saying, you know, I beat your
score by like 2 million.

00:47:38.020 --> 00:47:39.510
And I wrote, you just beat my 3-year-old.

00:47:40.760 --> 00:47:44.220
So there is a game here.

00:47:45.340 --> 00:47:49.420
Now notice our tile here is just
flipped. So with just a few

00:47:49.470 --> 00:47:53.480
lines of code, basic MSDN type
sample, we've got a live tile

00:47:53.530 --> 00:47:55.930
that's updated. And you can entice
the users to come back in

00:47:55.980 --> 00:47:59.120
your game, come back for three times
the points for a short time only.

00:48:01.220 --> 00:48:04.500
Now on the Windows phone
side of things,

00:48:10.130 --> 00:48:12.280
same type of thing. You go in the
build settings in Unity and

00:48:12.330 --> 00:48:13.470
you set your properties,

00:48:14.730 --> 00:48:16.860
which I will show you. Let's
go back to Unity real quick.

00:48:19.270 --> 00:48:22.850
Switch your platform over
here to Windows phone 8.

00:48:23.600 --> 00:48:26.750
The one minor thing to be aware
of is in your player settings

00:48:26.800 --> 00:48:28.500
there's far fewer settings.

00:48:29.210 --> 00:48:35.040
Oh, interesting. I see it on mine.

00:48:37.010 --> 00:48:39.870
Let's try to all tab a little bit.

00:48:42.380 --> 00:48:43.160
>> Did you refresh?

00:48:43.210 --> 00:48:46.740
>> Yeah. Weird. There
we go. Hardware.

00:48:46.790 --> 00:48:52.740
That's why

00:48:54.320 --> 00:49:00.600
I'm a software guy. So our game
here is you can specify that

00:49:00.650 --> 00:49:04.050
your default orientation is going to
be landscape right, for example.

00:49:04.600 --> 00:49:06.810
Then the image... the one minor
got you (inaudible) with the

00:49:06.860 --> 00:49:10.230
Windows phone build is you don't
specify your image in here.

00:49:10.280 --> 00:49:12.510
You actually have to specify your
image in your visual studio

00:49:12.560 --> 00:49:14.710
project, which is different than
the Windows store solution where

00:49:14.760 --> 00:49:17.120
you can specify all your images
here. Windows phone you have

00:49:17.170 --> 00:49:19.310
to specify it on the
visual studio side.

00:49:21.280 --> 00:49:22.860
So there's our game, visual studio.

00:49:23.650 --> 00:49:27.260
We have exported out to Windows
phone. Now, notice performance

00:49:27.310 --> 00:49:28.630
is a little jittery.

00:49:29.570 --> 00:49:32.620
Again, it's an emulator. So the
idea is you want to eventually

00:49:32.670 --> 00:49:34.430
test on a real piece of hardware.

00:49:43.350 --> 00:49:45.660
So, next, what are the questions
that folks ask me a lot.

00:49:46.640 --> 00:49:50.400
Well, can we use visual studio. Monodevelopment
was used by Unity

00:49:50.450 --> 00:49:55.060
because it supports multiple platforms
easily. So Unity uses

00:49:55.110 --> 00:49:58.310
a soft debugger. Internally it sent
commands and executes things

00:49:58.360 --> 00:50:00.950
against the code base. There's
a plug that they have written

00:50:01.000 --> 00:50:03.190
and mono developed that kind of controls
that and sends commands

00:50:03.240 --> 00:50:06.590
back to Unity. So visual studio
by default does not have that.

00:50:06.640 --> 00:50:10.020
So we can use visual studio as a
code editor and you can specify

00:50:10.070 --> 00:50:14.720
that in visual studio. You do not, however,
get your debugging experience.

00:50:14.770 --> 00:50:17.080
You can't just attach the process
because you don't have anything

00:50:17.130 --> 00:50:18.820
to interact with that soft debugger.

00:50:20.610 --> 00:50:21.940
So what you can do...

00:50:21.990 --> 00:50:27.240
let me show you the preferences,
external tools.

00:50:27.920 --> 00:50:30.590
Right here, monodevelop is the default.
You can browse and find

00:50:30.640 --> 00:50:31.630
visual studio.

00:50:32.500 --> 00:50:34.690
So that's one way you can use it.
You can get some tele sense

00:50:34.740 --> 00:50:38.210
on there. Again, you cannot integrate
with the full debugging experience.

00:50:40.380 --> 00:50:43.520
Now there is a third party product
called Unity VS, which allows

00:50:43.570 --> 00:50:46.880
you to use visual studio to debug
and develop. Click play in

00:50:46.930 --> 00:50:49.370
visual studio and click play in Unity
and, bam, you're debugging

00:50:49.420 --> 00:50:51.100
your code. It works really well.

00:50:51.640 --> 00:50:54.640
You can also use visual studio to
debug after your build. I will

00:50:54.690 --> 00:50:58.800
show you that in one second. And Unity
pro-version supports profiling.

00:50:58.850 --> 00:51:01.690
They have a very power profiler
that you see where there's some

00:51:01.740 --> 00:51:03.390
performance issues inside
of your game.

00:51:09.200 --> 00:51:10.350
So I am going to add this to...

00:51:11.910 --> 00:51:14.080
let's do this on my Windows
store build.

00:51:15.040 --> 00:51:18.230
I have already exported. I have already
done my build from Unity.

00:51:21.380 --> 00:51:23.840
What you can do... let me open
up the right folder here.

00:51:31.720 --> 00:51:34.290
Unity will generate a project so
you can come in here and say,

00:51:34.340 --> 00:51:35.710
add existing project,

00:51:39.840 --> 00:51:45.500
assembly C sharp-VS, visual studio.
You can add this project.

00:51:49.440 --> 00:51:53.360
Now you can come in here and see
all of your code that you wrote

00:51:53.410 --> 00:51:54.520
for your Unity game.

00:51:55.620 --> 00:51:58.530
And now you're, essentially, debugging
on the platform. I can

00:51:58.580 --> 00:52:01.330
run it now on my local machine or
I can do this the same thing

00:52:01.380 --> 00:52:04.990
for the Windows phone version debugging
my Unity code as I have

00:52:05.040 --> 00:52:08.280
deployed to my final platform.
If you make any changes on the

00:52:08.330 --> 00:52:11.010
Unity side though, you have to do
this whole build process again

00:52:11.060 --> 00:52:13.260
because there's a lot of optimizations
that Unity does behind

00:52:13.310 --> 00:52:17.070
the scenes to generate this information
and to generate all these assemblies.

00:52:17.120 --> 00:52:20.370
So you can't just make one change on
any side and have this working.

00:52:20.420 --> 00:52:22.920
You've got to do your build, do
the same thing again here and

00:52:22.970 --> 00:52:26.210
run it. But once you are... I used
this the other night to debug

00:52:26.260 --> 00:52:29.700
a joy stick issue. It works well.
Just know it takes a little

00:52:29.750 --> 00:52:30.580
bit longer this way.

00:52:36.740 --> 00:52:40.300
So publishing. There's not too much
different here than, essentially,

00:52:40.350 --> 00:52:42.210
that's been around for a while.
There's a couple things to be

00:52:42.260 --> 00:52:42.860
aware of.

00:52:43.750 --> 00:52:45.140
You build in visual studio.

00:52:47.260 --> 00:52:51.130
You run your tests run your tests for
phones or Windows ap certification

00:52:51.180 --> 00:52:52.730
kit for your Windows store aps.

00:52:53.810 --> 00:52:56.660
Windows phone 8, same thing. You upload
your XAP file to the store.

00:52:57.180 --> 00:52:58.540
You're done. Easy enough.

00:52:59.270 --> 00:53:02.690
Now, on Windows 8, because we have
different devices that can

00:53:02.740 --> 00:53:07.920
run on Intel-Based hardware and
ARM base, for the same reason

00:53:07.970 --> 00:53:11.420
I said before, on how Unity supports
different builds, they have

00:53:11.470 --> 00:53:15.650
built their native code for ARM
and for x86, you have to create

00:53:15.700 --> 00:53:17.650
your separate builds. You go in
the visual studio. You have

00:53:17.700 --> 00:53:20.750
to select ARM, do your build, go
in the visual studio, select

00:53:20.800 --> 00:53:24.920
x86, do your build, upload both
of those packages so folks on

00:53:24.970 --> 00:53:27.710
either devices can find your
game and use your game.

00:53:30.670 --> 00:53:34.230
With a game, you're going to want
to ensure that touch on the

00:53:34.280 --> 00:53:37.680
phone is supported if it makes sense.
If it's just a video ap,

00:53:37.730 --> 00:53:39.510
then I guess it doesn't make too
much sense. Although maybe

00:53:39.560 --> 00:53:42.370
touch controls would. But most games,
right, they have some sort

00:53:42.420 --> 00:53:45.830
of touch interaction. Now, for Windows
store applications, typically

00:53:46.360 --> 00:53:49.810
we like to see games that support
both touch and keyboard.

00:53:49.860 --> 00:53:52.250
If you can't support one or the
other, typically you want to

00:53:52.300 --> 00:53:55.800
note that during your ap submission
so it won't get rejected.

00:53:56.740 --> 00:53:58.320
Definitely need to know that though.

00:53:59.060 --> 00:54:02.750
And I can't stress this enough. Deploy
to real devices for testing.

00:54:02.800 --> 00:54:04.370
Simulator can only do so much.

00:54:05.040 --> 00:54:07.440
An emulator can only do so much.
It's real important...

00:54:07.490 --> 00:54:09.280
and I will show you a link at the
end on where you can get some

00:54:09.330 --> 00:54:10.440
phones for testing.

00:54:16.260 --> 00:54:18.690
I don't know about you, but I can't
wait to see what kind of

00:54:18.740 --> 00:54:22.160
stuff you guys make. The game field
is phenomenal. There's so

00:54:22.210 --> 00:54:25.960
much creativity and so many cool things,
especially now how platforms

00:54:26.010 --> 00:54:29.250
are integrating together. Like
when you get a surface tablet

00:54:29.300 --> 00:54:31.840
and somebody is doing something
with a game on Windows phone

00:54:31.890 --> 00:54:34.940
and something else is running on
X box. It is absolutely amazing

00:54:34.990 --> 00:54:37.780
and there's been so many cool games
created so far with Unity

00:54:37.830 --> 00:54:41.100
that run on Windows phone and Windows
store. Unity has a gallery

00:54:41.150 --> 00:54:43.170
on their site where you can go and
check out some of these games.

00:54:43.220 --> 00:54:45.950
You can actually run some of them
inside of the browser because

00:54:46.000 --> 00:54:48.270
they have a web plug and you can check
them out right there as well.

00:54:49.940 --> 00:54:53.500
And here's some resources. We integrate
very tightly with Unity.

00:54:53.550 --> 00:54:56.190
We work with them all the time.
We have a great partnership.

00:54:56.240 --> 00:54:59.970
We are always supporting a platform.
Engineering teams work together.

00:55:00.020 --> 00:55:02.550
So there's a page out there, Unity3d.com/pages/windows.

00:55:04.650 --> 00:55:07.100
On that site, we list current offers
that we have going on.

00:55:07.150 --> 00:55:11.190
For example, if you already have
games on existing platforms,

00:55:11.240 --> 00:55:15.290
you want to bring them to the platform,
there's different prizes

00:55:15.340 --> 00:55:18.830
you can get, check out that page. But
also probably more importantly

00:55:18.880 --> 00:55:22.370
for me, there is getting started
documents on there and porting

00:55:22.420 --> 00:55:24.590
guidance documents on there as
well. So you can go on there

00:55:24.640 --> 00:55:28.070
and kind of read about the basics
of using Unity on Windows phone,

00:55:28.120 --> 00:55:30.270
Windows 8. There is a great community
out there. You guys have

00:55:30.320 --> 00:55:33.880
an awesome forum out there with a
great format. Almost any question

00:55:33.930 --> 00:55:36.340
you can type into your search engine,
it will come up in your

00:55:36.390 --> 00:55:40.250
Unity forums. The Unity asset store
is phenomenal. Some of my

00:55:40.300 --> 00:55:43.020
favorite add-ins... there are so many
add-ins. I probably purchase

00:55:43.070 --> 00:55:46.260
way more than I actual use. Unity
VS, because I'm a visual studio

00:55:46.310 --> 00:55:49.480
developer, I really like Unity VS. I
can integrate with visual studio.

00:55:49.530 --> 00:55:52.410
Prime 31 writes some plug-ins
for Windows. So maybe I don't

00:55:52.460 --> 00:55:55.440
want to spend all the time to write
and test code. You can buy

00:55:55.490 --> 00:55:59.000
a plug-in, add it to Unity, and then
you can support in ap purchases,

00:55:59.050 --> 00:56:01.330
et cetera. You can also write that
same code yourself. I just

00:56:01.380 --> 00:56:03.840
want to let you know that some folks
like to just purchase something

00:56:03.890 --> 00:56:07.260
ahead of time. Right around the
.netecosystem, there's a huge

00:56:08.270 --> 00:56:11.160
community of plug-in providers and
components that you can buy.

00:56:11.210 --> 00:56:12.170
Same thing in Unity.

00:56:12.730 --> 00:56:15.110
And there's a multi-platform tool
kit which makes it real easy

00:56:15.160 --> 00:56:19.000
to target multiple platforms. Now,
people say where can I get

00:56:19.050 --> 00:56:20.150
a phone to test on.

00:56:21.230 --> 00:56:25.850
And that's easy to answer. Nokia
has a program called Dvlup.

00:56:25.900 --> 00:56:31.950
If you go to Dvlup, dvulp.com/loan,
you can go on there and select

00:56:32.400 --> 00:56:35.320
from a bunch of different phones, even
some of the brand new phones.

00:56:35.370 --> 00:56:38.070
They will ship it to you for two
weeks to test out your game

00:56:38.120 --> 00:56:41.900
on, postage paid, send it back. It's
awesome program to check out.

00:56:41.950 --> 00:56:43.930
And that other program I showed
you earlier where you can drag

00:56:43.980 --> 00:56:46.590
and drop your images onto it and it
generates them for you, that's

00:56:46.640 --> 00:56:50.030
aka.ms/wsip, Windows store
images processor.

00:56:50.580 --> 00:56:53.760
Please don't forget your evals. We
have the code challenge booth

00:56:53.810 --> 00:56:56.710
out there. I listed quick start
challenges. There's a Unity

00:56:56.760 --> 00:56:59.410
demo on there. If you want to go and
get your hands on with Unity,

00:56:59.460 --> 00:57:01.950
you can check that out over at
the code challenge booth area.

00:57:02.000 --> 00:57:04.830
And tomorrow there is some expert
one-on-one time where you have,

00:57:04.880 --> 00:57:07.150
I think, downstairs in some of
the rooms I will be manning I

00:57:07.200 --> 00:57:10.150
think around 4:00 for gaming there.
So if you have any questions,

00:57:10.200 --> 00:57:12.730
you want to talk then or just
reach out to me by e-mail.

00:57:12.780 --> 00:57:14.670
And, Carl, thank you very much.

00:57:14.720 --> 00:57:17.590
>> Thank you, Adam, so much. Thank
you to come here and to listen

00:57:17.640 --> 00:57:20.640
to me. I can't wait to see how you can
make games later on. Thank you.

