﻿WEBVTT

NOTE duration:"01:14:55"

NOTE recognizability:0.840

NOTE language:en-us

NOTE Confidence: 0.817989136666667

00:00:10.610 --> 00:00:12.890
I'm never talking about Windows Phone,

NOTE Confidence: 0.817989136666667

00:00:12.890 --> 00:00:15.920
XNA games, fun, profit, and physics.

NOTE Confidence: 0.817989136666667

00:00:15.920 --> 00:00:17.664
We're going to go for about 75 minutes.

NOTE Confidence: 0.817989136666667

00:00:17.670 --> 00:00:19.620
It'll seem a lot longer though.

NOTE Confidence: 0.817989136666667

00:00:19.620 --> 00:00:22.270
These are the jokes folks.

NOTE Confidence: 0.817989136666667

00:00:22.270 --> 00:00:23.355
I'm gonna get you guys

NOTE Confidence: 0.817989136666667

00:00:23.355 --> 00:00:24.650
to laugh if he kills me.

NOTE Confidence: 0.817989136666667

00:00:24.650 --> 00:00:26.925
And with that he fell down dead.

NOTE Confidence: 0.817989136666667

00:00:26.930 --> 00:00:28.925
No I've got a list of emergency

NOTE Confidence: 0.817989136666667

00:00:28.925 --> 00:00:30.823
jokes here which I use when the

NOTE Confidence: 0.817989136666667

00:00:30.823 --> 00:00:33.100
going gets a bit tough and so we'll

NOTE Confidence: 0.817989136666667

00:00:33.100 --> 00:00:35.550
save those for a little bit later.

NOTE Confidence: 0.817989136666667

00:00:35.550 --> 00:00:36.920
And what you're gonna get

NOTE Confidence: 0.817989136666667

00:00:36.920 --> 00:00:38.690
from me though before I start.

NOTE Confidence: 0.817989136666667

00:00:38.690 --> 00:00:40.518
Quick quick straw poll.

NOTE Confidence: 0.817989136666667

00:00:40.518 --> 00:00:43.940
How many folks here use Visual Studio?

NOTE Confidence: 0.817989136666667

00:00:43.940 --> 00:00:46.496
OK, how many C sharp writers have we got?

NOTE Confidence: 0.817989136666667

00:00:46.500 --> 00:00:48.510
How many VB?

NOTE Confidence: 0.817989136666667

00:00:48.510 --> 00:00:51.158
OK, how many XNA people have we got

NOTE Confidence: 0.817989136666667

00:00:51.158 --> 00:00:53.558
here who are already using XNA?

NOTE Confidence: 0.817989136666667

00:00:53.560 --> 00:00:54.748
One or two great,

NOTE Confidence: 0.817989136666667

00:00:54.748 --> 00:00:56.967
so I'm fairly sure I know more

NOTE Confidence: 0.817989136666667

00:00:56.967 --> 00:00:59.157
than most of the audience about.

NOTE Confidence: 0.817989136666667

00:00:59.160 --> 00:01:00.320
Actually, I like that.

NOTE Confidence: 0.817989136666667

00:01:00.320 --> 00:01:02.349
That's good. That's a win.

NOTE Confidence: 0.817989136666667

00:01:02.349 --> 00:01:05.730
OK, we're gonna get from me is.

NOTE Confidence: 0.817989136666667

00:01:05.730 --> 00:01:08.698
A little bit of an overview of XNA.

NOTE Confidence: 0.817989136666667

00:01:08.700 --> 00:01:10.645
How we actually build games

NOTE Confidence: 0.817989136666667

00:01:10.645 --> 00:01:13.040
and water XNA game looks like.

NOTE Confidence: 0.817989136666667

00:01:13.040 --> 00:01:15.077
And then we're gonna move into how

NOTE Confidence: 0.817989136666667

00:01:15.077 --> 00:01:17.320
you can make more interesting XNA

NOTE Confidence: 0.817989136666667

00:01:17.320 --> 00:01:19.490
games with particular reference to

NOTE Confidence: 0.817989136666667

00:01:19.490 --> 00:01:21.842
adding physics so I can have a quick

NOTE Confidence: 0.817989136666667

00:01:21.842 --> 00:01:23.386
play with the Farseer engine and

NOTE Confidence: 0.817989136666667

00:01:23.386 --> 00:01:25.362
then at the end of it little bit

NOTE Confidence: 0.817989136666667

00:01:25.425 --> 00:01:27.321
about the accelerometer and how you

NOTE Confidence: 0.817989136666667

00:01:27.321 --> 00:01:29.535
use that to control Windows Phone games,

NOTE Confidence: 0.817989136666667

00:01:29.535 --> 00:01:31.110
and then finally an overview

NOTE Confidence: 0.817989136666667

00:01:31.110 --> 00:01:32.480
of the marketplace.

NOTE Confidence: 0.817989136666667

00:01:32.480 --> 00:01:33.160
So yeah,

NOTE Confidence: 0.817989136666667

00:01:33.160 --> 00:01:36.284
75 minutes or seem it'll just whizzed by as

NOTE Confidence: 0.817989136666667

00:01:36.284 --> 00:01:38.932
though by magic and to get things going.

NOTE Confidence: 0.817989136666667

00:01:38.940 --> 00:01:42.760
I tell you my favorite joke in all the world.

NOTE Confidence: 0.817989136666667

00:01:42.760 --> 00:01:45.082
Which is a man walks or a horse walks

NOTE Confidence: 0.817989136666667

00:01:45.082 --> 00:01:47.440
into a bar, and the barman says, why?

NOTE Confidence: 0.817989136666667

00:01:47.440 --> 00:01:50.974
The long face? OK right?

NOTE Confidence: 0.817989136666667

00:01:50.974 --> 00:01:54.346
Well the others are even better.

NOTE Confidence: 0.817989136666667

00:01:54.350 --> 00:01:56.807
OK if you if you can bear that right.

NOTE Confidence: 0.817989136666667

00:01:56.810 --> 00:01:59.282
OK so first thing.

NOTE Confidence: 0.817989136666667

00:01:59.282 --> 00:02:02.691
A quick overview of XNA effectively

NOTE Confidence: 0.817989136666667

00:02:02.691 --> 00:02:04.557
when you build a window so

NOTE Confidence: 0.817989136666667

00:02:04.557 --> 00:02:06.080
quick one more question,

NOTE Confidence: 0.817989136666667

00:02:06.080 --> 00:02:08.078
how many folks here are writing

NOTE Confidence: 0.817989136666667

00:02:08.078 --> 00:02:10.179
for Windows Phone at the moment?

NOTE Confidence: 0.817989136666667

00:02:10.180 --> 00:02:10.511
OK,

NOTE Confidence: 0.817989136666667

00:02:10.511 --> 00:02:12.497
great you other guys have got

NOTE Confidence: 0.817989136666667

00:02:12.497 --> 00:02:14.200
such a lovely prospect.

NOTE Confidence: 0.817989136666667

00:02:14.200 --> 00:02:16.036
Such a nice time to have.

NOTE Confidence: 0.817989136666667

00:02:16.040 --> 00:02:18.301
It's great 'cause we've if you've got

NOTE Confidence: 0.817989136666667

00:02:18.301 --> 00:02:20.257
studio skills you're already able to

NOTE Confidence: 0.817989136666667

00:02:20.257 --> 00:02:22.394
write for phone anyway, so that's lovely.

NOTE Confidence: 0.817989136666667

00:02:22.394 --> 00:02:22.990
That's great.

NOTE Confidence: 0.817989136666667

00:02:22.990 --> 00:02:24.460
I'll show you how to get started.

NOTE Confidence: 0.817989136666667

00:02:24.460 --> 00:02:26.056
I'll show you how games fit

NOTE Confidence: 0.817989136666667

00:02:26.056 --> 00:02:27.673
together and then we'll make some

NOTE Confidence: 0.817989136666667

00:02:27.673 --> 00:02:29.416
games and play them on the phone.

NOTE Confidence: 0.817989136666667

00:02:29.420 --> 00:02:31.058
As far as we're concerned though,

NOTE Confidence: 0.817989136666667

00:02:31.060 --> 00:02:33.680
XNA gives you everything you

NOTE Confidence: 0.817989136666667

00:02:33.680 --> 00:02:35.776
need to create games.

NOTE Confidence: 0.817989136666667

00:02:35.780 --> 00:02:37.958
It's basically a new project type

NOTE Confidence: 0.817989136666667

00:02:37.958 --> 00:02:40.220
which you build when you create.

NOTE Confidence: 0.817989136666667

00:02:40.220 --> 00:02:42.092
Your brand new project and it

NOTE Confidence: 0.817989136666667

00:02:42.092 --> 00:02:44.100
does all the content management.

NOTE Confidence: 0.817989136666667

00:02:44.100 --> 00:02:45.912
It takes your images and deploys

NOTE Confidence: 0.817989136666667

00:02:45.912 --> 00:02:47.120
them to the phone.

NOTE Confidence: 0.817989136666667

00:02:47.120 --> 00:02:50.978
It does all the 2D and 3D positioning

NOTE Confidence: 0.817989136666667

00:02:50.978 --> 00:02:53.792
and animation and you can write

NOTE Confidence: 0.817989136666667

00:02:53.792 --> 00:02:55.847
games either way 2D or 3D.

NOTE Confidence: 0.817989136666667

00:02:55.850 --> 00:02:57.950
My advice start in 2D with flat

NOTE Confidence: 0.817989136666667

00:02:57.950 --> 00:03:00.362
games but you can do things to

NOTE Confidence: 0.817989136666667

00:03:00.362 --> 00:03:02.162
fake perspective by by drawing

NOTE Confidence: 0.817989136666667

00:03:02.162 --> 00:03:04.114
little things further away and

NOTE Confidence: 0.817989136666667

00:03:04.114 --> 00:03:06.394
other tricks like that which I'll

NOTE Confidence: 0.937941352

00:03:06.400 --> 00:03:09.328
talk about a bit later and then move into

NOTE Confidence: 0.937941352

00:03:09.328 --> 00:03:11.976
3D when you're happy. It was too deep.

NOTE Confidence: 0.937941352

00:03:11.976 --> 00:03:15.426
Most games if you look at them a lot of the

NOTE Confidence: 0.937941352

00:03:15.426 --> 00:03:18.060
big selling games on the marketplace R2D,

NOTE Confidence: 0.937941352

00:03:18.060 --> 00:03:20.940
they might look a bit 3D,

NOTE Confidence: 0.937941352

00:03:20.940 --> 00:03:22.458
but most of them are flat.

NOTE Confidence: 0.937941352

00:03:22.460 --> 00:03:24.236
There are one or two exceptions to that,

NOTE Confidence: 0.937941352

00:03:24.240 --> 00:03:26.277
but the really big seller Angry Birds,

NOTE Confidence: 0.937941352

00:03:26.280 --> 00:03:28.728
which is coming to the phone in May.

NOTE Confidence: 0.937941352

00:03:28.730 --> 00:03:30.804
As far as I can remember, that's a 2D game.

NOTE Confidence: 0.937941352

00:03:30.804 --> 00:03:31.984
That's one of the most

NOTE Confidence: 0.937941352

00:03:31.984 --> 00:03:33.307
popular games that we've got.

NOTE Confidence: 0.937941352

00:03:33.310 --> 00:03:34.998
We're going to show you is basically how

NOTE Confidence: 0.937941352

00:03:34.998 --> 00:03:36.569
you could make your own Angry Birds.

NOTE Confidence: 0.937941352

00:03:36.570 --> 00:03:38.130
That's a little bit later on,

NOTE Confidence: 0.937941352

00:03:38.130 --> 00:03:40.090
so we'll keep on going forward as far

NOTE Confidence: 0.937941352

00:03:40.090 --> 00:03:41.884
as you're concerned as well, though.

NOTE Confidence: 0.937941352

00:03:41.884 --> 00:03:42.492
Another big.

NOTE Confidence: 0.937941352

00:03:42.492 --> 00:03:44.620
The Big win is that once you've

NOTE Confidence: 0.937941352

00:03:44.681 --> 00:03:45.909
written the XNA game,

NOTE Confidence: 0.937941352

00:03:45.910 --> 00:03:48.360
you can deploy it on the phone.

NOTE Confidence: 0.937941352

00:03:48.360 --> 00:03:51.078
An Xbox 360 or a PC.

NOTE Confidence: 0.937941352

00:03:51.080 --> 00:03:52.760
You can use the same engine,

NOTE Confidence: 0.937941352

00:03:52.760 --> 00:03:53.888
the same behaviors,

NOTE Confidence: 0.937941352

00:03:53.888 --> 00:03:56.144
and maybe just tweak the assets

NOTE Confidence: 0.937941352

00:03:56.144 --> 00:03:58.018
a bit to rescale them,

NOTE Confidence: 0.937941352

00:03:58.020 --> 00:04:00.618
but you can deploy all this.

NOTE Confidence: 0.937941352

00:04:00.620 --> 00:04:03.220
On any of those platforms,

NOTE Confidence: 0.937941352

00:04:03.220 --> 00:04:04.212
and that's really nice.

NOTE Confidence: 0.937941352

00:04:04.212 --> 00:04:06.000
You can have a single solution which

NOTE Confidence: 0.937941352

00:04:06.000 --> 00:04:07.494
contains a project for the Xbox,

NOTE Confidence: 0.937941352

00:04:07.500 --> 00:04:08.560
A project for the phone,

NOTE Confidence: 0.937941352

00:04:08.560 --> 00:04:09.916
and a project for the PC,

NOTE Confidence: 0.937941352

00:04:09.920 --> 00:04:12.368
and you can cross deploy so you can

NOTE Confidence: 0.937941352

00:04:12.368 --> 00:04:14.399
put applications out in the Windows

NOTE Confidence: 0.937941352

00:04:14.399 --> 00:04:16.099
Phone marketplace and through the

NOTE Confidence: 0.937941352

00:04:16.100 --> 00:04:19.180
Xbox's Creators Club indie games.

NOTE Confidence: 0.937941352

00:04:19.180 --> 00:04:20.398
So there's all kinds of ways

NOTE Confidence: 0.937941352

00:04:20.398 --> 00:04:22.079
you can make a name for yourself

NOTE Confidence: 0.937941352

00:04:22.079 --> 00:04:23.439
and the bottom bullet point.

NOTE Confidence: 0.937941352

00:04:23.440 --> 00:04:24.780
The last one on here.

NOTE Confidence: 0.937941352

00:04:24.780 --> 00:04:27.330
Oh, that's me, good God.

NOTE Confidence: 0.937941352

00:04:27.330 --> 00:04:29.380
How do my chin go?

NOTE Confidence: 0.937941352

00:04:29.380 --> 00:04:30.364
Moving on,

NOTE Confidence: 0.937941352

00:04:30.364 --> 00:04:34.300
it has a very well factored object model.

NOTE Confidence: 0.937941352

00:04:34.300 --> 00:04:35.940
Which means that it's extremely

NOTE Confidence: 0.937941352

00:04:35.940 --> 00:04:37.580
easy to understand if you've

NOTE Confidence: 0.937941352

00:04:37.642 --> 00:04:39.210
had a go with things like direct

NOTE Confidence: 0.937941352

00:04:39.210 --> 00:04:40.928
X in the past or direct 3D,

NOTE Confidence: 0.937941352

00:04:40.930 --> 00:04:42.670
they're fairly horrid to to use,

NOTE Confidence: 0.937941352

00:04:42.670 --> 00:04:44.400
whereas the way that XNA

NOTE Confidence: 0.937941352

00:04:44.400 --> 00:04:45.784
works is rather nice.

NOTE Confidence: 0.937941352

00:04:45.790 --> 00:04:47.566
I teach programming at the University

NOTE Confidence: 0.937941352

00:04:47.566 --> 00:04:49.950
of Hull to our first year students,

NOTE Confidence: 0.937941352

00:04:49.950 --> 00:04:52.750
and I use XNA as an example of

NOTE Confidence: 0.937941352

00:04:52.750 --> 00:04:55.629
a well factored object model.

NOTE Confidence: 0.937941352

00:04:55.630 --> 00:04:57.412
A good way to deploy resources

NOTE Confidence: 0.937941352

00:04:57.412 --> 00:04:59.590
so it's a very nice framework

NOTE Confidence: 0.937941352

00:04:59.590 --> 00:05:00.850
in terms of how game works.

NOTE Confidence: 0.937941352

00:05:00.850 --> 00:05:02.454
If you've ever wondered.

NOTE Confidence: 0.937941352

00:05:02.454 --> 00:05:04.860
A game effectively there's three things.

NOTE Confidence: 0.937941352

00:05:04.860 --> 00:05:07.220
The first thing that gets you loading screen,

NOTE Confidence: 0.937941352

00:05:07.220 --> 00:05:10.195
which is basically I'm fetching my textures.

NOTE Confidence: 0.937941352

00:05:10.200 --> 00:05:11.628
I'm fetching my models,

NOTE Confidence: 0.937941352

00:05:11.628 --> 00:05:13.056
I'm fetching my scripts.

NOTE Confidence: 0.937941352

00:05:13.060 --> 00:05:14.278
That's when you have the the

NOTE Confidence: 0.937941352

00:05:14.278 --> 00:05:15.365
progress bar got the screen

NOTE Confidence: 0.937941352

00:05:15.365 --> 00:05:16.715
and then once you've done that,

NOTE Confidence: 0.937941352

00:05:16.720 --> 00:05:18.673
the game then runs as fast as it can,

NOTE Confidence: 0.937941352

00:05:18.680 --> 00:05:19.955
doing two things.

NOTE Confidence: 0.937941352

00:05:19.955 --> 00:05:22.080
It updates the game world,

NOTE Confidence: 0.937941352

00:05:22.080 --> 00:05:23.700
it moves all the objects,

NOTE Confidence: 0.937941352

00:05:23.700 --> 00:05:25.898
makes the car go faster or slower,

NOTE Confidence: 0.937941352

00:05:25.900 --> 00:05:28.540
checks for collisions, fires,

NOTE Confidence: 0.937941352

00:05:28.540 --> 00:05:30.860
bullets, whatever your game is doing,

NOTE Confidence: 0.937941352

00:05:30.860 --> 00:05:31.766
and the second thing it does

NOTE Confidence: 0.937941352

00:05:31.766 --> 00:05:32.550
as fast as it can.

NOTE Confidence: 0.937941352

00:05:32.550 --> 00:05:34.668
Is it draws things so effectively

NOTE Confidence: 0.937941352

00:05:34.668 --> 00:05:36.772
it's taking this game world and

NOTE Confidence: 0.937941352

00:05:36.772 --> 00:05:38.650
putting it up on the display,

NOTE Confidence: 0.937941352

00:05:38.650 --> 00:05:40.828
and so once the contents loaded

NOTE Confidence: 0.937941352

00:05:40.828 --> 00:05:43.010
the game just runs flat out,

NOTE Confidence: 0.937941352

00:05:43.010 --> 00:05:44.498
updating the game universe

NOTE Confidence: 0.937941352

00:05:44.498 --> 00:05:46.730
and drawing a picture for the

NOTE Confidence: 0.919542376923077

00:05:46.799 --> 00:05:49.186
player to see. And that's how pretty

NOTE Confidence: 0.919542376923077

00:05:49.186 --> 00:05:52.089
much every game has been made to go OK.

NOTE Confidence: 0.919542376923077

00:05:52.090 --> 00:05:54.450
And so as far as we're concerned, it's easy.

NOTE Confidence: 0.919542376923077

00:05:54.450 --> 00:05:57.320
Because when you make a brand new

NOTE Confidence: 0.919542376923077

00:05:57.320 --> 00:05:59.706
XNA project, another project type,

NOTE Confidence: 0.919542376923077

00:05:59.706 --> 00:06:02.520
you can make a Windows Phone Silverlight

NOTE Confidence: 0.919542376923077

00:06:02.585 --> 00:06:04.916
program or a Windows Phone XNA game.

NOTE Confidence: 0.919542376923077

00:06:04.920 --> 00:06:06.852
Then you just get a bunch

NOTE Confidence: 0.919542376923077

00:06:06.852 --> 00:06:08.430
of messages to fill in.

NOTE Confidence: 0.919542376923077

00:06:08.430 --> 00:06:09.890
And the methods are called

NOTE Confidence: 0.919542376923077

00:06:09.890 --> 00:06:11.350
initialized to set things up,

NOTE Confidence: 0.919542376923077

00:06:11.350 --> 00:06:14.535
load content to do the loading update,

NOTE Confidence: 0.919542376923077

00:06:14.535 --> 00:06:17.295
which is your game world being updated and

NOTE Confidence: 0.919542376923077

00:06:17.295 --> 00:06:19.969
draw which is your game well being drawn.

NOTE Confidence: 0.919542376923077

00:06:19.970 --> 00:06:21.194
And that's it.

NOTE Confidence: 0.919542376923077

00:06:21.194 --> 00:06:24.810
So the name of the game haha almost funny,

NOTE Confidence: 0.919542376923077

00:06:24.810 --> 00:06:26.221
but not quite now.

NOTE Confidence: 0.919542376923077

00:06:26.221 --> 00:06:28.330
I'll save the jokes for later is

NOTE Confidence: 0.919542376923077

00:06:28.330 --> 00:06:31.210
to basically fill those methods in.

NOTE Confidence: 0.919542376923077

00:06:31.210 --> 00:06:32.750
So you start off with empty ones

NOTE Confidence: 0.919542376923077

00:06:32.750 --> 00:06:34.708
that draw a little blank blue screen,

NOTE Confidence: 0.919542376923077

00:06:34.710 --> 00:06:36.382
and then what you do is you go

NOTE Confidence: 0.919542376923077

00:06:36.382 --> 00:06:37.905
ahead and you fill the methods in

NOTE Confidence: 0.919542376923077

00:06:37.905 --> 00:06:39.849
and so as far as we're concerned,

NOTE Confidence: 0.919542376923077

00:06:39.850 --> 00:06:41.810
that's what we're gonna do.

NOTE Confidence: 0.919542376923077

00:06:41.810 --> 00:06:44.306
Quite a few of my games involve cheese.

NOTE Confidence: 0.919542376923077

00:06:44.310 --> 00:06:46.980
For somebody told me once that

NOTE Confidence: 0.919542376923077

00:06:46.980 --> 00:06:49.390
all great programmers love cheese.

NOTE Confidence: 0.919542376923077

00:06:49.390 --> 00:06:52.630
Now I'm not sure this is completely true.

NOTE Confidence: 0.919542376923077

00:06:52.630 --> 00:06:54.002
If there's people in the road that

NOTE Confidence: 0.919542376923077

00:06:54.002 --> 00:06:55.557
write code and they don't like cheese,

NOTE Confidence: 0.919542376923077

00:06:55.560 --> 00:06:56.260
that's fine.

NOTE Confidence: 0.919542376923077

00:06:56.260 --> 00:06:58.010
You're probably very good programmers.

NOTE Confidence: 0.919542376923077

00:06:58.010 --> 00:06:59.514
I'll let you off,

NOTE Confidence: 0.919542376923077

00:06:59.514 --> 00:07:01.390
but that kind of stuck with me.

NOTE Confidence: 0.919542376923077

00:07:01.390 --> 00:07:03.130
And so I actually write games

NOTE Confidence: 0.919542376923077

00:07:03.130 --> 00:07:03.710
involving cheese,

NOTE Confidence: 0.919542376923077

00:07:03.710 --> 00:07:05.964
and this is a cheese rolling game.

NOTE Confidence: 0.919542376923077

00:07:05.970 --> 00:07:06.214
OK,

NOTE Confidence: 0.919542376923077

00:07:06.214 --> 00:07:08.166
and so it's gonna be doing here is

NOTE Confidence: 0.919542376923077

00:07:08.166 --> 00:07:09.757
we're gonna be actually rolling

NOTE Confidence: 0.919542376923077

00:07:09.757 --> 00:07:11.689
bits of cheese around the screen

NOTE Confidence: 0.919542376923077

00:07:11.745 --> 00:07:13.297
for some unspecified reason,

NOTE Confidence: 0.919542376923077

00:07:13.300 --> 00:07:14.220
which will come to it.

NOTE Confidence: 0.919542376923077

00:07:14.220 --> 00:07:15.849
I mean, one of the ways you write games.

NOTE Confidence: 0.919542376923077

00:07:15.850 --> 00:07:17.558
One of the ways I write games

NOTE Confidence: 0.919542376923077

00:07:17.558 --> 00:07:18.990
is I play with code.

NOTE Confidence: 0.919542376923077

00:07:18.990 --> 00:07:22.190
I figure out what I can make the program do,

NOTE Confidence: 0.919542376923077

00:07:22.190 --> 00:07:23.450
and then I start thinking OK.

NOTE Confidence: 0.919542376923077

00:07:23.450 --> 00:07:25.306
How can we use that in the game

NOTE Confidence: 0.919542376923077

00:07:25.306 --> 00:07:27.510
kind of framework and cheese roller?

NOTE Confidence: 0.919542376923077

00:07:27.510 --> 00:07:28.938
First thing we do is get some

NOTE Confidence: 0.919542376923077

00:07:28.938 --> 00:07:30.030
cheese rolling around the screen.

NOTE Confidence: 0.919542376923077

00:07:30.030 --> 00:07:30.950
And once we've done that,

NOTE Confidence: 0.919542376923077

00:07:30.950 --> 00:07:31.826
we'll think OK.

NOTE Confidence: 0.919542376923077

00:07:31.826 --> 00:07:33.870
What direction can we take this so

NOTE Confidence: 0.919542376923077

00:07:33.930 --> 00:07:35.794
that I I spend about a few days,

NOTE Confidence: 0.919542376923077

00:07:35.800 --> 00:07:37.648
few happy evenings playing with code?

NOTE Confidence: 0.919542376923077

00:07:37.650 --> 00:07:40.809
I figure out what my game is really about,

NOTE Confidence: 0.919542376923077

00:07:40.810 --> 00:07:42.110
and I write that down.

NOTE Confidence: 0.919542376923077

00:07:42.110 --> 00:07:44.078
And then I basically stick with

NOTE Confidence: 0.919542376923077

00:07:44.078 --> 00:07:45.849
that and add things to it.

NOTE Confidence: 0.919542376923077

00:07:45.850 --> 00:07:48.650
And that's how great games are made.

NOTE Confidence: 0.919542376923077

00:07:48.650 --> 00:07:50.897
I haven't made any great games like

NOTE Confidence: 0.919542376923077

00:07:50.897 --> 00:07:52.669
games that I quite like.

NOTE Confidence: 0.919542376923077

00:07:52.670 --> 00:07:54.092
The worst thing about making games

NOTE Confidence: 0.919542376923077

00:07:54.092 --> 00:07:55.852
actually is that you make a game and

NOTE Confidence: 0.919542376923077

00:07:55.852 --> 00:07:58.188
then all your friends beat you at it.

NOTE Confidence: 0.919542376923077

00:07:58.190 --> 00:07:59.390
So you've written the game,

NOTE Confidence: 0.919542376923077

00:07:59.390 --> 00:08:01.483
you know how it works and they're

NOTE Confidence: 0.919542376923077

00:08:01.483 --> 00:08:03.208
playing it better than you can.

NOTE Confidence: 0.919542376923077

00:08:03.210 --> 00:08:04.035
I hate that,

NOTE Confidence: 0.919542376923077

00:08:04.035 --> 00:08:05.960
so I have trap doors and things

NOTE Confidence: 0.919542376923077

00:08:06.029 --> 00:08:08.333
in mind so I can cheat and get

NOTE Confidence: 0.919542376923077

00:08:08.333 --> 00:08:09.600
extra thousands of points.

NOTE Confidence: 0.919542376923077

00:08:09.600 --> 00:08:10.491
But I digress.

NOTE Confidence: 0.919542376923077

00:08:10.491 --> 00:08:10.788
OK,

NOTE Confidence: 0.919542376923077

00:08:10.788 --> 00:08:12.910
so we're gonna make some cheese move

NOTE Confidence: 0.919542376923077

00:08:12.910 --> 00:08:15.094
and what I'll do is I'll take you

NOTE Confidence: 0.919542376923077

00:08:15.094 --> 00:08:17.515
through an XNA project that does just this,

NOTE Confidence: 0.919542376923077

00:08:17.520 --> 00:08:18.918
and I'm going to sit down

NOTE Confidence: 0.919542376923077

00:08:18.918 --> 00:08:19.850
for this because at

NOTE Confidence: 0.879180561904762

00:08:19.909 --> 00:08:21.393
my age you have to sit down

NOTE Confidence: 0.879180561904762

00:08:21.393 --> 00:08:22.684
every now and then, right?

NOTE Confidence: 0.879180561904762

00:08:22.684 --> 00:08:24.354
OK, let's just drop across

NOTE Confidence: 0.879180561904762

00:08:24.354 --> 00:08:26.779
to one of my many projects.

NOTE Confidence: 0.879180561904762

00:08:26.780 --> 00:08:30.006
Let's see what this one says. OK, so.

NOTE Confidence: 0.879180561904762

00:08:30.006 --> 00:08:33.990
This is basically my cheese and

NOTE Confidence: 0.879180561904762

00:08:33.990 --> 00:08:36.640
it's actually the wrong project,

NOTE Confidence: 0.879180561904762

00:08:36.640 --> 00:08:38.550
so we'll go and find the right one, OK?

NOTE Confidence: 0.864898834285714

00:08:40.620 --> 00:08:43.420
Right, so this one looks good now.

NOTE Confidence: 0.864898834285714

00:08:43.420 --> 00:08:45.700
If you heard about games,

NOTE Confidence: 0.864898834285714

00:08:45.700 --> 00:08:46.618
oh quick question,

NOTE Confidence: 0.864898834285714

00:08:46.618 --> 00:08:48.454
can everyone see the screen OK?

NOTE Confidence: 0.864898834285714

00:08:48.460 --> 00:08:49.039
Is that alright?

NOTE Confidence: 0.864898834285714

00:08:49.039 --> 00:08:50.197
Can you see the words alright?

NOTE Confidence: 0.864898834285714

00:08:50.200 --> 00:08:51.856
Oh gosh you can see me again don't like

NOTE Confidence: 0.864898834285714

00:08:51.856 --> 00:08:53.418
that OK make it a bit bigger why not?

NOTE Confidence: 0.864898834285714

00:08:53.420 --> 00:08:55.976
So I'll just grow the text a bit right?

NOTE Confidence: 0.864898834285714

00:08:55.980 --> 00:08:58.710
So if you're talking about games,

NOTE Confidence: 0.864898834285714

00:08:58.710 --> 00:09:00.890
we're talking about sprites.

NOTE Confidence: 0.864898834285714

00:09:00.890 --> 00:09:03.433
On a Sprite in 2D games,

NOTE Confidence: 0.864898834285714

00:09:03.433 --> 00:09:05.956
it's basically a thing you put on the

NOTE Confidence: 0.864898834285714

00:09:05.956 --> 00:09:08.748
screen which displays some part of the game,

NOTE Confidence: 0.864898834285714

00:09:08.750 --> 00:09:11.466
and in programming terms it's two things.

NOTE Confidence: 0.864898834285714

00:09:11.470 --> 00:09:12.376
It's a texture,

NOTE Confidence: 0.864898834285714

00:09:12.376 --> 00:09:14.490
which is the actual design of the

NOTE Confidence: 0.864898834285714

00:09:14.551 --> 00:09:16.707
Sprite and a position which is where

NOTE Confidence: 0.864898834285714

00:09:16.707 --> 00:09:19.050
the Sprite is presently being drawn.

NOTE Confidence: 0.864898834285714

00:09:19.050 --> 00:09:21.434
OK now XNA has types built in for

NOTE Confidence: 0.864898834285714

00:09:21.434 --> 00:09:23.848
both these things and So what I have

NOTE Confidence: 0.864898834285714

00:09:23.848 --> 00:09:26.495
here is a texture which is my cheese

NOTE Confidence: 0.864898834285714

00:09:26.495 --> 00:09:29.316
texture and a rectangle which is got

NOTE Confidence: 0.864898834285714

00:09:29.320 --> 00:09:31.408
X&amp;amp;Y position and a width and a height.

NOTE Confidence: 0.864898834285714

00:09:31.410 --> 00:09:33.034
Which will show me where the cheese

NOTE Confidence: 0.864898834285714

00:09:33.034 --> 00:09:35.524
is going to be drawn and when I build

NOTE Confidence: 0.864898834285714

00:09:35.524 --> 00:09:38.578
my empty game I get a blank load

NOTE Confidence: 0.864898834285714

00:09:38.578 --> 00:09:41.760
content method and all I've done is

NOTE Confidence: 0.864898834285714

00:09:41.760 --> 00:09:43.740
actually one of my favorite jokes.

NOTE Confidence: 0.864898834285714

00:09:43.740 --> 00:09:45.950
What cheese is made backwards?

NOTE Confidence: 0.53090334

00:09:48.770 --> 00:09:53.850
Edam. So on this screen, right?

NOTE Confidence: 0.53090334

00:09:53.850 --> 00:09:56.163
OK, I think I'm wasted on you a lot.

NOTE Confidence: 0.53090334

00:09:56.170 --> 00:09:59.038
OK, but back to the I quite like that

NOTE Confidence: 0.53090334

00:09:59.038 --> 00:10:00.819
what cheese you can use that one in

NOTE Confidence: 0.53090334

00:10:00.819 --> 00:10:02.403
the pub tonight but it won't get a

NOTE Confidence: 0.53090334

00:10:02.454 --> 00:10:04.050
laugh 'cause it hasn't done here.

NOTE Confidence: 0.53090334

00:10:04.050 --> 00:10:07.150
OK so I go off and find a texture file

NOTE Confidence: 0.53090334

00:10:07.234 --> 00:10:10.006
which I've placed into my content.

NOTE Confidence: 0.53090334

00:10:10.010 --> 00:10:11.571
There it is Edam dot PNG which

NOTE Confidence: 0.53090334

00:10:11.571 --> 00:10:13.230
is just as you can see here.

NOTE Confidence: 0.53090334

00:10:13.230 --> 00:10:16.744
It's effectively a drew it in Photoshop.

NOTE Confidence: 0.53090334

00:10:16.750 --> 00:10:19.235
It's basically a round object with a

NOTE Confidence: 0.53090334

00:10:19.235 --> 00:10:20.860
highlight. That's my piece of cheese.

NOTE Confidence: 0.53090334

00:10:20.860 --> 00:10:22.268
That's my PNG file.

NOTE Confidence: 0.53090334

00:10:22.268 --> 00:10:24.380
Getting objects into an XNA project

NOTE Confidence: 0.53090334

00:10:24.453 --> 00:10:26.303
is simply matter of dragging

NOTE Confidence: 0.53090334

00:10:26.303 --> 00:10:27.783
them and dropping them.

NOTE Confidence: 0.53090334

00:10:27.790 --> 00:10:29.568
And once I've dragged and dropped it,

NOTE Confidence: 0.53090334

00:10:29.570 --> 00:10:30.800
I've then got an asset

NOTE Confidence: 0.53090334

00:10:30.800 --> 00:10:31.784
with that particular name.

NOTE Confidence: 0.53090334

00:10:31.790 --> 00:10:34.170
I can bring in as a texture in this case,

NOTE Confidence: 0.53090334

00:10:34.170 --> 00:10:36.226
and it's called Edam and there it is.

NOTE Confidence: 0.53090334

00:10:36.230 --> 00:10:37.466
So once I've got my texture,

NOTE Confidence: 0.53090334

00:10:37.470 --> 00:10:39.238
that's my game assets.

NOTE Confidence: 0.53090334

00:10:39.238 --> 00:10:40.564
Good to go.

NOTE Confidence: 0.53090334

00:10:40.570 --> 00:10:42.106
If I had lots of textures,

NOTE Confidence: 0.53090334

00:10:42.110 --> 00:10:44.030
I'd bring them all in and store them

NOTE Confidence: 0.53090334

00:10:44.030 --> 00:10:45.450
in different texture variables.

NOTE Confidence: 0.53090334

00:10:45.450 --> 00:10:48.482
If I have sound samples to play

NOTE Confidence: 0.53090334

00:10:48.482 --> 00:10:50.528
when things happen in the game,

NOTE Confidence: 0.53090334

00:10:50.530 --> 00:10:51.790
will see that a bit later.

NOTE Confidence: 0.53090334

00:10:51.790 --> 00:10:53.932
Then I'll bring those in as assets as well.

NOTE Confidence: 0.53090334

00:10:53.940 --> 00:10:55.960
If I've got 3D models,

NOTE Confidence: 0.53090334

00:10:55.960 --> 00:10:57.500
spaceships and rockets or

NOTE Confidence: 0.53090334

00:10:57.500 --> 00:10:58.655
whatever I've designed,

NOTE Confidence: 0.53090334

00:10:58.660 --> 00:11:00.284
then I can bring those in and

NOTE Confidence: 0.53090334

00:11:00.284 --> 00:11:02.119
store them as content in the game.

NOTE Confidence: 0.53090334

00:11:02.120 --> 00:11:03.212
This game very simple,

NOTE Confidence: 0.53090334

00:11:03.212 --> 00:11:05.152
just got a single piece of cheese

NOTE Confidence: 0.53090334

00:11:05.152 --> 00:11:07.312
and all I do with my piece of cheese

NOTE Confidence: 0.53090334

00:11:07.370 --> 00:11:09.444
is down here in the draw method.

NOTE Confidence: 0.53090334

00:11:09.444 --> 00:11:13.776
I draw it and so effectively I have a now.

NOTE Confidence: 0.53090334

00:11:13.780 --> 00:11:16.396
A little bit of graphics hardware

NOTE Confidence: 0.53090334

00:11:16.396 --> 00:11:19.192
background for you. The way that.

NOTE Confidence: 0.53090334

00:11:19.192 --> 00:11:21.662
The Windows Phone works the

NOTE Confidence: 0.53090334

00:11:21.662 --> 00:11:23.920
way that games work is.

NOTE Confidence: 0.53090334

00:11:23.920 --> 00:11:25.000
We have a piece of hardware.

NOTE Confidence: 0.53090334

00:11:25.000 --> 00:11:26.602
The GPU that does the graphics

NOTE Confidence: 0.53090334

00:11:26.602 --> 00:11:28.270
and a piece of hardware,

NOTE Confidence: 0.53090334

00:11:28.270 --> 00:11:29.010
the CPU,

NOTE Confidence: 0.53090334

00:11:29.010 --> 00:11:30.860
the processor that effectively drives

NOTE Confidence: 0.53090334

00:11:30.860 --> 00:11:33.213
the game world and the two things

NOTE Confidence: 0.53090334

00:11:33.213 --> 00:11:35.544
are kind of separate and the idea is

NOTE Confidence: 0.53090334

00:11:35.544 --> 00:11:37.760
that the CPU the processor in the,

NOTE Confidence: 0.53090334

00:11:37.760 --> 00:11:41.108
in the PC or the phone takes packages of

NOTE Confidence: 0.53090334

00:11:41.108 --> 00:11:43.759
commands and pushes them into the GPU,

NOTE Confidence: 0.53090334

00:11:43.760 --> 00:11:45.320
which then renders them for you.

NOTE Confidence: 0.53090334

00:11:45.320 --> 00:11:47.688
That means that we can run programs at

NOTE Confidence: 0.53090334

00:11:47.688 --> 00:11:50.494
the same time as our screen is being drawn.

NOTE Confidence: 0.53090334

00:11:50.500 --> 00:11:53.128
It works best if you batch up a whole

NOTE Confidence: 0.53090334

00:11:53.128 --> 00:11:55.738
bunch of commands before you send them,

NOTE Confidence: 0.53090334

00:11:55.740 --> 00:11:57.978
so you send one big transaction

NOTE Confidence: 0.53090334

00:11:57.978 --> 00:11:59.880
and that's what happens here.

NOTE Confidence: 0.53090334

00:11:59.880 --> 00:12:00.232
Effectively,

NOTE Confidence: 0.53090334

00:12:00.232 --> 00:12:02.696
my Sprite batch begin marks the beginning

NOTE Confidence: 0.53090334

00:12:02.696 --> 00:12:05.676
of a sequence of draw operations and mice.

NOTE Confidence: 0.53090334

00:12:05.680 --> 00:12:08.515
My Sprite batch end is when it says OK,

NOTE Confidence: 0.53090334

00:12:08.520 --> 00:12:10.000
I've got everything ready

NOTE Confidence: 0.53090334

00:12:10.000 --> 00:12:11.756
now just render it OK.

NOTE Confidence: 0.53090334

00:12:11.756 --> 00:12:14.240
So at the moment I'm just drawing one thing,

NOTE Confidence: 0.53090334

00:12:14.240 --> 00:12:18.104
which is my texture and I'm drawing it.

NOTE Confidence: 0.53090334

00:12:18.110 --> 00:12:20.210
From a texture called cheese texture at

NOTE Confidence: 0.53090334

00:12:20.210 --> 00:12:22.268
a position called cheese drop position,

NOTE Confidence: 0.53090334

00:12:22.270 --> 00:12:24.286
and I'm shining a white light on it

NOTE Confidence: 0.53090334

00:12:24.286 --> 00:12:26.210
so that I'm basically drawing that

NOTE Confidence: 0.53090334

00:12:26.210 --> 00:12:28.250
the thing in its natural color.

NOTE Confidence: 0.53090334

00:12:28.250 --> 00:12:29.692
Now you can have fun with this

NOTE Confidence: 0.53090334

00:12:29.692 --> 00:12:31.039
because you can change the color

NOTE Confidence: 0.53090334

00:12:31.039 --> 00:12:32.635
of things by changing the color of

NOTE Confidence: 0.952925540833333

00:12:32.684 --> 00:12:33.488
the light on them.

NOTE Confidence: 0.952925540833333

00:12:33.490 --> 00:12:36.120
So if things want to heat up or become cold,

NOTE Confidence: 0.952925540833333

00:12:36.120 --> 00:12:37.660
you can change the light to red

NOTE Confidence: 0.952925540833333

00:12:37.660 --> 00:12:39.546
or blue or anywhere in between and

NOTE Confidence: 0.952925540833333

00:12:39.546 --> 00:12:41.304
make them change in their shape,

NOTE Confidence: 0.952925540833333

00:12:41.310 --> 00:12:42.358
which is quite interesting,

NOTE Confidence: 0.952925540833333

00:12:42.358 --> 00:12:44.170
but that then just does the job.

NOTE Confidence: 0.952925540833333

00:12:44.170 --> 00:12:46.368
So if I now run the program,

NOTE Confidence: 0.952925540833333

00:12:46.370 --> 00:12:48.140
what's going to happen is

NOTE Confidence: 0.952925540833333

00:12:48.140 --> 00:12:49.910
the studio will compile it.

NOTE Confidence: 0.952925540833333

00:12:49.910 --> 00:12:51.688
And then it'll push it down to

NOTE Confidence: 0.952925540833333

00:12:51.688 --> 00:12:52.990
the Windows Phone emulator,

NOTE Confidence: 0.952925540833333

00:12:52.990 --> 00:12:55.030
which is sitting down here

NOTE Confidence: 0.952925540833333

00:12:55.030 --> 00:12:57.070
on my desktop just here.

NOTE Confidence: 0.952925540833333

00:12:57.070 --> 00:13:00.087
And I see my piece of red

NOTE Confidence: 0.952925540833333

00:13:00.087 --> 00:13:02.929
cheese in the wrong corner.

NOTE Confidence: 0.952925540833333

00:13:02.930 --> 00:13:05.036
OK, now the reason it's in the wrong corner

NOTE Confidence: 0.952925540833333

00:13:05.036 --> 00:13:08.170
is not because I am incompetent, there's.

NOTE Confidence: 0.952925540833333

00:13:08.170 --> 00:13:11.548
Heaven forbid it's because by default,

NOTE Confidence: 0.952925540833333

00:13:11.550 --> 00:13:14.749
XNA games decide to start up with

NOTE Confidence: 0.952925540833333

00:13:14.749 --> 00:13:17.950
the phone held in landscape mode,

NOTE Confidence: 0.952925540833333

00:13:17.950 --> 00:13:18.798
so there you go.

NOTE Confidence: 0.952925540833333

00:13:18.798 --> 00:13:20.070
That makes a lot more sense.

NOTE Confidence: 0.952925540833333

00:13:20.070 --> 00:13:21.738
Now I've got my.

NOTE Confidence: 0.952925540833333

00:13:21.738 --> 00:13:23.823
Rectangles placing my cheese at

NOTE Confidence: 0.952925540833333

00:13:23.823 --> 00:13:26.236
the top left hand corner 00,

NOTE Confidence: 0.952925540833333

00:13:26.236 --> 00:13:28.684
and so there's my cheese being drawn now.

NOTE Confidence: 0.952925540833333

00:13:28.690 --> 00:13:30.706
I don't think it's worth a round of applause,

NOTE Confidence: 0.952925540833333

00:13:30.710 --> 00:13:32.168
and you don't seem to either,

NOTE Confidence: 0.952925540833333

00:13:32.170 --> 00:13:33.988
so that's absolutely fine by me.

NOTE Confidence: 0.952925540833333

00:13:33.990 --> 00:13:35.550
I'll just I think you've used up all

NOTE Confidence: 0.952925540833333

00:13:35.550 --> 00:13:36.730
your clapping right at the start,

NOTE Confidence: 0.952925540833333

00:13:36.730 --> 00:13:37.894
which is fair enough,

NOTE Confidence: 0.952925540833333

00:13:37.894 --> 00:13:40.010
but you've seen some cheese being drawn,

NOTE Confidence: 0.952925540833333

00:13:40.010 --> 00:13:41.408
and what I have now is,

NOTE Confidence: 0.952925540833333

00:13:41.410 --> 00:13:43.108
yeah, a little bit of window.

NOTE Confidence: 0.952925540833333

00:13:43.110 --> 00:13:45.526
If you've written next to the games before.

NOTE Confidence: 0.952925540833333

00:13:45.530 --> 00:13:47.896
There are some things it's worth knowing

NOTE Confidence: 0.952925540833333

00:13:47.896 --> 00:13:49.744
about the Windows Phone platform.

NOTE Confidence: 0.952925540833333

00:13:49.744 --> 00:13:50.218
OK,

NOTE Confidence: 0.952925540833333

00:13:50.218 --> 00:13:54.010
by default we wake up in landscape mode,

NOTE Confidence: 0.952925540833333

00:13:54.010 --> 00:13:55.403
so the player would hold the phone

NOTE Confidence: 0.952925540833333

00:13:55.403 --> 00:13:56.995
in the way that you can see it

NOTE Confidence: 0.952925540833333

00:13:56.995 --> 00:13:58.390
there and play the game that way.

NOTE Confidence: 0.952925540833333

00:13:58.390 --> 00:14:00.270
It's not the only way you can use the phone.

NOTE Confidence: 0.952925540833333

00:14:00.270 --> 00:14:01.554
You can tip it into portrait

NOTE Confidence: 0.952925540833333

00:14:01.554 --> 00:14:02.410
mode if you like,

NOTE Confidence: 0.952925540833333

00:14:02.410 --> 00:14:05.094
but the game has to know this and

NOTE Confidence: 0.952925540833333

00:14:05.094 --> 00:14:07.038
you can make your selections by

NOTE Confidence: 0.952925540833333

00:14:07.038 --> 00:14:08.790
adding these lines to the code.

NOTE Confidence: 0.952925540833333

00:14:08.790 --> 00:14:09.960
At one point I should make,

NOTE Confidence: 0.952925540833333

00:14:09.960 --> 00:14:11.950
which I haven't already said.

NOTE Confidence: 0.952925540833333

00:14:11.950 --> 00:14:14.602
Everything you see all the code

NOTE Confidence: 0.952925540833333

00:14:14.602 --> 00:14:16.303
will be on robmouse.com.

NOTE Confidence: 0.952925540833333

00:14:16.303 --> 00:14:18.914
Slash demos if you download and use,

NOTE Confidence: 0.952925540833333

00:14:18.920 --> 00:14:20.540
so I'm not showing you anything.

NOTE Confidence: 0.952925540833333

00:14:20.540 --> 00:14:22.238
You can't just take away and

NOTE Confidence: 0.952925540833333

00:14:22.238 --> 00:14:23.370
make use of tomorrow,

NOTE Confidence: 0.952925540833333

00:14:23.370 --> 00:14:24.374
so everything you're seeing

NOTE Confidence: 0.952925540833333

00:14:24.374 --> 00:14:25.880
or the project all the demos,

NOTE Confidence: 0.952925540833333

00:14:25.880 --> 00:14:27.600
it'll all be up there in code you

NOTE Confidence: 0.952925540833333

00:14:27.600 --> 00:14:29.504
can take away and uses the basis of

NOTE Confidence: 0.952925540833333

00:14:29.504 --> 00:14:31.218
games and play with what I've got.

NOTE Confidence: 0.952925540833333

00:14:31.220 --> 00:14:34.286
Here is the sample code that

NOTE Confidence: 0.952925540833333

00:14:34.286 --> 00:14:35.819
tells the hardware.

NOTE Confidence: 0.952925540833333

00:14:35.820 --> 00:14:36.137
Effectively,

NOTE Confidence: 0.952925540833333

00:14:36.137 --> 00:14:38.356
I want you to work in portrait,

NOTE Confidence: 0.952925540833333

00:14:38.360 --> 00:14:38.740
please,

NOTE Confidence: 0.952925540833333

00:14:38.740 --> 00:14:41.400
and I can do this scaling operation

NOTE Confidence: 0.952925540833333

00:14:41.400 --> 00:14:43.799
where I can specify the size,

NOTE Confidence: 0.952925540833333

00:14:43.800 --> 00:14:46.856
height and width of the screen and the

NOTE Confidence: 0.952925540833333

00:14:46.856 --> 00:14:49.459
final thing I'll do is I'll say OK,

NOTE Confidence: 0.952925540833333

00:14:49.460 --> 00:14:51.595
I'd like you to be full screen

NOTE Confidence: 0.952925540833333

00:14:51.595 --> 00:14:52.510
as well please.

NOTE Confidence: 0.952925540833333

00:14:52.510 --> 00:14:55.254
Because by default and XNA game reserves

NOTE Confidence: 0.952925540833333

00:14:55.254 --> 00:14:58.708
are oh at the top for system messages,

NOTE Confidence: 0.952925540833333

00:14:58.710 --> 00:15:00.656
so your screen will contain a row

NOTE Confidence: 0.952925540833333

00:15:00.656 --> 00:15:02.330
which has got information about

NOTE Confidence: 0.952925540833333

00:15:02.330 --> 00:15:04.280
battery signal intensity and some

NOTE Confidence: 0.952925540833333

00:15:04.280 --> 00:15:06.598
other bits and pieces which actually

NOTE Confidence: 0.952925540833333

00:15:06.598 --> 00:15:08.764
steals some space from your game,

NOTE Confidence: 0.952925540833333

00:15:08.770 --> 00:15:10.480
and So what you can do is you can say

NOTE Confidence: 0.907238999090909

00:15:10.531 --> 00:15:12.602
OK, please make the game full screen

NOTE Confidence: 0.907238999090909

00:15:12.602 --> 00:15:15.021
to actually get rid of all that and

NOTE Confidence: 0.907238999090909

00:15:15.021 --> 00:15:17.502
so these three lines I tend to put in

NOTE Confidence: 0.907238999090909

00:15:17.502 --> 00:15:19.115
programs and if you want to something

NOTE Confidence: 0.907238999090909

00:15:19.115 --> 00:15:20.790
else which is kind of interesting,

NOTE Confidence: 0.907238999090909

00:15:20.790 --> 00:15:21.810
you don't have to do this.

NOTE Confidence: 0.907238999090909

00:15:21.810 --> 00:15:22.800
But if you want to.

NOTE Confidence: 0.907238999090909

00:15:22.800 --> 00:15:24.627
You could have a game that flips

NOTE Confidence: 0.907238999090909

00:15:24.627 --> 00:15:25.900
between landscape and portrait.

NOTE Confidence: 0.907238999090909

00:15:25.900 --> 00:15:29.320
When the player tips the phone and do that,

NOTE Confidence: 0.907238999090909

00:15:29.320 --> 00:15:31.384
you have to bind to an event which

NOTE Confidence: 0.907238999090909

00:15:31.384 --> 00:15:33.460
is fired when the phone is tipped.

NOTE Confidence: 0.907238999090909

00:15:33.460 --> 00:15:34.748
Because your phone might.

NOTE Confidence: 0.907238999090909

00:15:34.748 --> 00:15:37.051
Your game might have to re scale

NOTE Confidence: 0.907238999090909

00:15:37.051 --> 00:15:38.905
and re adjust the positions of

NOTE Confidence: 0.907238999090909

00:15:38.905 --> 00:15:41.200
things in the game to make it work,

NOTE Confidence: 0.907238999090909

00:15:41.200 --> 00:15:43.000
and so again a little bit of code

NOTE Confidence: 0.907238999090909

00:15:43.000 --> 00:15:44.598
which you can use just to bind

NOTE Confidence: 0.907238999090909

00:15:44.598 --> 00:15:46.120
to the event is quite a nice,

NOTE Confidence: 0.907238999090909

00:15:46.120 --> 00:15:49.039
but I don't tend to do that.

NOTE Confidence: 0.907238999090909

00:15:49.040 --> 00:15:51.248
I must admit that my rule in Windows

NOTE Confidence: 0.907238999090909

00:15:51.248 --> 00:15:53.447
Phone game development is pick a size.

NOTE Confidence: 0.907238999090909

00:15:53.450 --> 00:15:56.108
Pick an orientation and stay there.

NOTE Confidence: 0.907238999090909

00:15:56.110 --> 00:15:57.706
OK, because that works best for me,

NOTE Confidence: 0.907238999090909

00:15:57.710 --> 00:15:58.690
but this is worth mentioning.

NOTE Confidence: 0.907238999090909

00:15:58.690 --> 00:16:00.682
This is another nice little trick

NOTE Confidence: 0.907238999090909

00:16:00.682 --> 00:16:02.519
which is worth mentioning as well.

NOTE Confidence: 0.907238999090909

00:16:02.520 --> 00:16:04.942
Many years ago when I was younger

NOTE Confidence: 0.907238999090909

00:16:04.942 --> 00:16:07.019
and even more good looking.

NOTE Confidence: 0.907238999090909

00:16:07.020 --> 00:16:10.765
OK, now we can handle that thought.

NOTE Confidence: 0.907238999090909

00:16:10.770 --> 00:16:12.842
I used to write games for mobile

NOTE Confidence: 0.907238999090909

00:16:12.842 --> 00:16:15.057
devices and it was a bit of a

NOTE Confidence: 0.907238999090909

00:16:15.057 --> 00:16:16.898
nightmare because you found that

NOTE Confidence: 0.907238999090909

00:16:16.898 --> 00:16:19.730
each device had its own screen size.

NOTE Confidence: 0.907238999090909

00:16:19.730 --> 00:16:21.424
Some of them were 320 by 240.

NOTE Confidence: 0.907238999090909

00:16:21.430 --> 00:16:22.530
Some of them were square,

NOTE Confidence: 0.907238999090909

00:16:22.530 --> 00:16:24.413
some of them were other way round

NOTE Confidence: 0.907238999090909

00:16:24.413 --> 00:16:27.042
and it was a bit of a pain resizing

NOTE Confidence: 0.907238999090909

00:16:27.042 --> 00:16:28.808
and scaling your assets all the

NOTE Confidence: 0.907238999090909

00:16:28.808 --> 00:16:30.118
time to make them fit.

NOTE Confidence: 0.907238999090909

00:16:30.120 --> 00:16:32.820
Windows Phone takes all that away.

NOTE Confidence: 0.907238999090909

00:16:32.820 --> 00:16:35.140
It removes that problem completely.

NOTE Confidence: 0.907238999090909

00:16:35.140 --> 00:16:37.460
I tell the system how big I want

NOTE Confidence: 0.907238999090909

00:16:37.460 --> 00:16:39.736
the screen to be in my game and

NOTE Confidence: 0.907238999090909

00:16:39.736 --> 00:16:41.160
the system sorts it out.

NOTE Confidence: 0.907238999090909

00:16:41.160 --> 00:16:43.696
I can go anywhere from 800 by 480,

NOTE Confidence: 0.907238999090909

00:16:43.700 --> 00:16:45.735
which is the maximum resolution

NOTE Confidence: 0.907238999090909

00:16:45.735 --> 00:16:48.930
down to 200 by 200 square and

NOTE Confidence: 0.907238999090909

00:16:48.930 --> 00:16:52.470
the system will just scale the.

NOTE Confidence: 0.907238999090909

00:16:52.470 --> 00:16:55.950
Image to fit the screen on the phone,

NOTE Confidence: 0.907238999090909

00:16:55.950 --> 00:16:58.450
and this is terribly useful.

NOTE Confidence: 0.907238999090909

00:16:58.450 --> 00:16:59.098
Two reasons.

NOTE Confidence: 0.907238999090909

00:16:59.098 --> 00:16:59.746
One is,

NOTE Confidence: 0.907238999090909

00:16:59.746 --> 00:17:02.095
it means that you can decide the

NOTE Confidence: 0.907238999090909

00:17:02.095 --> 00:17:03.780
resolution your game is going

NOTE Confidence: 0.907238999090909

00:17:03.780 --> 00:17:05.876
to have and never change that

NOTE Confidence: 0.907238999090909

00:17:05.876 --> 00:17:07.910
for any release of the phone,

NOTE Confidence: 0.907238999090909

00:17:07.910 --> 00:17:08.296
past,

NOTE Confidence: 0.907238999090909

00:17:08.296 --> 00:17:09.454
present or future,

NOTE Confidence: 0.907238999090909

00:17:09.454 --> 00:17:11.384
because the hardware will always

NOTE Confidence: 0.907238999090909

00:17:11.384 --> 00:17:12.710
make it look right.

NOTE Confidence: 0.907238999090909

00:17:12.710 --> 00:17:14.630
The second reason why it's a good plan

NOTE Confidence: 0.907238999090909

00:17:14.630 --> 00:17:16.798
is you can get quite a nice performance

NOTE Confidence: 0.907238999090909

00:17:16.798 --> 00:17:19.480
hike by doing this 800 by 480 is great

NOTE Confidence: 0.907238999090909

00:17:19.480 --> 00:17:21.709
for reading documents and high res work,

NOTE Confidence: 0.907238999090909

00:17:21.710 --> 00:17:22.820
but for games.

NOTE Confidence: 0.907238999090909

00:17:22.820 --> 00:17:24.670
You don't really need it.

NOTE Confidence: 0.907238999090909

00:17:24.670 --> 00:17:27.250
You can go at 1/4 that.

NOTE Confidence: 0.907238999090909

00:17:27.250 --> 00:17:29.470
200 by 2:40 right,

NOTE Confidence: 0.907238999090909

00:17:29.470 --> 00:17:32.556
804 hundred by 2:40 sorry and

NOTE Confidence: 0.907238999090909

00:17:32.556 --> 00:17:35.026
the game still looks good.

NOTE Confidence: 0.907238999090909

00:17:35.030 --> 00:17:36.220
As far as your graphics

NOTE Confidence: 0.907238999090909

00:17:36.220 --> 00:17:36.934
hardware is concerned,

NOTE Confidence: 0.907238999090909

00:17:36.940 --> 00:17:38.332
it's now using a quarter of

NOTE Confidence: 0.907238999090909

00:17:38.332 --> 00:17:39.870
the memory to draw everything,

NOTE Confidence: 0.907238999090909

00:17:39.870 --> 00:17:40.806
and So what you can do,

NOTE Confidence: 0.907238999090909

00:17:40.810 --> 00:17:42.538
you get a lovely performance suite

NOTE Confidence: 0.907238999090909

00:17:42.538 --> 00:17:44.329
by just changing the resolution down

NOTE Confidence: 0.907238999090909

00:17:44.329 --> 00:17:46.366
from the maximum to a smaller one,

NOTE Confidence: 0.907238999090909

00:17:46.370 --> 00:17:48.740
and your game will go faster.

NOTE Confidence: 0.907238999090909

00:17:48.740 --> 00:17:49.796
So you can do two things.

NOTE Confidence: 0.907238999090909

00:17:49.800 --> 00:17:51.336
You can make sure that you

NOTE Confidence: 0.907238999090909

00:17:51.336 --> 00:17:52.360
always work in the

NOTE Confidence: 0.946878003076923

00:17:52.423 --> 00:17:54.328
same size environment and you

NOTE Confidence: 0.946878003076923

00:17:54.328 --> 00:17:56.098
can twiddle with the speed.

NOTE Confidence: 0.946878003076923

00:17:56.100 --> 00:17:57.954
And so as far as the user is concerned,

NOTE Confidence: 0.946878003076923

00:17:57.960 --> 00:17:59.010
it's not noticeable.

NOTE Confidence: 0.946878003076923

00:17:59.010 --> 00:18:00.760
The scaling does it properly.

NOTE Confidence: 0.946878003076923

00:18:00.760 --> 00:18:01.504
In other words,

NOTE Confidence: 0.946878003076923

00:18:01.504 --> 00:18:02.992
it actually does aliasing and things

NOTE Confidence: 0.946878003076923

00:18:02.992 --> 00:18:04.843
to make it look good and in a fast

NOTE Confidence: 0.946878003076923

00:18:04.843 --> 00:18:06.320
moving game the players can't tell.

NOTE Confidence: 0.946878003076923

00:18:06.320 --> 00:18:08.330
Now lots of existing Windows Phone

NOTE Confidence: 0.946878003076923

00:18:08.330 --> 00:18:10.648
games do this and it works extremely

NOTE Confidence: 0.946878003076923

00:18:10.648 --> 00:18:13.452
well and I can show you this in action

NOTE Confidence: 0.946878003076923

00:18:13.452 --> 00:18:15.608
just by going back to my project.

NOTE Confidence: 0.946878003076923

00:18:15.610 --> 00:18:18.270
Which is presently running in.

NOTE Confidence: 0.946878003076923

00:18:18.270 --> 00:18:23.710
Landscape mode 800 by 480 and will just drop.

NOTE Confidence: 0.946878003076923

00:18:23.710 --> 00:18:27.534
Back into my program and we'll stop it.

NOTE Confidence: 0.946878003076923

00:18:27.540 --> 00:18:29.664
Now this program I'm deployed it

NOTE Confidence: 0.946878003076923

00:18:29.664 --> 00:18:31.363
to the emulation, which is fine.

NOTE Confidence: 0.946878003076923

00:18:31.363 --> 00:18:33.157
But if I want to I can actually

NOTE Confidence: 0.946878003076923

00:18:33.157 --> 00:18:35.213
deploy it to a real device and I

NOTE Confidence: 0.946878003076923

00:18:35.213 --> 00:18:37.237
get just the same user experience,

NOTE Confidence: 0.946878003076923

00:18:37.240 --> 00:18:38.297
more of that a little bit later.

NOTE Confidence: 0.946878003076923

00:18:38.300 --> 00:18:40.260
If I go back into my initialize method.

NOTE Confidence: 0.946878003076923

00:18:40.260 --> 00:18:42.618
Now this is called once when

NOTE Confidence: 0.946878003076923

00:18:42.618 --> 00:18:44.190
the game starts running.

NOTE Confidence: 0.946878003076923

00:18:44.190 --> 00:18:46.326
And effectively it sets things up.

NOTE Confidence: 0.946878003076923

00:18:46.330 --> 00:18:47.700
And here's the constructor where

NOTE Confidence: 0.946878003076923

00:18:47.700 --> 00:18:49.070
I've put my code actually.

NOTE Confidence: 0.946878003076923

00:18:49.070 --> 00:18:50.190
So you can put it in either place.

NOTE Confidence: 0.946878003076923

00:18:50.190 --> 00:18:53.250
Doesn't really matter, and I'm saying.

NOTE Confidence: 0.946878003076923

00:18:53.250 --> 00:18:54.498
Working portrait.

NOTE Confidence: 0.946878003076923

00:18:54.498 --> 00:18:59.530
And make yourself 200 by 200 please and go

NOTE Confidence: 0.946878003076923

00:18:59.530 --> 00:19:02.170
full screen so don't give me the progress.

NOTE Confidence: 0.946878003076923

00:19:02.170 --> 00:19:03.514
The little status bar.

NOTE Confidence: 0.946878003076923

00:19:03.514 --> 00:19:06.868
If I run this up now in the emulator.

NOTE Confidence: 0.946878003076923

00:19:06.870 --> 00:19:08.278
Then go back here.

NOTE Confidence: 0.946878003076923

00:19:08.278 --> 00:19:11.497
Now my screen is now flipped so the top

NOTE Confidence: 0.946878003076923

00:19:11.497 --> 00:19:13.905
left hand corner is top left there.

NOTE Confidence: 0.946878003076923

00:19:13.910 --> 00:19:15.710
Oops, wrong way, Robert.

NOTE Confidence: 0.946878003076923

00:19:15.710 --> 00:19:16.610
Getting there,

NOTE Confidence: 0.946878003076923

00:19:16.610 --> 00:19:19.585
and if you notice it's now square.

NOTE Confidence: 0.946878003076923

00:19:19.590 --> 00:19:21.450
And the hardware's put black

NOTE Confidence: 0.946878003076923

00:19:21.450 --> 00:19:24.283
bands top and top and bottom to

NOTE Confidence: 0.946878003076923

00:19:24.283 --> 00:19:25.960
actually deal with that.

NOTE Confidence: 0.946878003076923

00:19:25.960 --> 00:19:29.300
So I've now got a much lower res.

NOTE Confidence: 0.946878003076923

00:19:29.300 --> 00:19:31.718
Which will go a lot faster.

NOTE Confidence: 0.946878003076923

00:19:31.720 --> 00:19:34.534
And I've fixed the resolution and the

NOTE Confidence: 0.946878003076923

00:19:34.534 --> 00:19:37.579
orientation to suit whatever game I'm making.

NOTE Confidence: 0.946878003076923

00:19:37.580 --> 00:19:39.308
So the good news for developers

NOTE Confidence: 0.946878003076923

00:19:39.308 --> 00:19:41.560
is that you don't have to worry

NOTE Confidence: 0.946878003076923

00:19:41.560 --> 00:19:42.940
about resizing your assets.

NOTE Confidence: 0.946878003076923

00:19:42.940 --> 00:19:44.248
You don't have to worry about

NOTE Confidence: 0.946878003076923

00:19:44.248 --> 00:19:45.397
future versions of the phone

NOTE Confidence: 0.946878003076923

00:19:45.397 --> 00:19:46.795
needing new versions of the game,

NOTE Confidence: 0.946878003076923

00:19:46.800 --> 00:19:48.856
you just pick a size and you stick

NOTE Confidence: 0.946878003076923

00:19:48.856 --> 00:19:50.848
with it and you can even scale

NOTE Confidence: 0.946878003076923

00:19:50.848 --> 00:19:52.995
your assets to fit that exactly and

NOTE Confidence: 0.946878003076923

00:19:52.995 --> 00:19:55.017
then just have it always worked,

NOTE Confidence: 0.946878003076923

00:19:55.020 --> 00:19:56.460
which is really rather nice,

NOTE Confidence: 0.946878003076923

00:19:56.460 --> 00:19:57.768
so I'll stop that from running

NOTE Confidence: 0.946878003076923

00:19:57.768 --> 00:19:59.266
and we'll go back to the slides

NOTE Confidence: 0.946878003076923

00:19:59.266 --> 00:20:00.880
and see where we are next to that,

NOTE Confidence: 0.946878003076923

00:20:00.880 --> 00:20:03.190
stop that, and then go back.

NOTE Confidence: 0.946878003076923

00:20:03.190 --> 00:20:04.270
So there you go.

NOTE Confidence: 0.946878003076923

00:20:04.270 --> 00:20:06.069
That's easy to do and again, sample

NOTE Confidence: 0.946878003076923

00:20:06.069 --> 00:20:07.930
code is all up there for you to play with.

NOTE Confidence: 0.946878003076923

00:20:07.930 --> 00:20:09.750
As far as I'm concerned.

NOTE Confidence: 0.946878003076923

00:20:09.750 --> 00:20:12.090
Yeah, I've got this game world.

NOTE Confidence: 0.946878003076923

00:20:12.090 --> 00:20:13.924
Now what I'm gonna be doing is

NOTE Confidence: 0.946878003076923

00:20:13.924 --> 00:20:15.617
flicking the cheese around the screen

NOTE Confidence: 0.946878003076923

00:20:15.617 --> 00:20:17.327
and making it bounce off stuff.

NOTE Confidence: 0.946878003076923

00:20:17.330 --> 00:20:17.594
OK,

NOTE Confidence: 0.946878003076923

00:20:17.594 --> 00:20:19.706
now I have this vague idea of like

NOTE Confidence: 0.946878003076923

00:20:19.706 --> 00:20:22.159
a shuffleboard type game where you

NOTE Confidence: 0.946878003076923

00:20:22.159 --> 00:20:24.568
hit things towards scored areas at

NOTE Confidence: 0.946878003076923

00:20:24.568 --> 00:20:26.810
the top and the closer the top that you get,

NOTE Confidence: 0.946878003076923

00:20:26.810 --> 00:20:28.098
the better the score you get and

NOTE Confidence: 0.946878003076923

00:20:28.098 --> 00:20:29.512
so that the players would basically

NOTE Confidence: 0.946878003076923

00:20:29.512 --> 00:20:30.328
be about shove,

NOTE Confidence: 0.946878003076923

00:20:30.330 --> 00:20:31.734
halfpenny or some kind of these

NOTE Confidence: 0.946878003076923

00:20:31.734 --> 00:20:32.436
little pub games.

NOTE Confidence: 0.634840942857143

00:20:32.440 --> 00:20:34.675
We signed things about or

NOTE Confidence: 0.634840942857143

00:20:34.675 --> 00:20:37.190
desktop or deck quoits on a ship,

NOTE Confidence: 0.634840942857143

00:20:37.190 --> 00:20:38.794
that kind of thing.

NOTE Confidence: 0.634840942857143

00:20:38.794 --> 00:20:40.799
So what I have is.

NOTE Confidence: 0.634840942857143

00:20:40.800 --> 00:20:43.593
A draw method which draws the cheese

NOTE Confidence: 0.634840942857143

00:20:43.593 --> 00:20:46.231
where it happens to be an update

NOTE Confidence: 0.634840942857143

00:20:46.231 --> 00:20:48.782
method has a very very simple physics

NOTE Confidence: 0.634840942857143

00:20:48.782 --> 00:20:50.962
model which takes the velocity

NOTE Confidence: 0.634840942857143

00:20:50.962 --> 00:20:54.240
of the cheese and adds it to the

NOTE Confidence: 0.634840942857143

00:20:54.240 --> 00:20:56.989
current position to make it move OK.

NOTE Confidence: 0.634840942857143

00:20:56.990 --> 00:20:59.286
I've also got a friction variable that

NOTE Confidence: 0.634840942857143

00:20:59.286 --> 00:21:01.407
lets things slow down a little bit,

NOTE Confidence: 0.634840942857143

00:21:01.410 --> 00:21:03.370
and one of them to do is having got this

NOTE Confidence: 0.634840942857143

00:21:03.419 --> 00:21:05.327
and I'll show you the code in a second.

NOTE Confidence: 0.634840942857143

00:21:05.330 --> 00:21:07.661
I'm going to start using the touchscreen

NOTE Confidence: 0.634840942857143

00:21:07.661 --> 00:21:10.534
to fire things around and what I want you

NOTE Confidence: 0.634840942857143

00:21:10.534 --> 00:21:12.838
to understand from this is just how easy.

NOTE Confidence: 0.634840942857143

00:21:12.840 --> 00:21:15.006
It is to actually control things

NOTE Confidence: 0.634840942857143

00:21:15.006 --> 00:21:17.579
in a game using Windows Phone.

NOTE Confidence: 0.634840942857143

00:21:17.580 --> 00:21:19.356
Again, you get all the code.

NOTE Confidence: 0.634840942857143

00:21:19.360 --> 00:21:20.990
There's no problem there and

NOTE Confidence: 0.634840942857143

00:21:20.990 --> 00:21:22.294
it all just works.

NOTE Confidence: 0.634840942857143

00:21:22.300 --> 00:21:25.860
Now the touch screen is the only way.

NOTE Confidence: 0.634840942857143

00:21:25.860 --> 00:21:27.176
Well, that's not that's not quite true.

NOTE Confidence: 0.634840942857143

00:21:27.180 --> 00:21:28.465
There are no buttons you

NOTE Confidence: 0.634840942857143

00:21:28.465 --> 00:21:29.493
can press to control.

NOTE Confidence: 0.634840942857143

00:21:29.500 --> 00:21:31.780
Again, if you had an Xbox 360 game,

NOTE Confidence: 0.634840942857143

00:21:31.780 --> 00:21:32.879
you get this rather nice game pad.

NOTE Confidence: 0.634840942857143

00:21:32.880 --> 00:21:33.660
You can twiddle and press

NOTE Confidence: 0.634840942857143

00:21:33.660 --> 00:21:34.660
buttons and all kinds of stuff,

NOTE Confidence: 0.634840942857143

00:21:34.660 --> 00:21:35.438
that's great.

NOTE Confidence: 0.634840942857143

00:21:35.438 --> 00:21:38.161
Windows Phone you get a touch screen

NOTE Confidence: 0.634840942857143

00:21:38.161 --> 00:21:40.929
and the accelerometer and that's it.

NOTE Confidence: 0.634840942857143

00:21:40.930 --> 00:21:42.449
But you can do some really nice

NOTE Confidence: 0.634840942857143

00:21:42.449 --> 00:21:43.100
things with this.

NOTE Confidence: 0.634840942857143

00:21:43.100 --> 00:21:44.978
The touch screen can track up

NOTE Confidence: 0.634840942857143

00:21:44.978 --> 00:21:46.230
to four contact points.

NOTE Confidence: 0.634840942857143

00:21:46.230 --> 00:21:48.078
I was thinking that that four

NOTE Confidence: 0.634840942857143

00:21:48.078 --> 00:21:49.650
points doesn't sound very many.

NOTE Confidence: 0.634840942857143

00:21:49.650 --> 00:21:51.834
I'd rather have more than that if

NOTE Confidence: 0.634840942857143

00:21:51.834 --> 00:21:53.850
you're holding the phone in one hand

NOTE Confidence: 0.634840942857143

00:21:53.850 --> 00:21:55.266
5 probably the maximum you need,

NOTE Confidence: 0.634840942857143

00:21:55.270 --> 00:21:57.214
so four is just fine and you can

NOTE Confidence: 0.634840942857143

00:21:57.214 --> 00:21:58.993
detect when your finger hits the

NOTE Confidence: 0.634840942857143

00:21:58.993 --> 00:22:00.538
phone when your finger moves

NOTE Confidence: 0.634840942857143

00:22:00.538 --> 00:22:02.178
around and when your finger is

NOTE Confidence: 0.634840942857143

00:22:02.178 --> 00:22:04.206
lifted off and you can get message.

NOTE Confidence: 0.634840942857143

00:22:04.206 --> 00:22:06.474
You can basically pull messages in.

NOTE Confidence: 0.634840942857143

00:22:06.480 --> 00:22:08.208
When any of those things happen,

NOTE Confidence: 0.634840942857143

00:22:08.210 --> 00:22:10.597
so XNA can do that for you.

NOTE Confidence: 0.634840942857143

00:22:10.600 --> 00:22:12.196
And if you fancy writing some

NOTE Confidence: 0.634840942857143

00:22:12.196 --> 00:22:13.690
code that uses touch points,

NOTE Confidence: 0.634840942857143

00:22:13.690 --> 00:22:16.945
that's fine and dandy and very manageable.

NOTE Confidence: 0.634840942857143

00:22:16.950 --> 00:22:19.990
Easy to do, but XNA makes it really,

NOTE Confidence: 0.634840942857143

00:22:19.990 --> 00:22:23.038
really easy because it also has for the

NOTE Confidence: 0.634840942857143

00:22:23.038 --> 00:22:25.849
phone built-in gesture recognition as well,

NOTE Confidence: 0.634840942857143

00:22:25.850 --> 00:22:27.488
so we can tell the hardware.

NOTE Confidence: 0.634840942857143

00:22:27.490 --> 00:22:29.668
Hey, if someone does a flick

NOTE Confidence: 0.634840942857143

00:22:29.670 --> 00:22:31.310
action on the phone surface,

NOTE Confidence: 0.634840942857143

00:22:31.310 --> 00:22:33.929
tell me about it and give me the direction,

NOTE Confidence: 0.634840942857143

00:22:33.930 --> 00:22:36.304
and that's what we do here, so effectively.

NOTE Confidence: 0.634840942857143

00:22:36.304 --> 00:22:38.206
There's a whole bunch of gestures

NOTE Confidence: 0.634840942857143

00:22:38.206 --> 00:22:40.169
I can tell you people about.

NOTE Confidence: 0.634840942857143

00:22:40.170 --> 00:22:41.370
Gestures sounds a bit rude,

NOTE Confidence: 0.634840942857143

00:22:41.370 --> 00:22:43.810
but no, not really.

NOTE Confidence: 0.634840942857143

00:22:43.810 --> 00:22:45.064
There's a whole bunch of different

NOTE Confidence: 0.634840942857143

00:22:45.064 --> 00:22:46.050
gestures you can pick up.

NOTE Confidence: 0.634840942857143

00:22:46.050 --> 00:22:49.092
Tap, double tap, hold, drag, pinch and flick.

NOTE Confidence: 0.634840942857143

00:22:49.092 --> 00:22:50.976
We're going to use flick because

NOTE Confidence: 0.634840942857143

00:22:50.976 --> 00:22:53.204
it's it's really easy to get hold of.

NOTE Confidence: 0.634840942857143

00:22:53.210 --> 00:22:54.530
So all I have to do in my game is,

NOTE Confidence: 0.634840942857143

00:22:54.530 --> 00:22:56.710
say, OK Mr Touch panel,

NOTE Confidence: 0.634840942857143

00:22:56.710 --> 00:22:58.846
enable the flick gesture please now

NOTE Confidence: 0.634840942857143

00:22:58.846 --> 00:23:01.609
the touch panel will track flicks for me.

NOTE Confidence: 0.634840942857143

00:23:01.610 --> 00:23:05.058
OK and you can.

NOTE Confidence: 0.634840942857143

00:23:05.060 --> 00:23:06.376
Ask the touch panel of the things

NOTE Confidence: 0.634840942857143

00:23:06.376 --> 00:23:07.940
like how many points can you track and

NOTE Confidence: 0.634840942857143

00:23:07.940 --> 00:23:09.340
all kinds of good stuff like that,

NOTE Confidence: 0.634840942857143

00:23:09.340 --> 00:23:11.284
and this is effectively the code

NOTE Confidence: 0.634840942857143

00:23:11.284 --> 00:23:12.580
which you have to

NOTE Confidence: 0.915332768571429

00:23:12.650 --> 00:23:14.168
add to your game to be

NOTE Confidence: 0.915332768571429

00:23:14.168 --> 00:23:15.700
able to to flick things.

NOTE Confidence: 0.915332768571429

00:23:15.700 --> 00:23:19.160
Now what I've got here is.

NOTE Confidence: 0.915332768571429

00:23:19.160 --> 00:23:22.456
If we have a gesture from the panel.

NOTE Confidence: 0.915332768571429

00:23:22.460 --> 00:23:24.710
We go off and get it.

NOTE Confidence: 0.915332768571429

00:23:24.710 --> 00:23:27.310
And if it's a flick.

NOTE Confidence: 0.915332768571429

00:23:27.310 --> 00:23:31.276
We get a vector and we

NOTE Confidence: 0.915332768571429

00:23:31.276 --> 00:23:33.920
effectively divide the delta.

NOTE Confidence: 0.915332768571429

00:23:33.920 --> 00:23:36.170
Which is the direction of the flick by 100.

NOTE Confidence: 0.915332768571429

00:23:36.170 --> 00:23:37.406
I'll show you what that mean.

NOTE Confidence: 0.915332768571429

00:23:37.410 --> 00:23:39.738
It's kind of tricky to sort

NOTE Confidence: 0.915332768571429

00:23:39.738 --> 00:23:41.290
of explain what's happening,

NOTE Confidence: 0.915332768571429

00:23:41.290 --> 00:23:42.808
but the code makes perfect sense.

NOTE Confidence: 0.915332768571429

00:23:42.810 --> 00:23:45.540
What I found when I was flicking.

NOTE Confidence: 0.915332768571429

00:23:45.540 --> 00:23:46.179
Flicking my cheese,

NOTE Confidence: 0.915332768571429

00:23:46.179 --> 00:23:48.190
which is not a phrase you hear very often,

NOTE Confidence: 0.915332768571429

00:23:48.190 --> 00:23:49.989
was that if you flicked it and

NOTE Confidence: 0.915332768571429

00:23:49.989 --> 00:23:51.869
put the delta value straight in,

NOTE Confidence: 0.915332768571429

00:23:51.870 --> 00:23:53.646
the cheese went far too fast,

NOTE Confidence: 0.915332768571429

00:23:53.650 --> 00:23:55.225
so I had to divide the delta

NOTE Confidence: 0.915332768571429

00:23:55.225 --> 00:23:56.458
value which the touch panel

NOTE Confidence: 0.915332768571429

00:23:56.458 --> 00:23:58.215
gives me by 100 and that actually

NOTE Confidence: 0.915332768571429

00:23:58.215 --> 00:23:59.848
got the the speed about right.

NOTE Confidence: 0.915332768571429

00:23:59.850 --> 00:24:01.418
This is called playtesting,

NOTE Confidence: 0.915332768571429

00:24:01.418 --> 00:24:02.986
and it's great fun,

NOTE Confidence: 0.915332768571429

00:24:02.990 --> 00:24:05.120
and it's kind of worth recruiting

NOTE Confidence: 0.915332768571429

00:24:05.120 --> 00:24:07.044
someone to do your playtesting

NOTE Confidence: 0.915332768571429

00:24:07.044 --> 00:24:09.142
for you because it's quite an

NOTE Confidence: 0.915332768571429

00:24:09.142 --> 00:24:10.682
important part of game development.

NOTE Confidence: 0.915332768571429

00:24:10.690 --> 00:24:14.180
So here's my new game.

NOTE Confidence: 0.915332768571429

00:24:14.180 --> 00:24:16.322
Again, you can have all the code for this,

NOTE Confidence: 0.915332768571429

00:24:16.330 --> 00:24:17.833
it's all there.

NOTE Confidence: 0.915332768571429

00:24:17.833 --> 00:24:20.338
I've slightly changed my game

NOTE Confidence: 0.915332768571429

00:24:20.340 --> 00:24:22.715
because although I'm using a

NOTE Confidence: 0.915332768571429

00:24:22.715 --> 00:24:25.232
rectangle to position the cheese,

NOTE Confidence: 0.915332768571429

00:24:25.232 --> 00:24:28.508
I'm also using a vector now.

NOTE Confidence: 0.915332768571429

00:24:28.510 --> 00:24:30.288
So I have a rectangle which tells

NOTE Confidence: 0.915332768571429

00:24:30.288 --> 00:24:32.578
me where the cheese is gonna be and

NOTE Confidence: 0.915332768571429

00:24:32.578 --> 00:24:35.386
a vector which holds its position.

NOTE Confidence: 0.915332768571429

00:24:35.390 --> 00:24:37.550
Now the nice thing about vectors

NOTE Confidence: 0.915332768571429

00:24:37.550 --> 00:24:39.932
is they hold floating point values

NOTE Confidence: 0.915332768571429

00:24:39.932 --> 00:24:42.455
whereas the rectangle I can only

NOTE Confidence: 0.915332768571429

00:24:42.455 --> 00:24:44.187
position on pixel boundaries.

NOTE Confidence: 0.915332768571429

00:24:44.190 --> 00:24:45.862
So I have a little bit of code

NOTE Confidence: 0.915332768571429

00:24:45.862 --> 00:24:47.419
in the in the draw method.

NOTE Confidence: 0.915332768571429

00:24:47.420 --> 00:24:48.981
I'll show you in a second or

NOTE Confidence: 0.915332768571429

00:24:48.981 --> 00:24:50.489
so which which sorts this out.

NOTE Confidence: 0.915332768571429

00:24:50.490 --> 00:24:52.008
But effectively I've got a texture

NOTE Confidence: 0.915332768571429

00:24:52.008 --> 00:24:53.629
I've got where it's going to be.

NOTE Confidence: 0.915332768571429

00:24:53.630 --> 00:24:55.970
I've got speed value and that's

NOTE Confidence: 0.915332768571429

00:24:55.970 --> 00:24:57.944
my friction and that's it.

NOTE Confidence: 0.915332768571429

00:24:57.944 --> 00:25:00.332
If I go into my update.

NOTE Confidence: 0.915332768571429

00:25:00.340 --> 00:25:02.560
Then drift down here a little

NOTE Confidence: 0.915332768571429

00:25:02.560 --> 00:25:03.820
bit further then.

NOTE Confidence: 0.915332768571429

00:25:03.820 --> 00:25:06.940
I figure out this is effectively

NOTE Confidence: 0.915332768571429

00:25:06.940 --> 00:25:08.500
my physics model.

NOTE Confidence: 0.915332768571429

00:25:08.500 --> 00:25:08.856
Now.

NOTE Confidence: 0.915332768571429

00:25:08.856 --> 00:25:10.992
I could actually just go on

NOTE Confidence: 0.915332768571429

00:25:10.992 --> 00:25:12.426
position to position plus chief

NOTE Confidence: 0.915332768571429

00:25:12.426 --> 00:25:14.040
speed because you can do additions,

NOTE Confidence: 0.915332768571429

00:25:14.040 --> 00:25:16.288
but I thought I'd actually show you the

NOTE Confidence: 0.915332768571429

00:25:16.288 --> 00:25:18.546
add method being used and then I get my.

NOTE Confidence: 0.915332768571429

00:25:18.550 --> 00:25:20.830
Position by adding the speed on.

NOTE Confidence: 0.915332768571429

00:25:20.830 --> 00:25:23.390
I take the speed and I multiply it

NOTE Confidence: 0.915332768571429

00:25:23.390 --> 00:25:25.423
by friction so it slows down and

NOTE Confidence: 0.915332768571429

00:25:25.423 --> 00:25:27.926
then here I do my flicking that's my

NOTE Confidence: 0.915332768571429

00:25:27.926 --> 00:25:31.820
flicking code and then here I take the.

NOTE Confidence: 0.915332768571429

00:25:31.820 --> 00:25:33.690
The vector.

NOTE Confidence: 0.915332768571429

00:25:33.690 --> 00:25:36.722
And I set the position of my draw

NOTE Confidence: 0.915332768571429

00:25:36.722 --> 00:25:39.209
rectangle to the nearest integer.

NOTE Confidence: 0.915332768571429

00:25:39.210 --> 00:25:41.156
So this is where I convert my

NOTE Confidence: 0.915332768571429

00:25:41.156 --> 00:25:42.614
floating point vector X&amp;amp;Y values

NOTE Confidence: 0.915332768571429

00:25:42.614 --> 00:25:44.312
into the integers that are going

NOTE Confidence: 0.915332768571429

00:25:44.312 --> 00:25:45.649
to place my rectangle.

NOTE Confidence: 0.915332768571429

00:25:45.650 --> 00:25:47.407
The final bit I do down here.

NOTE Confidence: 0.915332768571429

00:25:47.410 --> 00:25:49.450
This is my bounce when the

NOTE Confidence: 0.915332768571429

00:25:49.450 --> 00:25:50.810
cheese hits the edge.

NOTE Confidence: 0.915332768571429

00:25:50.810 --> 00:25:52.741
I want it to bounce off so

NOTE Confidence: 0.915332768571429

00:25:52.741 --> 00:25:55.898
effectively if my X goes over the.

NOTE Confidence: 0.915332768571429

00:25:55.900 --> 00:25:57.811
Left Hand Edge I must flip the

NOTE Confidence: 0.915332768571429

00:25:57.811 --> 00:25:59.411
velocity to go the other way

NOTE Confidence: 0.915332768571429

00:25:59.411 --> 00:26:01.429
and if the Y goes off the top

NOTE Confidence: 0.915332768571429

00:26:01.429 --> 00:26:02.899
or the bottom same thing.

NOTE Confidence: 0.915332768571429

00:26:02.900 --> 00:26:04.237
So I've got some bounce code here,

NOTE Confidence: 0.915332768571429

00:26:04.240 --> 00:26:04.974
but really,

NOTE Confidence: 0.915332768571429

00:26:04.974 --> 00:26:07.176
when you've seen this update method,

NOTE Confidence: 0.873994514285714

00:26:07.180 --> 00:26:08.937
you've pretty much seen all of it,

NOTE Confidence: 0.873994514285714

00:26:08.940 --> 00:26:10.476
and I'm asking the hardware hey,

NOTE Confidence: 0.873994514285714

00:26:10.480 --> 00:26:11.860
how wide are you so that

NOTE Confidence: 0.873994514285714

00:26:11.860 --> 00:26:13.569
we can get it all to work?

NOTE Confidence: 0.873994514285714

00:26:13.570 --> 00:26:16.156
So now if I run this

NOTE Confidence: 0.873994514285714

00:26:16.156 --> 00:26:17.880
program inside the emulator.

NOTE Confidence: 0.873994514285714

00:26:17.880 --> 00:26:19.410
Laimi the Martians are coming.

NOTE Confidence: 0.889580587692308

00:26:22.330 --> 00:26:23.653
That reminds me of a really rude

NOTE Confidence: 0.889580587692308

00:26:23.653 --> 00:26:24.950
joke that I just can't tell,

NOTE Confidence: 0.889580587692308

00:26:24.950 --> 00:26:26.760
so we'll move on. Actually,

NOTE Confidence: 0.889580587692308

00:26:26.760 --> 00:26:30.530
I've had a joke for ages as a friend of mine.

NOTE Confidence: 0.889580587692308

00:26:30.530 --> 00:26:31.646
He's going out with a girl

NOTE Confidence: 0.889580587692308

00:26:31.646 --> 00:26:32.750
who's got X Ray vision,

NOTE Confidence: 0.889580587692308

00:26:32.750 --> 00:26:34.397
but I've no idea what she sees in him.

NOTE Confidence: 0.876972572857143

00:26:36.570 --> 00:26:39.307
OK, fine laughing in spite of yourselves.

NOTE Confidence: 0.876972572857143

00:26:39.310 --> 00:26:40.318
That's what I like to hear.

NOTE Confidence: 0.876972572857143

00:26:40.320 --> 00:26:42.080
So here's my cheese flicking

NOTE Confidence: 0.876972572857143

00:26:42.080 --> 00:26:44.719
game and if I flick the screen,

NOTE Confidence: 0.876972572857143

00:26:44.720 --> 00:26:46.480
the cheese actually bounces around.

NOTE Confidence: 0.876972572857143

00:26:46.480 --> 00:26:48.682
Now the nice thing about this

NOTE Confidence: 0.876972572857143

00:26:48.682 --> 00:26:50.610
is you've seen the code.

NOTE Confidence: 0.876972572857143

00:26:50.610 --> 00:26:53.550
OK, there is nothing else happening,

NOTE Confidence: 0.876972572857143

00:26:53.550 --> 00:26:54.900
this is just how it works.

NOTE Confidence: 0.876972572857143

00:26:54.900 --> 00:26:57.156
If I give it a good flick then and

NOTE Confidence: 0.876972572857143

00:26:57.156 --> 00:26:58.944
I'm flicking using the mouse but

NOTE Confidence: 0.876972572857143

00:26:58.944 --> 00:27:01.425
it will work just the same on the

NOTE Confidence: 0.876972572857143

00:27:01.425 --> 00:27:03.249
phone hard hardware just the same.

NOTE Confidence: 0.876972572857143

00:27:03.250 --> 00:27:05.830
And you've seen the code.

NOTE Confidence: 0.876972572857143

00:27:05.830 --> 00:27:07.550
I took a bit of time to get

NOTE Confidence: 0.876972572857143

00:27:07.550 --> 00:27:09.150
the the flick value right,

NOTE Confidence: 0.876972572857143

00:27:09.150 --> 00:27:09.603
there you go,

NOTE Confidence: 0.876972572857143

00:27:09.603 --> 00:27:10.898
but what we can do now is the

NOTE Confidence: 0.876972572857143

00:27:10.898 --> 00:27:11.868
thing which is quite nice.

NOTE Confidence: 0.876972572857143

00:27:11.870 --> 00:27:13.640
I've got the program running inside

NOTE Confidence: 0.876972572857143

00:27:13.640 --> 00:27:15.766
the the code while it's running.

NOTE Confidence: 0.876972572857143

00:27:15.766 --> 00:27:18.650
I can slap a breakpoint in here.

NOTE Confidence: 0.876972572857143

00:27:18.650 --> 00:27:21.110
And next time update is called,

NOTE Confidence: 0.876972572857143

00:27:21.110 --> 00:27:23.830
we get our breakpoint hit.

NOTE Confidence: 0.876972572857143

00:27:23.830 --> 00:27:26.014
Now one point I haven't made up

NOTE Confidence: 0.876972572857143

00:27:26.014 --> 00:27:28.374
until now is that your update

NOTE Confidence: 0.876972572857143

00:27:28.374 --> 00:27:31.062
and your draw methods are called

NOTE Confidence: 0.876972572857143

00:27:31.062 --> 00:27:33.358
automatically by XNA 30 times a second.

NOTE Confidence: 0.876972572857143

00:27:33.360 --> 00:27:35.908
So what's happening is that 30 times

NOTE Confidence: 0.876972572857143

00:27:35.908 --> 00:27:38.236
a second where it's updating our

NOTE Confidence: 0.876972572857143

00:27:38.236 --> 00:27:40.938
game universe and 30 times a second.

NOTE Confidence: 0.876972572857143

00:27:40.940 --> 00:27:43.418
We are drawing our game universe.

NOTE Confidence: 0.876972572857143

00:27:43.420 --> 00:27:45.628
It runs a bit slower on the phone

NOTE Confidence: 0.876972572857143

00:27:45.628 --> 00:27:47.597
than on the Xbox 360 and PC.

NOTE Confidence: 0.876972572857143

00:27:47.600 --> 00:27:49.010
They run at 60 Hertz,

NOTE Confidence: 0.876972572857143

00:27:49.010 --> 00:27:51.138
but on a phone with a smaller screen,

NOTE Confidence: 0.876972572857143

00:27:51.140 --> 00:27:53.222
they've reduced the power requirements by

NOTE Confidence: 0.876972572857143

00:27:53.222 --> 00:27:55.557
dropping down the update rate to 30 Hertz.

NOTE Confidence: 0.876972572857143

00:27:55.560 --> 00:27:58.080
OK, so this gets hit if I run

NOTE Confidence: 0.876972572857143

00:27:58.080 --> 00:27:59.680
past this breakpoint,

NOTE Confidence: 0.876972572857143

00:27:59.680 --> 00:28:00.808
it'll hit it straight away again

NOTE Confidence: 0.876972572857143

00:28:00.808 --> 00:28:02.197
because I get called in the next tick.

NOTE Confidence: 0.876972572857143

00:28:02.200 --> 00:28:02.890
There you go,

NOTE Confidence: 0.876972572857143

00:28:02.890 --> 00:28:03.810
I'll get called again.

NOTE Confidence: 0.876972572857143

00:28:03.810 --> 00:28:05.510
And so I've effectively

NOTE Confidence: 0.876972572857143

00:28:05.510 --> 00:28:07.210
got the outside world.

NOTE Confidence: 0.876972572857143

00:28:07.210 --> 00:28:09.016
The XNA framework is calling my

NOTE Confidence: 0.876972572857143

00:28:09.016 --> 00:28:11.207
draw on my update methods for me

NOTE Confidence: 0.876972572857143

00:28:11.207 --> 00:28:13.356
and it's my job to basically update

NOTE Confidence: 0.876972572857143

00:28:13.423 --> 00:28:15.583
the model so 30 times a second we

NOTE Confidence: 0.876972572857143

00:28:15.583 --> 00:28:17.954
update the position of the cheese.

NOTE Confidence: 0.876972572857143

00:28:17.954 --> 00:28:20.626
We look for gestures and what I

NOTE Confidence: 0.876972572857143

00:28:20.626 --> 00:28:22.600
can do while I'm debugging is I

NOTE Confidence: 0.876972572857143

00:28:22.674 --> 00:28:24.753
can have a bit of fun now if I.

NOTE Confidence: 0.933259058571429

00:28:26.930 --> 00:28:29.639
At the moment my friction variable is

NOTE Confidence: 0.933259058571429

00:28:29.640 --> 00:28:32.464
.99 because I want things to slow down.

NOTE Confidence: 0.933259058571429

00:28:32.470 --> 00:28:36.047
Watch what happens if I do this.

NOTE Confidence: 0.933259058571429

00:28:36.050 --> 00:28:39.668
Equals one point.

NOTE Confidence: 0.933259058571429

00:28:39.670 --> 00:28:42.946
Not one I've now got a table which

NOTE Confidence: 0.933259058571429

00:28:42.946 --> 00:28:45.992
actually speeds up friction. Oh, hang on.

NOTE Confidence: 0.933259058571429

00:28:45.992 --> 00:28:48.270
OK, I gotta put an F there Robert. Thank you.

NOTE Confidence: 0.933259058571429

00:28:48.270 --> 00:28:50.630
So now my friction is now bigger than one.

NOTE Confidence: 0.933259058571429

00:28:50.630 --> 00:28:51.846
So what happens now?

NOTE Confidence: 0.933259058571429

00:28:51.846 --> 00:28:53.670
If I get the thing going?

NOTE Confidence: 0.933259058571429

00:28:53.670 --> 00:28:56.310
And I'm hoping it doesn't actually go to

NOTE Confidence: 0.933259058571429

00:28:56.310 --> 00:28:58.618
nuts before we get onto the emulator.

NOTE Confidence: 0.933259058571429

00:28:58.620 --> 00:28:59.940
So I'll give you a flick.

NOTE Confidence: 0.933259058571429

00:28:59.940 --> 00:29:00.900
Oh, it's still there haha.

NOTE Confidence: 0.933259058571429

00:29:00.900 --> 00:29:02.230
Thank you. There's a bloke at the

NOTE Confidence: 0.933259058571429

00:29:02.230 --> 00:29:03.459
back who's more awake than I am.

NOTE Confidence: 0.933259058571429

00:29:03.460 --> 00:29:05.182
Kill the breakpoint.

NOTE Confidence: 0.933259058571429

00:29:05.182 --> 00:29:09.160
Put this, go back and get this.

NOTE Confidence: 0.933259058571429

00:29:09.160 --> 00:29:13.210
And then if I just do that and then.

NOTE Confidence: 0.933259058571429

00:29:13.210 --> 00:29:16.330
But you do owe for a bigger taskbar.

NOTE Confidence: 0.933259058571429

00:29:16.330 --> 00:29:17.236
What do you want for Christmas?

NOTE Confidence: 0.933259058571429

00:29:17.240 --> 00:29:19.520
Rob? Are bigger taskbar OK?

NOTE Confidence: 0.933259058571429

00:29:19.520 --> 00:29:20.976
Still won't let me do it right?

NOTE Confidence: 0.933259058571429

00:29:20.980 --> 00:29:22.540
OK get out of the way.

NOTE Confidence: 0.933259058571429

00:29:22.540 --> 00:29:24.292
I want you to see it because I

NOTE Confidence: 0.933259058571429

00:29:24.292 --> 00:29:25.731
think it's gonna take off like

NOTE Confidence: 0.933259058571429

00:29:25.731 --> 00:29:27.141
a rocket when I do this.

NOTE Confidence: 0.933259058571429

00:29:27.150 --> 00:29:27.800
You go,

NOTE Confidence: 0.933259058571429

00:29:27.800 --> 00:29:30.075
it'll get faster and faster and faster

NOTE Confidence: 0.933259058571429

00:29:30.075 --> 00:29:32.392
and faster because now friction is

NOTE Confidence: 0.933259058571429

00:29:32.392 --> 00:29:35.111
actually speeding my ball up and after

NOTE Confidence: 0.933259058571429

00:29:35.111 --> 00:29:37.307
a while it's going completely nuts.

NOTE Confidence: 0.933259058571429

00:29:37.310 --> 00:29:37.683
Now.

NOTE Confidence: 0.933259058571429

00:29:37.683 --> 00:29:40.294
The interesting thing about this is that.

NOTE Confidence: 0.933259058571429

00:29:40.300 --> 00:29:42.382
The same thing would have happened

NOTE Confidence: 0.933259058571429

00:29:42.382 --> 00:29:44.960
if I was debugging inside the phone.

NOTE Confidence: 0.933259058571429

00:29:44.960 --> 00:29:45.293
OK,

NOTE Confidence: 0.933259058571429

00:29:45.293 --> 00:29:46.958
so now it's gone completely

NOTE Confidence: 0.933259058571429

00:29:46.958 --> 00:29:47.957
and utterly bonkers,

NOTE Confidence: 0.933259058571429

00:29:47.960 --> 00:29:49.700
and I'd probably better stop it

NOTE Confidence: 0.933259058571429

00:29:49.700 --> 00:29:50.860
before something terrible happens

NOTE Confidence: 0.933259058571429

00:29:50.912 --> 00:29:52.280
and the ball escapes from here

NOTE Confidence: 0.933259058571429

00:29:52.280 --> 00:29:53.730
and crashes into the ceiling of.

NOTE Confidence: 0.933259058571429

00:29:53.730 --> 00:29:56.509
That probably won't happen, but you can.

NOTE Confidence: 0.933259058571429

00:29:56.510 --> 00:29:58.848
I'll just stop.

NOTE Confidence: 0.933259058571429

00:29:58.848 --> 00:30:01.494
You know I didn't what you doing.

NOTE Confidence: 0.933259058571429

00:30:01.500 --> 00:30:03.090
Have you stopped by yourself?

NOTE Confidence: 0.933259058571429

00:30:03.090 --> 00:30:03.918
No, you're still going.

NOTE Confidence: 0.338549973333333

00:30:06.330 --> 00:30:09.550
Did it do? I think I'm confused myself.

NOTE Confidence: 0.338549973333333

00:30:09.550 --> 00:30:10.390
I do this a lot.

NOTE Confidence: 0.338549973333333

00:30:10.390 --> 00:30:11.623
This is the one I really want to do.

NOTE Confidence: 0.338549973333333

00:30:11.630 --> 00:30:13.798
This one is running.

NOTE Confidence: 0.338549973333333

00:30:13.800 --> 00:30:14.679
Stop, thank you.

NOTE Confidence: 0.338549973333333

00:30:14.679 --> 00:30:16.437
So it goes away again now.

NOTE Confidence: 0.338549973333333

00:30:16.440 --> 00:30:18.496
But the nice thing is that I can

NOTE Confidence: 0.338549973333333

00:30:18.496 --> 00:30:20.659
do all those lovely breakpoint,

NOTE Confidence: 0.338549973333333

00:30:20.660 --> 00:30:22.368
immediate mode, change stuff,

NOTE Confidence: 0.338549973333333

00:30:22.368 --> 00:30:24.930
run it on when the codes

NOTE Confidence: 0.338549973333333

00:30:25.011 --> 00:30:26.907
inside the phone device.

NOTE Confidence: 0.338549973333333

00:30:26.910 --> 00:30:28.653
So I can debug my programs as

NOTE Confidence: 0.338549973333333

00:30:28.653 --> 00:30:30.450
if they're on a desktop device,

NOTE Confidence: 0.338549973333333

00:30:30.450 --> 00:30:32.414
but in fact I have a phone and end of the

NOTE Confidence: 0.338549973333333

00:30:32.414 --> 00:30:34.350
cable and so I can do all the good stuff,

NOTE Confidence: 0.338549973333333

00:30:34.350 --> 00:30:35.442
all the debugging,

NOTE Confidence: 0.338549973333333

00:30:35.442 --> 00:30:37.626
all the playing around my programs

NOTE Confidence: 0.338549973333333

00:30:37.630 --> 00:30:39.667
exactly as I would on a desktop,

NOTE Confidence: 0.338549973333333

00:30:39.670 --> 00:30:41.644
but it's happening inside the phone and

NOTE Confidence: 0.338549973333333

00:30:41.644 --> 00:30:43.649
that goes across all phone development.

NOTE Confidence: 0.338549973333333

00:30:43.650 --> 00:30:45.687
It's also true for civil element too,

NOTE Confidence: 0.338549973333333

00:30:45.690 --> 00:30:47.810
so you can do all the all the

NOTE Confidence: 0.338549973333333

00:30:47.810 --> 00:30:49.548
nice things actually from within

NOTE Confidence: 0.338549973333333

00:30:49.548 --> 00:30:51.448
studio on the code itself.

NOTE Confidence: 0.338549973333333

00:30:51.450 --> 00:30:53.067
So the thing about this as well,

NOTE Confidence: 0.338549973333333

00:30:53.070 --> 00:30:55.710
if you ever wondered.

NOTE Confidence: 0.338549973333333

00:30:55.710 --> 00:30:57.650
How?

NOTE Confidence: 0.338549973333333

00:30:57.650 --> 00:30:58.825
Video games have got if

NOTE Confidence: 0.338549973333333

00:30:58.825 --> 00:31:00.000
you're playing a racing game,

NOTE Confidence: 0.338549973333333

00:31:00.000 --> 00:31:01.775
you'd go over track that

NOTE Confidence: 0.338549973333333

00:31:01.775 --> 00:31:03.195
suddenly speeds you up.

NOTE Confidence: 0.338549973333333

00:31:03.200 --> 00:31:04.260
Mario Kart does this.

NOTE Confidence: 0.338549973333333

00:31:04.260 --> 00:31:06.199
It has like chevrons on the thinking

NOTE Confidence: 0.338549973333333

00:31:06.199 --> 00:31:07.915
of rush off those real fast.

NOTE Confidence: 0.338549973333333

00:31:07.920 --> 00:31:09.978
Now you know how that works,

NOTE Confidence: 0.338549973333333

00:31:09.980 --> 00:31:11.860
they just as soon as you hit the Chevron bit.

NOTE Confidence: 0.338549973333333

00:31:11.860 --> 00:31:13.370
It makes friction bigger than

NOTE Confidence: 0.338549973333333

00:31:13.370 --> 00:31:15.240
one and your car goes Wham,

NOTE Confidence: 0.338549973333333

00:31:15.240 --> 00:31:16.776
when you get over that bit goes back

NOTE Confidence: 0.338549973333333

00:31:16.776 --> 00:31:18.498
to .9 or so means slow down again.

NOTE Confidence: 0.338549973333333

00:31:18.500 --> 00:31:20.270
So it's quite nice because you

NOTE Confidence: 0.338549973333333

00:31:20.270 --> 00:31:22.260
can see how these things work.

NOTE Confidence: 0.338549973333333

00:31:22.260 --> 00:31:25.005
So now I could have an area of my

NOTE Confidence: 0.338549973333333

00:31:25.005 --> 00:31:27.486
screen in my flicking game where

NOTE Confidence: 0.338549973333333

00:31:27.486 --> 00:31:29.581
the cheese suddenly speed up.

NOTE Confidence: 0.338549973333333

00:31:29.590 --> 00:31:31.004
That would be really easy to do,

NOTE Confidence: 0.338549973333333

00:31:31.010 --> 00:31:32.010
so this is what I was talking about.

NOTE Confidence: 0.338549973333333

00:31:32.010 --> 00:31:33.630
Meddling with code and fiddling

NOTE Confidence: 0.338549973333333

00:31:33.630 --> 00:31:35.566
with with behaviors to see what

NOTE Confidence: 0.338549973333333

00:31:35.566 --> 00:31:37.330
they do because you can do that

NOTE Confidence: 0.338549973333333

00:31:37.330 --> 00:31:39.070
and XNA is great for that,

NOTE Confidence: 0.338549973333333

00:31:39.070 --> 00:31:41.400
but all I had to do to get my cheese

NOTE Confidence: 0.338549973333333

00:31:41.468 --> 00:31:43.588
to go in the direction I flick it

NOTE Confidence: 0.338549973333333

00:31:43.588 --> 00:31:46.021
is take the delta value out of my

NOTE Confidence: 0.338549973333333

00:31:46.021 --> 00:31:48.920
gesture and apply it to my cheese speed.

NOTE Confidence: 0.338549973333333

00:31:48.920 --> 00:31:51.386
And I divided it by 100 to get a kind of

NOTE Confidence: 0.338549973333333

00:31:51.386 --> 00:31:53.586
a reasonable amount of of feel on there.

NOTE Confidence: 0.338549973333333

00:31:53.590 --> 00:31:54.634
So there you go.

NOTE Confidence: 0.338549973333333

00:31:54.634 --> 00:31:56.200
There's my rolling cheese and you've

NOTE Confidence: 0.338549973333333

00:31:56.250 --> 00:31:58.220
seen it do it and it all worked a treat,

NOTE Confidence: 0.338549973333333

00:31:58.220 --> 00:32:00.655
but nobody clapped because life's

NOTE Confidence: 0.338549973333333

00:32:00.655 --> 00:32:04.570
like that Rob so. Moving on.

NOTE Confidence: 0.338549973333333

00:32:04.570 --> 00:32:06.390
I now want more cheese.

NOTE Confidence: 0.338549973333333

00:32:06.390 --> 00:32:06.998
OK,

NOTE Confidence: 0.338549973333333

00:32:06.998 --> 00:32:10.038
more cheese that sounds great

NOTE Confidence: 0.338549973333333

00:32:10.038 --> 00:32:14.200
grommet and so to do that.

NOTE Confidence: 0.338549973333333

00:32:14.200 --> 00:32:15.240
You see what I wanted?

NOTE Confidence: 0.338549973333333

00:32:15.240 --> 00:32:16.292
I thinking about this.

NOTE Confidence: 0.338549973333333

00:32:16.292 --> 00:32:18.390
I'll have lots of different types of cheese,

NOTE Confidence: 0.338549973333333

00:32:18.390 --> 00:32:19.595
and we'll basically two players

NOTE Confidence: 0.338549973333333

00:32:19.595 --> 00:32:21.283
will take it in turns to hit

NOTE Confidence: 0.338549973333333

00:32:21.283 --> 00:32:22.591
cheese into the score area and

NOTE Confidence: 0.338549973333333

00:32:22.591 --> 00:32:23.940
knock each other out and move.

NOTE Confidence: 0.338549973333333

00:32:23.940 --> 00:32:25.992
So now gotta kind of bowls

NOTE Confidence: 0.338549973333333

00:32:25.992 --> 00:32:27.360
type action going on,

NOTE Confidence: 0.338549973333333

00:32:27.360 --> 00:32:29.474
but you could also go for snooker,

NOTE Confidence: 0.338549973333333

00:32:29.480 --> 00:32:32.180
billiards, any kind of ball game.

NOTE Confidence: 0.338549973333333

00:32:32.180 --> 00:32:34.518
You've got most of the mechanics there,

NOTE Confidence: 0.338549973333333

00:32:34.520 --> 00:32:36.368
but if you wanna have lots

NOTE Confidence: 0.338549973333333

00:32:36.368 --> 00:32:38.040
of balls in your game,

NOTE Confidence: 0.338549973333333

00:32:38.040 --> 00:32:39.720
then.

NOTE Confidence: 0.338549973333333

00:32:39.720 --> 00:32:41.695
You have to handle their

NOTE Confidence: 0.338549973333333

00:32:41.695 --> 00:32:43.670
collisions and deal with the

NOTE Confidence: 0.901393919166667

00:32:43.751 --> 00:32:46.032
physics properly, and that sounds to

NOTE Confidence: 0.901393919166667

00:32:46.032 --> 00:32:47.988
me too much like work, so I do what

NOTE Confidence: 0.901393919166667

00:32:47.988 --> 00:32:49.520
I normally do when I find something.

NOTE Confidence: 0.901393919166667

00:32:49.520 --> 00:32:50.558
It's a bit hard to do.

NOTE Confidence: 0.901393919166667

00:32:50.560 --> 00:32:52.132
I'll go off and find some

NOTE Confidence: 0.901393919166667

00:32:52.132 --> 00:32:53.494
code to steal and use,

NOTE Confidence: 0.901393919166667

00:32:53.494 --> 00:32:55.790
and the one I'm going to be using

NOTE Confidence: 0.901393919166667

00:32:55.867 --> 00:32:58.121
and showing you how to do things

NOTE Confidence: 0.901393919166667

00:32:58.121 --> 00:33:00.460
with is called the Farseer engine,

NOTE Confidence: 0.901393919166667

00:33:00.460 --> 00:33:03.441
and it's a really good 2D physics engine.

NOTE Confidence: 0.901393919166667

00:33:03.441 --> 00:33:05.815
I was actually at mix a few weeks ago

NOTE Confidence: 0.901393919166667

00:33:05.815 --> 00:33:07.871
and I met the guy that wrote Farseer

NOTE Confidence: 0.901393919166667

00:33:07.931 --> 00:33:09.883
and I shook him warmly by the hand.

NOTE Confidence: 0.901393919166667

00:33:09.890 --> 00:33:11.678
And it was really very embarrassing,

NOTE Confidence: 0.901393919166667

00:33:11.680 --> 00:33:12.660
so we'll move on.

NOTE Confidence: 0.901393919166667

00:33:12.660 --> 00:33:14.455
But it's a smashing little 2D engine

NOTE Confidence: 0.901393919166667

00:33:14.455 --> 00:33:16.317
which you can use to create games

NOTE Confidence: 0.901393919166667

00:33:16.317 --> 00:33:18.035
which have an element of physics

NOTE Confidence: 0.901393919166667

00:33:18.035 --> 00:33:19.727
where you want things to collide

NOTE Confidence: 0.901393919166667

00:33:19.730 --> 00:33:22.278
and bounce off and behave and it

NOTE Confidence: 0.901393919166667

00:33:22.278 --> 00:33:24.770
kind of hides all the hard work.

NOTE Confidence: 0.901393919166667

00:33:24.770 --> 00:33:26.838
All that, uh, stuff from you.

NOTE Confidence: 0.901393919166667

00:33:26.838 --> 00:33:30.090
And so if you haven't done physics before,

NOTE Confidence: 0.901393919166667

00:33:30.090 --> 00:33:31.002
you're about to.

NOTE Confidence: 0.901393919166667

00:33:31.002 --> 00:33:33.130
If you've done XNA before and thought,

NOTE Confidence: 0.901393919166667

00:33:33.130 --> 00:33:34.723
how am I going to get physics to work,

NOTE Confidence: 0.901393919166667

00:33:34.730 --> 00:33:36.030
this will be very useful.

NOTE Confidence: 0.901393919166667

00:33:36.030 --> 00:33:37.410
The code you're going to see

NOTE Confidence: 0.901393919166667

00:33:37.410 --> 00:33:39.204
I'm going to give you so you can

NOTE Confidence: 0.901393919166667

00:33:39.204 --> 00:33:40.718
just take it away and make any

NOTE Confidence: 0.901393919166667

00:33:40.718 --> 00:33:42.335
kind of game that you would like.

NOTE Confidence: 0.901393919166667

00:33:42.340 --> 00:33:44.811
To find out more about this go

NOTE Confidence: 0.901393919166667

00:33:44.811 --> 00:33:46.510
to Codeplex Farseer physics.

NOTE Confidence: 0.901393919166667

00:33:46.510 --> 00:33:48.270
They've made a version 3,

NOTE Confidence: 0.901393919166667

00:33:48.270 --> 00:33:49.656
but I'm using version 2 because

NOTE Confidence: 0.901393919166667

00:33:49.656 --> 00:33:51.522
I got that to work with the phone

NOTE Confidence: 0.901393919166667

00:33:51.522 --> 00:33:53.374
and it makes me kind of happy if

NOTE Confidence: 0.901393919166667

00:33:53.374 --> 00:33:54.790
you want to start with version

NOTE Confidence: 0.901393919166667

00:33:54.790 --> 00:33:58.058
2 then just take my code.

NOTE Confidence: 0.901393919166667

00:33:58.060 --> 00:33:59.585
Robmiles.com/demos and pull it down

NOTE Confidence: 0.901393919166667

00:33:59.585 --> 00:34:02.540
and use it, and I made a support.

NOTE Confidence: 0.901393919166667

00:34:02.540 --> 00:34:03.400
This isn't cheese based,

NOTE Confidence: 0.901393919166667

00:34:03.400 --> 00:34:04.475
which is kind of worrying.

NOTE Confidence: 0.901393919166667

00:34:04.480 --> 00:34:06.455
It's basically a very simple

NOTE Confidence: 0.901393919166667

00:34:06.455 --> 00:34:07.640
destruction golf game.

NOTE Confidence: 0.901393919166667

00:34:07.640 --> 00:34:10.152
Few few last year we had a student

NOTE Confidence: 0.901393919166667

00:34:10.152 --> 00:34:11.254
programming competition and I

NOTE Confidence: 0.901393919166667

00:34:11.254 --> 00:34:12.676
gave the students some code to

NOTE Confidence: 0.901393919166667

00:34:12.676 --> 00:34:14.408
play with and I said that the name

NOTE Confidence: 0.901393919166667

00:34:14.408 --> 00:34:16.140
of the game is destruction golf.

NOTE Confidence: 0.901393919166667

00:34:16.140 --> 00:34:17.598
So go away and make something.

NOTE Confidence: 0.901393919166667

00:34:17.600 --> 00:34:19.312
And 15 teams went off and had a

NOTE Confidence: 0.901393919166667

00:34:19.312 --> 00:34:21.419
go at this and one of my students,

NOTE Confidence: 0.901393919166667

00:34:21.420 --> 00:34:22.584
guy called carryovers,

NOTE Confidence: 0.901393919166667

00:34:22.584 --> 00:34:24.524
took my description golf course

NOTE Confidence: 0.901393919166667

00:34:24.524 --> 00:34:26.518
code made a couple of levels,

NOTE Confidence: 0.901393919166667

00:34:26.520 --> 00:34:28.770
slapped it on Windows Phone marketplace.

NOTE Confidence: 0.901393919166667

00:34:28.770 --> 00:34:31.830
He's had well over 10,000 downloads.

NOTE Confidence: 0.901393919166667

00:34:31.830 --> 00:34:34.022
It had a lot more than I've had

NOTE Confidence: 0.901393919166667

00:34:34.022 --> 00:34:35.468
with any of my games.

NOTE Confidence: 0.901393919166667

00:34:35.470 --> 00:34:36.283
She's been depressing,

NOTE Confidence: 0.901393919166667

00:34:36.283 --> 00:34:37.367
but there you go,

NOTE Confidence: 0.901393919166667

00:34:37.370 --> 00:34:39.519
so there's a nice sort of trajectory

NOTE Confidence: 0.901393919166667

00:34:39.519 --> 00:34:41.150
there which you can follow.

NOTE Confidence: 0.901393919166667

00:34:41.150 --> 00:34:42.566
But the idea is that effectively

NOTE Confidence: 0.901393919166667

00:34:42.566 --> 00:34:44.311
I'm going to put some objects into

NOTE Confidence: 0.901393919166667

00:34:44.311 --> 00:34:45.811
my physics engine and it will

NOTE Confidence: 0.901393919166667

00:34:45.811 --> 00:34:47.707
look after where they are and what

NOTE Confidence: 0.901393919166667

00:34:47.707 --> 00:34:49.182
happens when they collide and it

NOTE Confidence: 0.901393919166667

00:34:49.182 --> 00:34:50.830
all goes as though by magic and as

NOTE Confidence: 0.901393919166667

00:34:50.889 --> 00:34:52.049
far as we're concerned,

NOTE Confidence: 0.901393919166667

00:34:52.050 --> 00:34:54.234
a couple more things to learn

NOTE Confidence: 0.901393919166667

00:34:54.234 --> 00:34:56.358
bodies and geometries and then all

NOTE Confidence: 0.901393919166667

00:34:56.358 --> 00:34:58.654
the hard work is taken away from

NOTE Confidence: 0.901393919166667

00:34:58.654 --> 00:35:00.770
us and it all just works.

NOTE Confidence: 0.901393919166667

00:35:00.770 --> 00:35:03.209
It binds itself into XNA and then off it

NOTE Confidence: 0.901393919166667

00:35:03.209 --> 00:35:05.467
goes we create ourselves a simulator.

NOTE Confidence: 0.901393919166667

00:35:05.470 --> 00:35:08.980
There it is the vector.

NOTE Confidence: 0.901393919166667

00:35:08.980 --> 00:35:12.662
A value of X&amp;amp;Y gives the direction

NOTE Confidence: 0.901393919166667

00:35:12.662 --> 00:35:13.714
of gravity.

NOTE Confidence: 0.901393919166667

00:35:13.720 --> 00:35:15.800
So this particular golf game

NOTE Confidence: 0.901393919166667

00:35:15.800 --> 00:35:17.880
is being played with no

NOTE Confidence: 0.951991902727273

00:35:17.960 --> 00:35:19.915
headwinds, no X value,

NOTE Confidence: 0.951991902727273

00:35:19.915 --> 00:35:21.816
and the gravity of 250,

NOTE Confidence: 0.951991902727273

00:35:21.816 --> 00:35:23.596
which is pulling things down.

NOTE Confidence: 0.951991902727273

00:35:23.600 --> 00:35:24.758
If you want to play around.

NOTE Confidence: 0.951991902727273

00:35:24.760 --> 00:35:27.341
If your golf game underwater where

NOTE Confidence: 0.951991902727273

00:35:27.341 --> 00:35:29.868
stuff goes up, then on the moon

NOTE Confidence: 0.951991902727273

00:35:29.870 --> 00:35:31.860
just change that value there,

NOTE Confidence: 0.951991902727273

00:35:31.860 --> 00:35:33.810
make it minus 250 and the ball will now go

NOTE Confidence: 0.951991902727273

00:35:33.860 --> 00:35:35.716
towards top of screen was on the bottom,

NOTE Confidence: 0.951991902727273

00:35:35.720 --> 00:35:36.700
which is kind of fun.

NOTE Confidence: 0.951991902727273

00:35:36.700 --> 00:35:39.208
You can play with these things.

NOTE Confidence: 0.951991902727273

00:35:39.210 --> 00:35:40.566
But as far as I'm concerned,

NOTE Confidence: 0.951991902727273

00:35:40.570 --> 00:35:42.340
first round, keep it simple.

NOTE Confidence: 0.951991902727273

00:35:42.340 --> 00:35:45.544
Gravity goes down and there's no no no wind.

NOTE Confidence: 0.951991902727273

00:35:45.550 --> 00:35:48.736
OK, absolutely fine, so here's my.

NOTE Confidence: 0.951991902727273

00:35:48.740 --> 00:35:50.819
Stuff to make it all go effectively.

NOTE Confidence: 0.951991902727273

00:35:50.820 --> 00:35:53.879
I've got a texture for my shelf,

NOTE Confidence: 0.951991902727273

00:35:53.880 --> 00:35:57.247
a texture for a a body and

NOTE Confidence: 0.951991902727273

00:35:57.247 --> 00:36:00.099
a geometry and a position.

NOTE Confidence: 0.951991902727273

00:36:00.100 --> 00:36:01.724
And these are things I'm going to

NOTE Confidence: 0.951991902727273

00:36:01.724 --> 00:36:03.637
use to place in my Farseer universe.

NOTE Confidence: 0.951991902727273

00:36:03.640 --> 00:36:05.764
The way that destruction golf version

NOTE Confidence: 0.951991902727273

00:36:05.764 --> 00:36:08.048
nought works is that I have to

NOTE Confidence: 0.951991902727273

00:36:08.048 --> 00:36:09.924
knock things off shelves to get my

NOTE Confidence: 0.951991902727273

00:36:09.993 --> 00:36:12.065
ball into place for the next shot.

NOTE Confidence: 0.951991902727273

00:36:12.070 --> 00:36:14.240
So I'm going to place my little

NOTE Confidence: 0.951991902727273

00:36:14.240 --> 00:36:15.170
target and oh.

NOTE Confidence: 0.951991902727273

00:36:15.170 --> 00:36:17.300
I've done some really impressive

NOTE Confidence: 0.951991902727273

00:36:17.300 --> 00:36:19.762
graphics for this. Took me ages.

NOTE Confidence: 0.951991902727273

00:36:19.762 --> 00:36:21.338
I've drawn this fantastic,

NOTE Confidence: 0.951991902727273

00:36:21.340 --> 00:36:23.279
wonderful piece of artwork for the house.

NOTE Confidence: 0.951991902727273

00:36:23.280 --> 00:36:25.256
I want you all to cheer and clap

NOTE Confidence: 0.951991902727273

00:36:25.256 --> 00:36:27.049
when you actually see just how

NOTE Confidence: 0.951991902727273

00:36:27.049 --> 00:36:29.140
good looking my my artwork is OK,

NOTE Confidence: 0.951991902727273

00:36:29.140 --> 00:36:30.708
but the house sits on a shelf

NOTE Confidence: 0.951991902727273

00:36:30.708 --> 00:36:31.859
and the ball hits it,

NOTE Confidence: 0.951991902727273

00:36:31.860 --> 00:36:32.825
knocks it off the shelf

NOTE Confidence: 0.951991902727273

00:36:32.825 --> 00:36:34.120
and on to the next level.

NOTE Confidence: 0.951991902727273

00:36:34.120 --> 00:36:37.096
That's how I'm doing. This is my shelf.

NOTE Confidence: 0.951991902727273

00:36:37.100 --> 00:36:37.988
That's my texture.

NOTE Confidence: 0.951991902727273

00:36:37.988 --> 00:36:41.148
It's just a a picture of a shelf, and that's

NOTE Confidence: 0.951991902727273

00:36:41.148 --> 00:36:44.220
where I'm going to place it on the screen.

NOTE Confidence: 0.951991902727273

00:36:44.220 --> 00:36:45.544
No, sorry, I apologize.

NOTE Confidence: 0.951991902727273

00:36:45.544 --> 00:36:47.530
That's the part of the shelf

NOTE Confidence: 0.951991902727273

00:36:47.599 --> 00:36:49.319
about which it will rotate.

NOTE Confidence: 0.951991902727273

00:36:49.320 --> 00:36:51.552
If you have an object in a physics engine,

NOTE Confidence: 0.951991902727273

00:36:51.560 --> 00:36:54.160
it will have a point about which it spins in.

NOTE Confidence: 0.951991902727273

00:36:54.160 --> 00:36:55.756
If you've done physics back at school,

NOTE Confidence: 0.951991902727273

00:36:55.760 --> 00:36:58.136
you'll know about things like center of mass,

NOTE Confidence: 0.951991902727273

00:36:58.140 --> 00:36:59.634
the point about which the mass

NOTE Confidence: 0.951991902727273

00:36:59.634 --> 00:37:01.220
of the thing appears to operate,

NOTE Confidence: 0.951991902727273

00:37:01.220 --> 00:37:03.060
that's what that is now.

NOTE Confidence: 0.951991902727273

00:37:03.060 --> 00:37:05.139
Slapped it right in the middle of my shelf.

NOTE Confidence: 0.951991902727273

00:37:05.140 --> 00:37:08.339
OK, I then made myself a shelf,

NOTE Confidence: 0.951991902727273

00:37:08.340 --> 00:37:09.940
nailed it to the wall.

NOTE Confidence: 0.951991902727273

00:37:09.940 --> 00:37:10.508
It's static,

NOTE Confidence: 0.951991902727273

00:37:10.508 --> 00:37:13.480
be so I can't move it around and placed it.

NOTE Confidence: 0.951991902727273

00:37:13.480 --> 00:37:15.776
In 3D in in my 2D space,

NOTE Confidence: 0.951991902727273

00:37:15.780 --> 00:37:16.935
on the screen and then

NOTE Confidence: 0.951991902727273

00:37:16.935 --> 00:37:18.090
add it to the simulator.

NOTE Confidence: 0.951991902727273

00:37:18.090 --> 00:37:20.916
So I now have a shelf on the screen

NOTE Confidence: 0.951991902727273

00:37:20.916 --> 00:37:22.600
wonderful and this is the geometry.

NOTE Confidence: 0.951991902727273

00:37:22.600 --> 00:37:25.967
The two things that are interesting here.

NOTE Confidence: 0.951991902727273

00:37:25.970 --> 00:37:28.280
Are the restitution coefficient I

NOTE Confidence: 0.951991902727273

00:37:28.280 --> 00:37:31.748
can't see which is how bouncy it is,

NOTE Confidence: 0.951991902727273

00:37:31.750 --> 00:37:33.254
and the friction coefficient,

NOTE Confidence: 0.951991902727273

00:37:33.254 --> 00:37:35.510
which is how slippy it is.

NOTE Confidence: 0.951991902727273

00:37:35.510 --> 00:37:37.748
And you can play with these

NOTE Confidence: 0.951991902727273

00:37:37.748 --> 00:37:38.867
addicts great fun.

NOTE Confidence: 0.951991902727273

00:37:38.870 --> 00:37:41.446
So you could have really bouncy golf

NOTE Confidence: 0.951991902727273

00:37:41.446 --> 00:37:44.290
balls in one level and really hard.

NOTE Confidence: 0.951991902727273

00:37:44.290 --> 00:37:45.554
Gulf pools in another.

NOTE Confidence: 0.951991902727273

00:37:45.554 --> 00:37:48.339
You can have stuff that you can have ice.

NOTE Confidence: 0.951991902727273

00:37:48.340 --> 00:37:49.516
You can play one round on

NOTE Confidence: 0.951991902727273

00:37:49.516 --> 00:37:50.759
ice and one round on grass,

NOTE Confidence: 0.951991902727273

00:37:50.760 --> 00:37:52.060
which is much more friction.

NOTE Confidence: 0.951991902727273

00:37:52.060 --> 00:37:53.776
E use a technical term and

NOTE Confidence: 0.951991902727273

00:37:53.776 --> 00:37:55.740
so you can play with these.

NOTE Confidence: 0.951991902727273

00:37:55.740 --> 00:37:57.950
This is what I was saying about making a game

NOTE Confidence: 0.901340074545455

00:37:58.005 --> 00:37:59.292
engine figure out what it's

NOTE Confidence: 0.901340074545455

00:37:59.292 --> 00:38:00.780
about and then playing with it.

NOTE Confidence: 0.901340074545455

00:38:00.780 --> 00:38:03.594
OK, and then I just draw myself.

NOTE Confidence: 0.901340074545455

00:38:03.600 --> 00:38:06.378
Sprite batch is my drawing machinery.

NOTE Confidence: 0.901340074545455

00:38:06.380 --> 00:38:08.000
You've seen the draw method before.

NOTE Confidence: 0.901340074545455

00:38:08.000 --> 00:38:10.541
This is a much bigger version which

NOTE Confidence: 0.901340074545455

00:38:10.541 --> 00:38:12.798
has a position and a rotation,

NOTE Confidence: 0.901340074545455

00:38:12.800 --> 00:38:13.958
and a few of the parameters.

NOTE Confidence: 0.901340074545455

00:38:13.960 --> 00:38:15.550
Again, don't worry too much

NOTE Confidence: 0.901340074545455

00:38:15.550 --> 00:38:17.500
about these just to steal them.

NOTE Confidence: 0.901340074545455

00:38:17.500 --> 00:38:20.119
Just use my code. It will work a treat.

NOTE Confidence: 0.901340074545455

00:38:20.120 --> 00:38:21.780
The shelf doesn't rotate.

NOTE Confidence: 0.901340074545455

00:38:21.780 --> 00:38:24.780
Because it's just holding up my house,

NOTE Confidence: 0.901340074545455

00:38:24.780 --> 00:38:27.335
the ball and the House will spin.

NOTE Confidence: 0.901340074545455

00:38:27.340 --> 00:38:29.605
And so here's my little house and

NOTE Confidence: 0.901340074545455

00:38:29.605 --> 00:38:30.900
I do the same thing with this.

NOTE Confidence: 0.901340074545455

00:38:30.900 --> 00:38:35.300
I give it a body. Uhm and.

NOTE Confidence: 0.901340074545455

00:38:35.300 --> 00:38:37.708
I'm giving it a mass of three,

NOTE Confidence: 0.901340074545455

00:38:37.710 --> 00:38:39.238
which again is another number you can play,

NOTE Confidence: 0.901340074545455

00:38:39.240 --> 00:38:41.034
which is kind of fun. That three.

NOTE Confidence: 0.901340074545455

00:38:41.034 --> 00:38:42.973
There is how heavy my house is.

NOTE Confidence: 0.901340074545455

00:38:42.980 --> 00:38:44.400
Make the house really light.

NOTE Confidence: 0.901340074545455

00:38:44.400 --> 00:38:46.017
The ball will just blow it away.

NOTE Confidence: 0.901340074545455

00:38:46.020 --> 00:38:47.220
Can make the house really heavy.

NOTE Confidence: 0.901340074545455

00:38:47.220 --> 00:38:48.120
The ball will bounce off it,

NOTE Confidence: 0.901340074545455

00:38:48.120 --> 00:38:49.020
and the house won't move.

NOTE Confidence: 0.901340074545455

00:38:49.020 --> 00:38:50.497
Will play with that in a second,

NOTE Confidence: 0.901340074545455

00:38:50.500 --> 00:38:52.498
so you might want to play with these numbers.

NOTE Confidence: 0.901340074545455

00:38:52.500 --> 00:38:54.132
And then you basically put the

NOTE Confidence: 0.901340074545455

00:38:54.132 --> 00:38:55.840
ball on the screen somewhere.

NOTE Confidence: 0.901340074545455

00:38:55.840 --> 00:38:57.292
And then we're going to flick

NOTE Confidence: 0.901340074545455

00:38:57.292 --> 00:38:58.825
the ball like we've done before

NOTE Confidence: 0.901340074545455

00:38:58.825 --> 00:39:00.624
and the ball will then just start

NOTE Confidence: 0.901340074545455

00:39:00.624 --> 00:39:01.818
moving across the screen.

NOTE Confidence: 0.901340074545455

00:39:01.820 --> 00:39:04.130
And so I'm using my touch

NOTE Confidence: 0.901340074545455

00:39:04.130 --> 00:39:05.285
flick gesture again.

NOTE Confidence: 0.901340074545455

00:39:05.290 --> 00:39:06.490
And on this I'm using this

NOTE Confidence: 0.901340074545455

00:39:06.490 --> 00:39:07.290
method called apply impulse,

NOTE Confidence: 0.901340074545455

00:39:07.290 --> 00:39:08.922
which basically says kick

NOTE Confidence: 0.901340074545455

00:39:08.922 --> 00:39:10.734
it in that direction.

NOTE Confidence: 0.901340074545455

00:39:10.734 --> 00:39:13.915
I take my gesture and I fire

NOTE Confidence: 0.901340074545455

00:39:13.915 --> 00:39:16.525
the ball across the screen and.

NOTE Confidence: 0.901340074545455

00:39:16.530 --> 00:39:18.450
Little bit more before we get

NOTE Confidence: 0.901340074545455

00:39:18.450 --> 00:39:20.040
to the really exciting bit.

NOTE Confidence: 0.901340074545455

00:39:20.040 --> 00:39:22.962
Which is saying the code and

NOTE Confidence: 0.901340074545455

00:39:22.962 --> 00:39:24.423
my wonderful graphics.

NOTE Confidence: 0.901340074545455

00:39:24.430 --> 00:39:26.668
When two things hit each other,

NOTE Confidence: 0.901340074545455

00:39:26.670 --> 00:39:29.514
you want your program to be told about them.

NOTE Confidence: 0.901340074545455

00:39:29.520 --> 00:39:31.936
And so I can bind to collision events,

NOTE Confidence: 0.901340074545455

00:39:31.940 --> 00:39:33.480
which the objects will fire

NOTE Confidence: 0.901340074545455

00:39:33.480 --> 00:39:35.020
when they hit each other.

NOTE Confidence: 0.901340074545455

00:39:35.020 --> 00:39:36.460
So what I can do now is I can

NOTE Confidence: 0.901340074545455

00:39:36.460 --> 00:39:38.008
get my game to do something when

NOTE Confidence: 0.901340074545455

00:39:38.008 --> 00:39:39.547
the ball hits the house and what

NOTE Confidence: 0.901340074545455

00:39:39.547 --> 00:39:40.940
I wanted to do is go bang.

NOTE Confidence: 0.901340074545455

00:39:40.940 --> 00:39:45.636
So I've got a method here which effectively.

NOTE Confidence: 0.901340074545455

00:39:45.640 --> 00:39:47.698
Handles that and here it is.

NOTE Confidence: 0.901340074545455

00:39:47.700 --> 00:39:49.356
And what happens here is that

NOTE Confidence: 0.901340074545455

00:39:49.356 --> 00:39:50.460
the method gets told.

NOTE Confidence: 0.901340074545455

00:39:50.460 --> 00:39:52.836
The two things that have collided.

NOTE Confidence: 0.901340074545455

00:39:52.840 --> 00:39:55.256
And a list of all the contact points.

NOTE Confidence: 0.901340074545455

00:39:55.260 --> 00:39:57.816
I don't really care about that.

NOTE Confidence: 0.901340074545455

00:39:57.820 --> 00:40:00.556
I just go OK if you're playing a sound,

NOTE Confidence: 0.901340074545455

00:40:00.560 --> 00:40:02.414
don't do anything.

NOTE Confidence: 0.901340074545455

00:40:02.414 --> 00:40:05.504
If I've hit the shelf.

NOTE Confidence: 0.901340074545455

00:40:05.510 --> 00:40:07.898
Don't do anything.

NOTE Confidence: 0.901340074545455

00:40:07.900 --> 00:40:08.393
Otherwise,

NOTE Confidence: 0.901340074545455

00:40:08.393 --> 00:40:13.430
set the sound active to true and play a bang.

NOTE Confidence: 0.901340074545455

00:40:13.430 --> 00:40:15.089
And this is all my code that

NOTE Confidence: 0.901340074545455

00:40:15.089 --> 00:40:16.319
effectively just deals with the

NOTE Confidence: 0.901340074545455

00:40:16.319 --> 00:40:17.950
father when the ball hits the house.

NOTE Confidence: 0.901340074545455

00:40:17.950 --> 00:40:19.960
I wanna hear an explosion.

NOTE Confidence: 0.901340074545455

00:40:19.960 --> 00:40:21.298
Now you could do other things.

NOTE Confidence: 0.901340074545455

00:40:21.300 --> 00:40:23.180
You could increase the score.

NOTE Confidence: 0.901340074545455

00:40:23.180 --> 00:40:24.740
You could you could increase.

NOTE Confidence: 0.901340074545455

00:40:24.740 --> 00:40:26.658
You could knock a life off the

NOTE Confidence: 0.901340074545455

00:40:26.658 --> 00:40:28.242
alien because you've hit the alien

NOTE Confidence: 0.901340074545455

00:40:28.242 --> 00:40:30.172
one time and and all that kind of

NOTE Confidence: 0.901340074545455

00:40:30.172 --> 00:40:31.932
stuff so you can do what you like.

NOTE Confidence: 0.901340074545455

00:40:31.940 --> 00:40:34.512
But all I'm doing is going bang because

NOTE Confidence: 0.901340074545455

00:40:34.512 --> 00:40:36.976
that's what my coach should do and.

NOTE Confidence: 0.901340074545455

00:40:36.980 --> 00:40:37.718
There you go,

NOTE Confidence: 0.901340074545455

00:40:37.718 --> 00:40:38.456
that's what the.

NOTE Confidence: 0.885722685

00:40:38.460 --> 00:40:39.618
That's what that slides on about.

NOTE Confidence: 0.885722685

00:40:39.620 --> 00:40:41.538
Really, we're just not playing the sound.

NOTE Confidence: 0.885722685

00:40:41.540 --> 00:40:43.900
If we hit the house and hit the

NOTE Confidence: 0.885722685

00:40:43.900 --> 00:40:46.006
house and then final thing before

NOTE Confidence: 0.885722685

00:40:46.006 --> 00:40:48.889
we get to see my wonderful clip art.

NOTE Confidence: 0.885722685

00:40:48.890 --> 00:40:51.340
We have to update our simulator and

NOTE Confidence: 0.885722685

00:40:51.340 --> 00:40:53.475
again these numbers are numbers that

NOTE Confidence: 0.885722685

00:40:53.475 --> 00:40:55.841
I've got from playing with that seem

NOTE Confidence: 0.885722685

00:40:55.904 --> 00:40:58.196
to actually quite work quite nicely,

NOTE Confidence: 0.885722685

00:40:58.200 --> 00:41:00.189
and so for the purposes of my program these

NOTE Confidence: 0.885722685

00:41:00.189 --> 00:41:01.968
values at that point nought point nought.

NOTE Confidence: 0.885722685

00:41:01.970 --> 00:41:03.770
Nought 5 seems to work OK,

NOTE Confidence: 0.885722685

00:41:03.770 --> 00:41:05.546
there are weird things with physics

NOTE Confidence: 0.885722685

00:41:05.546 --> 00:41:07.335
engines if you get things stuck

NOTE Confidence: 0.885722685

00:41:07.335 --> 00:41:09.527
inside things that can go a bit nuts.

NOTE Confidence: 0.885722685

00:41:09.530 --> 00:41:10.832
So you have to play with these

NOTE Confidence: 0.885722685

00:41:10.832 --> 00:41:11.989
numbers a little bit carefully,

NOTE Confidence: 0.885722685

00:41:11.990 --> 00:41:13.838
but I've got them to a point where

NOTE Confidence: 0.885722685

00:41:13.838 --> 00:41:15.714
they make a game which is kind of

NOTE Confidence: 0.885722685

00:41:15.714 --> 00:41:17.866
playable and a good starting point OK.

NOTE Confidence: 0.885722685

00:41:17.866 --> 00:41:21.058
Building up the tension even more exciting.

NOTE Confidence: 0.710781394285714

00:41:23.240 --> 00:41:25.137
If you ever take a golf game,

NOTE Confidence: 0.710781394285714

00:41:25.140 --> 00:41:26.880
you find that actually you don't

NOTE Confidence: 0.710781394285714

00:41:26.880 --> 00:41:28.900
just use the width of the screen,

NOTE Confidence: 0.710781394285714

00:41:28.900 --> 00:41:31.497
you use a sort of scrolling screen.

NOTE Confidence: 0.710781394285714

00:41:31.500 --> 00:41:32.904
OK, so you fire things and

NOTE Confidence: 0.710781394285714

00:41:32.904 --> 00:41:34.748
they go off the screen and the

NOTE Confidence: 0.710781394285714

00:41:34.748 --> 00:41:36.452
screen then scrolls to keep up.

NOTE Confidence: 0.710781394285714

00:41:36.460 --> 00:41:37.828
I do that here.

NOTE Confidence: 0.710781394285714

00:41:37.828 --> 00:41:40.987
What I'm saying here is that if the ball

NOTE Confidence: 0.710781394285714

00:41:40.987 --> 00:41:43.850
starts to get off the right hand edge.

NOTE Confidence: 0.710781394285714

00:41:43.850 --> 00:41:46.118
As the words, if the X position plus my

NOTE Confidence: 0.710781394285714

00:41:46.118 --> 00:41:48.190
scroll margin is bigger than the width,

NOTE Confidence: 0.710781394285714

00:41:48.190 --> 00:41:51.221
then I just create an offset value

NOTE Confidence: 0.710781394285714

00:41:51.221 --> 00:41:53.710
which is effectively taking my ball

NOTE Confidence: 0.710781394285714

00:41:53.710 --> 00:41:56.770
and my margin and I'm going to push the

NOTE Confidence: 0.710781394285714

00:41:56.770 --> 00:41:59.485
screen across to track the ball again.

NOTE Confidence: 0.710781394285714

00:41:59.490 --> 00:42:01.930
Don't worry too much about the code because

NOTE Confidence: 0.710781394285714

00:42:01.930 --> 00:42:04.149
the program shows this very effectively,

NOTE Confidence: 0.710781394285714

00:42:04.150 --> 00:42:05.608
but that's the next thing which you can do.

NOTE Confidence: 0.710781394285714

00:42:05.610 --> 00:42:06.998
Having done that is,

NOTE Confidence: 0.710781394285714

00:42:06.998 --> 00:42:08.733
you can create a transformation

NOTE Confidence: 0.710781394285714

00:42:08.733 --> 00:42:10.881
matrix which is basically a lump

NOTE Confidence: 0.710781394285714

00:42:10.881 --> 00:42:12.616
of data which describes something

NOTE Confidence: 0.710781394285714

00:42:12.681 --> 00:42:14.389
you want to do with an image.

NOTE Confidence: 0.710781394285714

00:42:14.390 --> 00:42:16.250
And I'm just making one,

NOTE Confidence: 0.710781394285714

00:42:16.250 --> 00:42:18.434
which is a translation of the value of

NOTE Confidence: 0.710781394285714

00:42:18.434 --> 00:42:20.876
X and then nothing in Y and nothing in

NOTE Confidence: 0.710781394285714

00:42:20.876 --> 00:42:23.176
Z and one of the nice things you can

NOTE Confidence: 0.710781394285714

00:42:23.176 --> 00:42:25.786
do in XNA is you can transform your

NOTE Confidence: 0.710781394285714

00:42:25.786 --> 00:42:28.650
drawing operation using a matrix like this.

NOTE Confidence: 0.710781394285714

00:42:28.650 --> 00:42:31.160
Now that means if you want a game with a

NOTE Confidence: 0.710781394285714

00:42:31.231 --> 00:42:33.745
playfield that's bigger than the screen.

NOTE Confidence: 0.710781394285714

00:42:33.750 --> 00:42:37.915
Then absolutely make a great big texture.

NOTE Confidence: 0.710781394285714

00:42:37.920 --> 00:42:41.832
And then just move the viewport

NOTE Confidence: 0.710781394285714

00:42:41.832 --> 00:42:43.788
around within that.

NOTE Confidence: 0.710781394285714

00:42:43.790 --> 00:42:46.086
And you can do that just by using

NOTE Confidence: 0.710781394285714

00:42:46.086 --> 00:42:47.640
this transformation matrix technique.

NOTE Confidence: 0.710781394285714

00:42:47.640 --> 00:42:49.530
I'm only scrolling to the left.

NOTE Confidence: 0.710781394285714

00:42:49.530 --> 00:42:51.504
I have a long thin texture which

NOTE Confidence: 0.710781394285714

00:42:51.504 --> 00:42:53.229
I'm going to move through,

NOTE Confidence: 0.710781394285714

00:42:53.230 --> 00:42:56.523
but you can go either way and that's the

NOTE Confidence: 0.710781394285714

00:42:56.523 --> 00:42:59.178
drawing with transformations which I've.

NOTE Confidence: 0.710781394285714

00:42:59.180 --> 00:43:00.698
When you begin the drawing message,

NOTE Confidence: 0.710781394285714

00:43:00.700 --> 00:43:03.388
you just say, OK, there's my matrix.

NOTE Confidence: 0.710781394285714

00:43:03.390 --> 00:43:05.218
There's my transformation there.

NOTE Confidence: 0.710781394285714

00:43:05.218 --> 00:43:09.400
Just do that. And finally, there's my house.

NOTE Confidence: 0.710781394285714

00:43:09.400 --> 00:43:13.860
Isn't that amazing? Yes.

NOTE Confidence: 0.710781394285714

00:43:13.860 --> 00:43:15.354
You're gonna want to see it work now though,

NOTE Confidence: 0.710781394285714

00:43:15.360 --> 00:43:17.800
which is a scary bit.

NOTE Confidence: 0.710781394285714

00:43:17.800 --> 00:43:19.111
So Chief smash,

NOTE Confidence: 0.710781394285714

00:43:19.111 --> 00:43:22.039
I put cheese in the name because

NOTE Confidence: 0.710781394285714

00:43:22.039 --> 00:43:23.833
I was thinking I've gotta start

NOTE Confidence: 0.710781394285714

00:43:23.833 --> 00:43:25.620
firing bits of cheese at this.

NOTE Confidence: 0.710781394285714

00:43:25.620 --> 00:43:27.918
So I could actually do that,

NOTE Confidence: 0.710781394285714

00:43:27.920 --> 00:43:31.260
but I'll just target the.

NOTE Confidence: 0.710781394285714

00:43:31.260 --> 00:43:32.930
Output to the emulator and

NOTE Confidence: 0.710781394285714

00:43:32.930 --> 00:43:34.600
I'll file the game up.

NOTE Confidence: 0.710781394285714

00:43:34.600 --> 00:43:37.008
Now everything you're seeing.

NOTE Confidence: 0.710781394285714

00:43:37.010 --> 00:43:39.566
Is the same code that I've.

NOTE Confidence: 0.710781394285714

00:43:39.570 --> 00:43:43.186
Shown you in the talk at.

NOTE Confidence: 0.710781394285714

00:43:43.186 --> 00:43:44.770
Oh wow, I got.

NOTE Confidence: 0.710781394285714

00:43:44.770 --> 00:43:46.957
I got a message my phone is funny and

NOTE Confidence: 0.710781394285714

00:43:46.957 --> 00:43:48.998
this is basically destruction golf.

NOTE Confidence: 0.710781394285714

00:43:49.000 --> 00:43:52.000
OK now the idea is I can flick my ball.

NOTE Confidence: 0.710781394285714

00:43:52.000 --> 00:43:53.500
You know?

NOTE Confidence: 0.710781394285714

00:43:53.500 --> 00:43:55.669
Flick my ball.

NOTE Confidence: 0.710781394285714

00:43:55.670 --> 00:43:57.790
I'm blow the house off the roof and then my

NOTE Confidence: 0.710781394285714

00:43:57.845 --> 00:44:00.068
ball just goes down there and then it resets.

NOTE Confidence: 0.710781394285714

00:44:00.070 --> 00:44:00.988
So the idea is the game.

NOTE Confidence: 0.710781394285714

00:44:00.990 --> 00:44:02.590
The play will actually not quite do that.

NOTE Confidence: 0.710781394285714

00:44:02.590 --> 00:44:04.494
If I go a bit more gently.

NOTE Confidence: 0.710781394285714

00:44:04.500 --> 00:44:05.949
And I can actually blow the house.

NOTE Confidence: 0.710781394285714

00:44:05.950 --> 00:44:07.542
The ball will come down in a minute

NOTE Confidence: 0.710781394285714

00:44:07.542 --> 00:44:09.181
and the way I got the game written

NOTE Confidence: 0.710781394285714

00:44:09.181 --> 00:44:10.892
is when the ball comes back down and

NOTE Confidence: 0.710781394285714

00:44:10.892 --> 00:44:12.411
falls off the bottom of the screen.

NOTE Confidence: 0.710781394285714

00:44:12.411 --> 00:44:13.044
Come on down,

NOTE Confidence: 0.710781394285714

00:44:13.044 --> 00:44:13.677
there you go,

NOTE Confidence: 0.77214597

00:44:13.680 --> 00:44:15.520
we bump, it resets.

NOTE Confidence: 0.77214597

00:44:15.520 --> 00:44:19.529
And my house stops back into position so.

NOTE Confidence: 0.77214597

00:44:19.530 --> 00:44:21.486
One little thing you notice about

NOTE Confidence: 0.77214597

00:44:21.486 --> 00:44:23.880
physics based games you don't want to

NOTE Confidence: 0.77214597

00:44:23.880 --> 00:44:25.595
have things starting off touching.

NOTE Confidence: 0.77214597

00:44:25.600 --> 00:44:27.336
You have to have things slightly separate.

NOTE Confidence: 0.77214597

00:44:27.340 --> 00:44:28.540
Have them drop into place,

NOTE Confidence: 0.77214597

00:44:28.540 --> 00:44:29.640
that's what my program does.

NOTE Confidence: 0.77214597

00:44:29.640 --> 00:44:33.120
So the idea is if I get this just right.

NOTE Confidence: 0.77214597

00:44:33.120 --> 00:44:36.748
And I haven't asked.

NOTE Confidence: 0.77214597

00:44:36.750 --> 00:44:39.110
Rubbish, so now it goes all the way

NOTE Confidence: 0.77214597

00:44:39.110 --> 00:44:41.486
and I'm scrolling happily off my and

NOTE Confidence: 0.77214597

00:44:41.486 --> 00:44:43.726
I guess what happens there people and

NOTE Confidence: 0.77214597

00:44:43.726 --> 00:44:45.769
then I then obviously falta screen.

NOTE Confidence: 0.77214597

00:44:45.770 --> 00:44:47.800
Let's try it again a bit more

NOTE Confidence: 0.77214597

00:44:47.800 --> 00:44:49.486
gently so doing that's rubbish too.

NOTE Confidence: 0.77214597

00:44:49.486 --> 00:44:53.320
It's gonna fail as well so don't drink.

NOTE Confidence: 0.77214597

00:44:53.320 --> 00:44:55.378
Effect, the idea is then you see,

NOTE Confidence: 0.77214597

00:44:55.380 --> 00:44:57.138
there's another level further up and

NOTE Confidence: 0.77214597

00:44:57.138 --> 00:44:59.533
I then flick the ball at that one and

NOTE Confidence: 0.77214597

00:44:59.533 --> 00:45:01.503
I work my way through and it doesn't

NOTE Confidence: 0.77214597

00:45:01.503 --> 00:45:05.490
look a bit like Angry Birds at all really.

NOTE Confidence: 0.77214597

00:45:05.490 --> 00:45:07.130
But the bottom line is,

NOTE Confidence: 0.77214597

00:45:07.130 --> 00:45:09.066
if you wanted to make something which looked

NOTE Confidence: 0.77214597

00:45:09.066 --> 00:45:11.210
a bit like this and worked in this way,

NOTE Confidence: 0.77214597

00:45:11.210 --> 00:45:13.570
you've got all the code.

NOTE Confidence: 0.77214597

00:45:13.570 --> 00:45:15.346
All you need is more assets.

NOTE Confidence: 0.77214597

00:45:15.350 --> 00:45:18.234
Make a few more bodies and drop

NOTE Confidence: 0.77214597

00:45:18.234 --> 00:45:20.233
them in at the moment.

NOTE Confidence: 0.77214597

00:45:20.233 --> 00:45:22.188
I've only got three things.

NOTE Confidence: 0.77214597

00:45:22.190 --> 00:45:24.206
The ball, the house and the shelf,

NOTE Confidence: 0.77214597

00:45:24.210 --> 00:45:25.983
but you can have as many as you like.

NOTE Confidence: 0.77214597

00:45:25.990 --> 00:45:28.050
I got up to 40 or 50 objects on the

NOTE Confidence: 0.77214597

00:45:28.112 --> 00:45:30.170
screen of the phone bouncing off each

NOTE Confidence: 0.77214597

00:45:30.170 --> 00:45:32.710
other and it actually works very nicely.

NOTE Confidence: 0.77214597

00:45:32.710 --> 00:45:35.210
One of the things I made and I

NOTE Confidence: 0.77214597

00:45:35.210 --> 00:45:36.820
actually had this running on the Zune

NOTE Confidence: 0.77214597

00:45:36.820 --> 00:45:38.454
of all thinking because the Zune

NOTE Confidence: 0.77214597

00:45:38.454 --> 00:45:40.521
supports XNA as well and version 3.1.

NOTE Confidence: 0.77214597

00:45:40.521 --> 00:45:40.832
Unfortunately,

NOTE Confidence: 0.77214597

00:45:40.832 --> 00:45:43.009
I had about 26 Scrabble tiles at

NOTE Confidence: 0.77214597

00:45:43.009 --> 00:45:45.008
the tiles falling down and bouncing

NOTE Confidence: 0.77214597

00:45:45.008 --> 00:45:45.986
off each other,

NOTE Confidence: 0.77214597

00:45:45.990 --> 00:45:47.690
and all work extremely nicely.

NOTE Confidence: 0.77214597

00:45:47.690 --> 00:45:49.237
So there's all kinds of places you

NOTE Confidence: 0.77214597

00:45:49.237 --> 00:45:51.057
can use a little bit of physics.

NOTE Confidence: 0.77214597

00:45:51.060 --> 00:45:52.270
To make things more interesting,

NOTE Confidence: 0.77214597

00:45:52.270 --> 00:45:53.560
but I kind of like this.

NOTE Confidence: 0.7270174775

00:45:55.760 --> 00:45:57.242
Except that that do anything so

NOTE Confidence: 0.7270174775

00:45:57.242 --> 00:45:58.710
I missed against one more try.

NOTE Confidence: 0.921196564

00:46:00.780 --> 00:46:03.460
And as I said, you can fiddle with the mass.

NOTE Confidence: 0.921196564

00:46:03.460 --> 00:46:04.604
And the restitution coefficient

NOTE Confidence: 0.921196564

00:46:04.604 --> 00:46:06.680
and all that kind of good stuff.

NOTE Confidence: 0.921196564

00:46:06.680 --> 00:46:08.864
And your program can of course use the

NOTE Confidence: 0.921196564

00:46:08.864 --> 00:46:11.279
position of things to decide what to do next.

NOTE Confidence: 0.921196564

00:46:11.280 --> 00:46:13.520
So if my ball stops on that thing,

NOTE Confidence: 0.921196564

00:46:13.520 --> 00:46:14.490
then I go level up.

NOTE Confidence: 0.921196564

00:46:14.490 --> 00:46:15.795
I mean move on to the next one and

NOTE Confidence: 0.921196564

00:46:15.795 --> 00:46:17.378
the next one, and the next one.

NOTE Confidence: 0.921196564

00:46:17.378 --> 00:46:19.997
But feel free to take the code mess

NOTE Confidence: 0.921196564

00:46:19.997 --> 00:46:21.936
around with it, do what you like,

NOTE Confidence: 0.921196564

00:46:21.940 --> 00:46:23.662
because it's all just there for you

NOTE Confidence: 0.921196564

00:46:23.662 --> 00:46:27.040
to play with, so I'll stop that.

NOTE Confidence: 0.921196564

00:46:27.040 --> 00:46:28.444
Using the stop button that will

NOTE Confidence: 0.921196564

00:46:28.444 --> 00:46:30.538
work better off and go back to my

NOTE Confidence: 0.921196564

00:46:30.538 --> 00:46:31.918
presentation so you've seen destruction,

NOTE Confidence: 0.921196564

00:46:31.920 --> 00:46:33.348
golf and even clapped.

NOTE Confidence: 0.921196564

00:46:33.348 --> 00:46:34.776
Thank you very much.

NOTE Confidence: 0.921196564

00:46:34.780 --> 00:46:35.638
That was lovely.

NOTE Confidence: 0.921196564

00:46:35.638 --> 00:46:37.640
So final thing I want to mention,

NOTE Confidence: 0.921196564

00:46:37.640 --> 00:46:39.194
while two more things actually so

NOTE Confidence: 0.921196564

00:46:39.194 --> 00:46:40.739
one of them can't be final,

NOTE Confidence: 0.921196564

00:46:40.740 --> 00:46:41.709
can it anyway?

NOTE Confidence: 0.9141487

00:46:45.310 --> 00:46:48.624
Yeah. I've decided to

NOTE Confidence: 0.9141487

00:46:48.624 --> 00:46:50.176
make some musical bread,

NOTE Confidence: 0.9141487

00:46:50.180 --> 00:46:53.099
but I've got the dough so far.

NOTE Confidence: 0.9141487

00:46:53.100 --> 00:46:56.619
OK right fine. Look at the dose so far.

NOTE Confidence: 0.9141487

00:46:56.620 --> 00:47:01.410
Yes the phone accelerometer OK.

NOTE Confidence: 0.9141487

00:47:01.410 --> 00:47:03.096
This is how you get input

NOTE Confidence: 0.9141487

00:47:03.096 --> 00:47:04.810
to your game from tipping.

NOTE Confidence: 0.9141487

00:47:04.810 --> 00:47:06.987
We've seen how we can use gestures.

NOTE Confidence: 0.9141487

00:47:06.990 --> 00:47:08.942
They're very easy to use and what I

NOTE Confidence: 0.9141487

00:47:08.942 --> 00:47:10.994
want to do now is show you how you

NOTE Confidence: 0.9141487

00:47:10.994 --> 00:47:12.995
can use the tipping motion of the

NOTE Confidence: 0.9141487

00:47:12.995 --> 00:47:14.933
phone to actually control the game.

NOTE Confidence: 0.9141487

00:47:14.940 --> 00:47:17.268
And this means we have to use the

NOTE Confidence: 0.9141487

00:47:17.268 --> 00:47:19.646
built in accelerometer now that gives

NOTE Confidence: 0.9141487

00:47:19.646 --> 00:47:22.440
you acceleration values in XY and Z.

NOTE Confidence: 0.9141487

00:47:22.440 --> 00:47:24.804
OK, when you hold the phone

NOTE Confidence: 0.9141487

00:47:24.804 --> 00:47:26.986
horizontally like that then you can

NOTE Confidence: 0.9141487

00:47:26.986 --> 00:47:30.338
imagine a lead weight on a on a piece

NOTE Confidence: 0.9141487

00:47:30.338 --> 00:47:32.708
of string hanging down underneath.

NOTE Confidence: 0.9141487

00:47:32.710 --> 00:47:36.850
And so the phone at rest in portrait mode,

NOTE Confidence: 0.9141487

00:47:36.850 --> 00:47:38.550
has acceleration of naughty necks,

NOTE Confidence: 0.9141487

00:47:38.550 --> 00:47:41.777
naughtin Y and minus one in Z.

NOTE Confidence: 0.9141487

00:47:41.780 --> 00:47:43.271
And as you tip the phone and

NOTE Confidence: 0.9141487

00:47:43.271 --> 00:47:44.350
the way it swings,

NOTE Confidence: 0.9141487

00:47:44.350 --> 00:47:46.774
you can kind of visualize what happens to

NOTE Confidence: 0.9141487

00:47:46.774 --> 00:47:49.010
the position of this thing in three days.

NOTE Confidence: 0.9141487

00:47:49.010 --> 00:47:51.845
I tip it up once the phone is vertical.

NOTE Confidence: 0.9141487

00:47:51.850 --> 00:47:55.442
I've now got minus one in Y and

NOTE Confidence: 0.9141487

00:47:55.442 --> 00:47:58.506
zero in X&amp;amp;Z and so effectively you

NOTE Confidence: 0.9141487

00:47:58.506 --> 00:48:00.978
can use this to actually measure

NOTE Confidence: 0.9141487

00:48:00.978 --> 00:48:03.339
the orientation of the phone.

NOTE Confidence: 0.9141487

00:48:03.340 --> 00:48:05.700
As well as the acceleration,

NOTE Confidence: 0.9141487

00:48:05.700 --> 00:48:07.180
you get acceleration values

NOTE Confidence: 0.9141487

00:48:07.180 --> 00:48:09.400
when people start to shake it.

NOTE Confidence: 0.9141487

00:48:09.400 --> 00:48:11.308
You want to make a game where you shake

NOTE Confidence: 0.9141487

00:48:11.308 --> 00:48:13.300
the the phone to make something happen.

NOTE Confidence: 0.9141487

00:48:13.300 --> 00:48:15.348
There's a very good DS mini game where

NOTE Confidence: 0.9141487

00:48:15.348 --> 00:48:17.144
you have like a bottle of champagne

NOTE Confidence: 0.9141487

00:48:17.144 --> 00:48:19.389
and you take it in turns to shake it

NOTE Confidence: 0.9141487

00:48:19.389 --> 00:48:21.882
until one of you makes the pop off.

NOTE Confidence: 0.9141487

00:48:21.882 --> 00:48:23.986
If you do that.

NOTE Confidence: 0.9141487

00:48:23.990 --> 00:48:25.590
Then you start looking for

NOTE Confidence: 0.9141487

00:48:25.590 --> 00:48:27.190
acceleration values bigger than one,

NOTE Confidence: 0.9141487

00:48:27.190 --> 00:48:27.930
and I think I've got.

NOTE Confidence: 0.9141487

00:48:27.930 --> 00:48:29.407
I got up to 3G by shaking.

NOTE Confidence: 0.9141487

00:48:29.410 --> 00:48:31.021
I kind of got scared if I gotta take

NOTE Confidence: 0.9141487

00:48:31.021 --> 00:48:32.528
anyone would flap my hands and stick in

NOTE Confidence: 0.9141487

00:48:32.528 --> 00:48:34.210
the wall so I didn't get beyond three.

NOTE Confidence: 0.9141487

00:48:34.210 --> 00:48:35.746
But you can have a game where you

NOTE Confidence: 0.9141487

00:48:35.746 --> 00:48:37.256
can shake the phone as hard as you

NOTE Confidence: 0.9141487

00:48:37.256 --> 00:48:38.869
can and you can track acceleration.

NOTE Confidence: 0.9141487

00:48:38.870 --> 00:48:40.460
Value can get the magnitude of

NOTE Confidence: 0.9141487

00:48:40.460 --> 00:48:42.050
the vector and figure out how

NOTE Confidence: 0.9141487

00:48:42.050 --> 00:48:43.110
hard it's being shook,

NOTE Confidence: 0.9141487

00:48:43.110 --> 00:48:44.570
which is which is interesting,

NOTE Confidence: 0.9141487

00:48:44.570 --> 00:48:47.603
but I tend to just use it for tipping

NOTE Confidence: 0.9141487

00:48:47.603 --> 00:48:49.828
games where I've got this one.

NOTE Confidence: 0.9141487

00:48:49.828 --> 00:48:52.690
Hanging down and then as you tip it up,

NOTE Confidence: 0.9141487

00:48:52.690 --> 00:48:54.950
it changes to different axis.

NOTE Confidence: 0.9141487

00:48:54.950 --> 00:48:57.122
If you've used the XNA game

NOTE Confidence: 0.9141487

00:48:57.122 --> 00:48:59.446
pads on the PC or the Xbox,

NOTE Confidence: 0.9141487

00:48:59.450 --> 00:49:02.042
you can with a little bit of simple

NOTE Confidence: 0.9141487

00:49:02.042 --> 00:49:04.198
maths convert very easily from

NOTE Confidence: 0.9141487

00:49:04.198 --> 00:49:06.483
GamePad input to tipping input.

NOTE Confidence: 0.9141487

00:49:06.490 --> 00:49:08.866
Very easy to do so far as we're concerned.

NOTE Confidence: 0.9141487

00:49:08.870 --> 00:49:11.418
It gives us a number that tells

NOTE Confidence: 0.9141487

00:49:11.418 --> 00:49:13.528
us the orientation of the phone.

NOTE Confidence: 0.9141487

00:49:13.530 --> 00:49:14.286
Using it.

NOTE Confidence: 0.9141487

00:49:14.286 --> 00:49:17.310
Not quite as simple as we might like

NOTE Confidence: 0.9141487

00:49:17.394 --> 00:49:20.929
because unlike everything else in XNA land,

NOTE Confidence: 0.9141487

00:49:20.930 --> 00:49:23.260
the sensors are handled on

NOTE Confidence: 0.9141487

00:49:23.260 --> 00:49:25.124
an event driven basis.

NOTE Confidence: 0.9141487

00:49:25.130 --> 00:49:26.670
If you're a Silverlight

NOTE Confidence: 0.9141487

00:49:26.670 --> 00:49:28.210
programmer looking at XNA,

NOTE Confidence: 0.9141487

00:49:28.210 --> 00:49:30.744
then there's a certain amount of mental

NOTE Confidence: 0.9141487

00:49:30.744 --> 00:49:32.609
readjustment you're gonna have to make.

NOTE Confidence: 0.9141487

00:49:32.610 --> 00:49:35.389
Now the issue is that in Silverlight,

NOTE Confidence: 0.893664281111111

00:49:35.390 --> 00:49:36.978
everything happens on events.

NOTE Confidence: 0.893664281111111

00:49:36.978 --> 00:49:38.963
Stuff happens in your program,

NOTE Confidence: 0.893664281111111

00:49:38.970 --> 00:49:40.926
responds to them.

NOTE Confidence: 0.893664281111111

00:49:40.926 --> 00:49:44.670
OK, in XNA land pretty much

NOTE Confidence: 0.893664281111111

00:49:44.670 --> 00:49:46.930
everything happens by polling.

NOTE Confidence: 0.893664281111111

00:49:46.930 --> 00:49:49.690
You get called update runs,

NOTE Confidence: 0.893664281111111

00:49:49.690 --> 00:49:53.498
it goes off and looks at the state of the

NOTE Confidence: 0.893664281111111

00:49:53.498 --> 00:49:56.190
inputs and adjusts the game to suit that,

NOTE Confidence: 0.893664281111111

00:49:56.190 --> 00:49:57.282
and then you finished,

NOTE Confidence: 0.893664281111111

00:49:57.282 --> 00:49:58.920
and then you wait for awhile

NOTE Confidence: 0.893664281111111

00:49:58.976 --> 00:50:00.526
and update gets called again.

NOTE Confidence: 0.893664281111111

00:50:00.530 --> 00:50:03.708
And so there's no events as such.

NOTE Confidence: 0.893664281111111

00:50:03.710 --> 00:50:04.865
You're just repeatedly

NOTE Confidence: 0.893664281111111

00:50:04.865 --> 00:50:06.790
called in the graphics side.

NOTE Confidence: 0.893664281111111

00:50:06.790 --> 00:50:08.915
You're not worrying about moving

NOTE Confidence: 0.893664281111111

00:50:08.915 --> 00:50:11.040
things around and redrawing the

NOTE Confidence: 0.893664281111111

00:50:11.107 --> 00:50:13.627
background in the drawing side in XNA,

NOTE Confidence: 0.893664281111111

00:50:13.630 --> 00:50:15.390
you basically tear down your

NOTE Confidence: 0.893664281111111

00:50:15.390 --> 00:50:17.710
image and draw a brand new one

NOTE Confidence: 0.893664281111111

00:50:17.710 --> 00:50:19.960
every time 30 times a second,

NOTE Confidence: 0.893664281111111

00:50:19.960 --> 00:50:21.092
and that's because that's

NOTE Confidence: 0.893664281111111

00:50:21.092 --> 00:50:22.507
how the hardware likes it.

NOTE Confidence: 0.893664281111111

00:50:22.510 --> 00:50:26.540
OK, but for the accelerometer?

NOTE Confidence: 0.893664281111111

00:50:26.540 --> 00:50:29.404
At the moment you have to use the

NOTE Confidence: 0.893664281111111

00:50:29.404 --> 00:50:31.490
sensors library which comes from

NOTE Confidence: 0.893664281111111

00:50:31.490 --> 00:50:33.640
Silverlight in your XNA games,

NOTE Confidence: 0.893664281111111

00:50:33.640 --> 00:50:35.722
so you have to effectively do

NOTE Confidence: 0.893664281111111

00:50:35.722 --> 00:50:37.874
an event based piece of jiggery

NOTE Confidence: 0.893664281111111

00:50:37.874 --> 00:50:39.609
pokery to get the event.

NOTE Confidence: 0.893664281111111

00:50:39.610 --> 00:50:41.738
Fired into your game and your game

NOTE Confidence: 0.893664281111111

00:50:41.738 --> 00:50:43.889
can then use the accelerometer,

NOTE Confidence: 0.893664281111111

00:50:43.890 --> 00:50:46.242
and here's the code that we

NOTE Confidence: 0.893664281111111

00:50:46.242 --> 00:50:48.969
just have to add the sensors.

NOTE Confidence: 0.893664281111111

00:50:48.970 --> 00:50:50.562
Device to our project.

NOTE Confidence: 0.893664281111111

00:50:50.562 --> 00:50:53.298
These are all the other XNA library

NOTE Confidence: 0.893664281111111

00:50:53.298 --> 00:50:55.734
elements and then having done that I

NOTE Confidence: 0.893664281111111

00:50:55.734 --> 00:50:57.643
can then create myself accelerometer

NOTE Confidence: 0.893664281111111

00:50:57.643 --> 00:51:00.970
and then bind to the events it produces.

NOTE Confidence: 0.893664281111111

00:51:00.970 --> 00:51:02.909
OK so here we go with that.

NOTE Confidence: 0.893664281111111

00:51:02.910 --> 00:51:04.446
There's my seller ometer.

NOTE Confidence: 0.893664281111111

00:51:04.446 --> 00:51:06.750
When I get a reading changed,

NOTE Confidence: 0.893664281111111

00:51:06.750 --> 00:51:08.978
I call this method.

NOTE Confidence: 0.893664281111111

00:51:08.980 --> 00:51:12.535
And I'm sorry the layouts got a bit wibbly,

NOTE Confidence: 0.893664281111111

00:51:12.540 --> 00:51:13.735
but that's the method I'm

NOTE Confidence: 0.893664281111111

00:51:13.735 --> 00:51:15.220
going to get called each time,

NOTE Confidence: 0.893664281111111

00:51:15.220 --> 00:51:17.528
so maybe it's a limiter bind to

NOTE Confidence: 0.893664281111111

00:51:17.528 --> 00:51:19.198
the changed event started running

NOTE Confidence: 0.893664281111111

00:51:19.198 --> 00:51:21.245
and so now everytime the harbor

NOTE Confidence: 0.893664281111111

00:51:21.245 --> 00:51:23.534
in the phone gets a new value.

NOTE Confidence: 0.893664281111111

00:51:23.540 --> 00:51:25.400
It's going to actually fire my

NOTE Confidence: 0.893664281111111

00:51:25.400 --> 00:51:27.179
event to do something with it.

NOTE Confidence: 0.893664281111111

00:51:27.180 --> 00:51:27.592
OK,

NOTE Confidence: 0.893664281111111

00:51:27.592 --> 00:51:31.300
so that's easy enough and all my method does.

NOTE Confidence: 0.893664281111111

00:51:31.300 --> 00:51:35.406
Is it gets the X&amp;amp;Y&amp;amp;Z values

NOTE Confidence: 0.893664281111111

00:51:35.406 --> 00:51:37.458
out of the accelerometer.

NOTE Confidence: 0.893664281111111

00:51:37.460 --> 00:51:39.476
Here they are from the eventargs

NOTE Confidence: 0.893664281111111

00:51:39.476 --> 00:51:42.294
XY and Z cast them into float and

NOTE Confidence: 0.893664281111111

00:51:42.294 --> 00:51:44.991
then sets up a little vector which

NOTE Confidence: 0.893664281111111

00:51:44.991 --> 00:51:48.099
I'm using to pass information from

NOTE Confidence: 0.893664281111111

00:51:48.099 --> 00:51:49.653
the accelerometer eventhandler

NOTE Confidence: 0.893664281111111

00:51:49.660 --> 00:51:51.844
into my game engine and there's

NOTE Confidence: 0.893664281111111

00:51:51.844 --> 00:51:53.300
a final little wrinkle,

NOTE Confidence: 0.893664281111111

00:51:53.300 --> 00:51:56.052
which is that I use a lock because

NOTE Confidence: 0.893664281111111

00:51:56.052 --> 00:51:57.872
I don't want my accelerometer

NOTE Confidence: 0.893664281111111

00:51:57.872 --> 00:52:00.285
code and my update code which

NOTE Confidence: 0.893664281111111

00:52:00.285 --> 00:52:02.305
are running on separate threads.

NOTE Confidence: 0.893664281111111

00:52:02.310 --> 00:52:03.648
To actually conflict.

NOTE Confidence: 0.893664281111111

00:52:03.648 --> 00:52:06.770
OK, so the idea here is that.

NOTE Confidence: 0.893664281111111

00:52:06.770 --> 00:52:09.806
I'm gonna lock onto this stuff.

NOTE Confidence: 0.893664281111111

00:52:09.810 --> 00:52:11.970
And so while I'm doing this,

NOTE Confidence: 0.893664281111111

00:52:11.970 --> 00:52:14.208
I can't be interrupted and the

NOTE Confidence: 0.893664281111111

00:52:14.208 --> 00:52:16.805
idea here is that when I want

NOTE Confidence: 0.893664281111111

00:52:16.805 --> 00:52:18.505
to get the values back,

NOTE Confidence: 0.893664281111111

00:52:18.510 --> 00:52:21.030
I just do another lock and so here

NOTE Confidence: 0.893664281111111

00:52:21.030 --> 00:52:23.562
I get the acceleration for the X

NOTE Confidence: 0.893664281111111

00:52:23.562 --> 00:52:26.720
and the Y values of my whole cheese.

NOTE Confidence: 0.893664281111111

00:52:26.720 --> 00:52:28.365
I got more cheese in the game

NOTE Confidence: 0.893664281111111

00:52:28.365 --> 00:52:29.699
of my piece of cheese.

NOTE Confidence: 0.893664281111111

00:52:29.700 --> 00:52:31.940
I get from that vector.

NOTE Confidence: 0.893664281111111

00:52:31.940 --> 00:52:35.072
Now I'm doing a bit of very

NOTE Confidence: 0.893664281111111

00:52:35.072 --> 00:52:35.933
simple physics here.

NOTE Confidence: 0.893664281111111

00:52:35.940 --> 00:52:37.560
I could use fast here,

NOTE Confidence: 0.893664281111111

00:52:37.560 --> 00:52:38.676
but to be honest what I'm

NOTE Confidence: 0.893664281111111

00:52:38.676 --> 00:52:39.740
doing is actually very simple.

NOTE Confidence: 0.893664281111111

00:52:39.740 --> 00:52:40.763
Don't do that.

NOTE Confidence: 0.893664281111111

00:52:40.763 --> 00:52:43.641
So I've got a little bit of code

NOTE Confidence: 0.893664281111111

00:52:43.641 --> 00:52:44.859
that takes the.

NOTE Confidence: 0.893664281111111

00:52:44.860 --> 00:52:46.813
Tip of the phone and uses that

NOTE Confidence: 0.893664281111111

00:52:46.813 --> 00:52:47.650
to control the

NOTE Confidence: 0.951367266470588

00:52:47.720 --> 00:52:50.016
acceleration of the item in the game.

NOTE Confidence: 0.951367266470588

00:52:50.020 --> 00:52:52.225
Now this is a kind of lunar Lander type

NOTE Confidence: 0.951367266470588

00:52:52.225 --> 00:52:54.213
thing where I wanna tip the phone and

NOTE Confidence: 0.951367266470588

00:52:54.213 --> 00:52:56.272
try and land things and so I'm going

NOTE Confidence: 0.951367266470588

00:52:56.272 --> 00:52:58.274
to be using the tipping of the phone

NOTE Confidence: 0.951367266470588

00:52:58.274 --> 00:52:59.940
to control how fast things move now.

NOTE Confidence: 0.951367266470588

00:52:59.940 --> 00:53:02.736
Any kind of tipping control game?

NOTE Confidence: 0.951367266470588

00:53:02.740 --> 00:53:04.316
Just pick this code up and use it.

NOTE Confidence: 0.951367266470588

00:53:04.320 --> 00:53:05.952
It will just work.

NOTE Confidence: 0.951367266470588

00:53:05.952 --> 00:53:09.499
So these are now very easy to make and

NOTE Confidence: 0.951367266470588

00:53:09.499 --> 00:53:12.820
so I didn't use the Farsi for this bit.

NOTE Confidence: 0.951367266470588

00:53:12.820 --> 00:53:14.815
I just did it all straight from.

NOTE Confidence: 0.951367266470588

00:53:14.820 --> 00:53:18.333
Within my. My little program,

NOTE Confidence: 0.951367266470588

00:53:18.333 --> 00:53:19.417
my little physics model,

NOTE Confidence: 0.951367266470588

00:53:19.420 --> 00:53:21.128
which is basically just two vectors and

NOTE Confidence: 0.951367266470588

00:53:21.128 --> 00:53:24.600
so here you go, this is the world famous.

NOTE Confidence: 0.951367266470588

00:53:24.600 --> 00:53:27.500
The Torias cheese Lander program,

NOTE Confidence: 0.951367266470588

00:53:27.500 --> 00:53:29.866
OK, which is where you have to

NOTE Confidence: 0.951367266470588

00:53:29.866 --> 00:53:31.410
land cheese on bread.

NOTE Confidence: 0.951367266470588

00:53:31.410 --> 00:53:33.630
And the interesting thing about

NOTE Confidence: 0.951367266470588

00:53:33.630 --> 00:53:36.620
this one is that I can't show you

NOTE Confidence: 0.951367266470588

00:53:36.620 --> 00:53:39.055
it on the emulator because I can

NOTE Confidence: 0.951367266470588

00:53:39.055 --> 00:53:41.470
pick the PC up and tip it.

NOTE Confidence: 0.951367266470588

00:53:41.470 --> 00:53:43.358
It's not going to have much of an

NOTE Confidence: 0.951367266470588

00:53:43.358 --> 00:53:45.437
effect on this thing inside the

NOTE Confidence: 0.951367266470588

00:53:45.437 --> 00:53:49.079
next version of the tool chain.

NOTE Confidence: 0.951367266470588

00:53:49.080 --> 00:53:51.131
Which is gonna come out along with

NOTE Confidence: 0.951367266470588

00:53:51.131 --> 00:53:53.926
Mango later this year actually has a

NOTE Confidence: 0.951367266470588

00:53:53.926 --> 00:53:56.636
proper emulation of the accelerometer,

NOTE Confidence: 0.951367266470588

00:53:56.640 --> 00:53:58.880
so you'd be able to tip an image

NOTE Confidence: 0.951367266470588

00:53:58.880 --> 00:54:01.494
of the phone on your PC screen and

NOTE Confidence: 0.951367266470588

00:54:01.494 --> 00:54:04.039
your game will get inputs to match.

NOTE Confidence: 0.951367266470588

00:54:04.040 --> 00:54:04.616
In fact,

NOTE Confidence: 0.951367266470588

00:54:04.616 --> 00:54:06.344
the emulation story for Mango is

NOTE Confidence: 0.951367266470588

00:54:06.344 --> 00:54:08.502
going to be fantastic because they're

NOTE Confidence: 0.951367266470588

00:54:08.502 --> 00:54:10.782
also making the meter location aware,

NOTE Confidence: 0.951367266470588

00:54:10.790 --> 00:54:12.945
so you can effectively touch

NOTE Confidence: 0.951367266470588

00:54:12.945 --> 00:54:15.100
locations on a Bing map,

NOTE Confidence: 0.951367266470588

00:54:15.100 --> 00:54:17.692
and that will move the animated

NOTE Confidence: 0.951367266470588

00:54:17.692 --> 00:54:20.140
program into that particular location.

NOTE Confidence: 0.951367266470588

00:54:20.140 --> 00:54:23.026
So here, making location aware code.

NOTE Confidence: 0.951367266470588

00:54:23.030 --> 00:54:25.640
Really, really easy to test that.

NOTE Confidence: 0.951367266470588

00:54:25.640 --> 00:54:26.356
In fact,

NOTE Confidence: 0.951367266470588

00:54:26.356 --> 00:54:28.504
you could even create paths which

NOTE Confidence: 0.951367266470588

00:54:28.504 --> 00:54:31.666
you can follow and have your game.

NOTE Confidence: 0.951367266470588

00:54:31.666 --> 00:54:34.086
Or your program or whatever.

NOTE Confidence: 0.951367266470588

00:54:34.090 --> 00:54:36.328
Pick up the information from those.

NOTE Confidence: 0.951367266470588

00:54:36.330 --> 00:54:38.746
A few years ago I set students a

NOTE Confidence: 0.951367266470588

00:54:38.746 --> 00:54:40.451
little exercise for mobile development

NOTE Confidence: 0.951367266470588

00:54:40.451 --> 00:54:42.873
where they had to make a program

NOTE Confidence: 0.951367266470588

00:54:42.936 --> 00:54:44.862
that make sure you're never late

NOTE Confidence: 0.951367266470588

00:54:44.862 --> 00:54:47.170
for a lecture and the idea was that

NOTE Confidence: 0.951367266470588

00:54:47.170 --> 00:54:49.089
it would figure out where you were.

NOTE Confidence: 0.951367266470588

00:54:49.090 --> 00:54:50.938
It would know where the lecture is

NOTE Confidence: 0.951367266470588

00:54:50.938 --> 00:54:53.363
and it would say OK, start walking now.

NOTE Confidence: 0.951367266470588

00:54:53.363 --> 00:54:55.830
The alarm will go off, you see.

NOTE Confidence: 0.951367266470588

00:54:55.830 --> 00:54:57.615
So the idea was the further away

NOTE Confidence: 0.951367266470588

00:54:57.615 --> 00:54:59.097
from the lecture you were,

NOTE Confidence: 0.951367266470588

00:54:59.100 --> 00:55:02.950
the sooner the alarm goes off and.

NOTE Confidence: 0.951367266470588

00:55:02.950 --> 00:55:05.548
We were watching students test this

NOTE Confidence: 0.951367266470588

00:55:05.550 --> 00:55:07.536
and they were walking around the

NOTE Confidence: 0.951367266470588

00:55:07.536 --> 00:55:09.656
campus like this and thinking I'm

NOTE Confidence: 0.951367266470588

00:55:09.656 --> 00:55:12.560
testing my program now you're being an idiot.

NOTE Confidence: 0.951367266470588

00:55:12.560 --> 00:55:14.832
What you have to do is do that

NOTE Confidence: 0.951367266470588

00:55:14.832 --> 00:55:15.400
precisely once.

NOTE Confidence: 0.951367266470588

00:55:15.400 --> 00:55:17.388
Get a bunch of sat NAV readings

NOTE Confidence: 0.951367266470588

00:55:17.388 --> 00:55:19.544
and then just feed them into your

NOTE Confidence: 0.951367266470588

00:55:19.544 --> 00:55:20.776
program to fake it.

NOTE Confidence: 0.951367266470588

00:55:20.780 --> 00:55:22.574
Now they had to write the

NOTE Confidence: 0.951367266470588

00:55:22.574 --> 00:55:24.180
wrapper code to do that.

NOTE Confidence: 0.951367266470588

00:55:24.180 --> 00:55:26.441
On the next version of the emulation

NOTE Confidence: 0.951367266470588

00:55:26.441 --> 00:55:28.873
claw be done for you so you can

NOTE Confidence: 0.951367266470588

00:55:28.873 --> 00:55:30.117
effectively move things around.

NOTE Confidence: 0.951367266470588

00:55:30.120 --> 00:55:32.902
One of the things that if I've got

NOTE Confidence: 0.951367266470588

00:55:32.902 --> 00:55:34.510
time I'll show you on the end I

NOTE Confidence: 0.951367266470588

00:55:34.510 --> 00:55:36.110
might have a few seconds at the end.

NOTE Confidence: 0.951367266470588

00:55:36.110 --> 00:55:39.160
If not, take a look at some of my demos.

NOTE Confidence: 0.951367266470588

00:55:39.160 --> 00:55:41.470
It's extremely easy to get

NOTE Confidence: 0.951367266470588

00:55:41.470 --> 00:55:43.780
hold of an image from

NOTE Confidence: 0.885613077222222

00:55:43.882 --> 00:55:46.866
Bing maps and use it in a game.

NOTE Confidence: 0.885613077222222

00:55:46.870 --> 00:55:49.278
In fact, there's a game out there based

NOTE Confidence: 0.885613077222222

00:55:49.278 --> 00:55:52.063
on it Crackdown 2 Project Sunburst that

NOTE Confidence: 0.885613077222222

00:55:52.063 --> 00:55:55.630
uses location images in the gameplay.

NOTE Confidence: 0.885613077222222

00:55:55.630 --> 00:55:58.325
It's really, really easy to do that.

NOTE Confidence: 0.885613077222222

00:55:58.330 --> 00:56:00.715
In fact, it's very easy in a game to

NOTE Confidence: 0.885613077222222

00:56:00.715 --> 00:56:03.231
pull down images from anywhere on the

NOTE Confidence: 0.885613077222222

00:56:03.231 --> 00:56:05.849
interwebs and use those in your gameplay,

NOTE Confidence: 0.885613077222222

00:56:05.850 --> 00:56:07.929
so you could have a website warriors

NOTE Confidence: 0.885613077222222

00:56:07.929 --> 00:56:10.206
where you take on a website and shoot

NOTE Confidence: 0.885613077222222

00:56:10.206 --> 00:56:12.389
down all the icons because you can,

NOTE Confidence: 0.885613077222222

00:56:12.389 --> 00:56:14.830
because it's easy, but enough of all that,

NOTE Confidence: 0.885613077222222

00:56:14.830 --> 00:56:15.910
let's play some. Let's do.

NOTE Confidence: 0.885613077222222

00:56:15.910 --> 00:56:17.318
Let's land some cheese.

NOTE Confidence: 0.885613077222222

00:56:17.318 --> 00:56:19.960
To coin a phrase, so I'll go back to.

NOTE Confidence: 0.7415570275

00:56:23.020 --> 00:56:24.800
Oh gone too far.

NOTE Confidence: 0.7415570275

00:56:24.800 --> 00:56:26.580
Cheese smash cheese Lander.

NOTE Confidence: 0.7415570275

00:56:26.580 --> 00:56:29.080
Here we go now.

NOTE Confidence: 0.7415570275

00:56:29.080 --> 00:56:30.660
When you build your project,

NOTE Confidence: 0.7415570275

00:56:30.660 --> 00:56:32.580
you decide where to deploy it.

NOTE Confidence: 0.7415570275

00:56:32.580 --> 00:56:34.900
This project is being

NOTE Confidence: 0.7415570275

00:56:34.900 --> 00:56:37.388
deployed at the real device.

NOTE Confidence: 0.7415570275

00:56:37.388 --> 00:56:40.380
If I fire it up on the emulation,

NOTE Confidence: 0.7415570275

00:56:40.380 --> 00:56:41.346
it runs fine.

NOTE Confidence: 0.7415570275

00:56:41.346 --> 00:56:43.600
It's just the phone is never tipped.

NOTE Confidence: 0.7415570275

00:56:43.600 --> 00:56:45.060
It's always the same orientation.

NOTE Confidence: 0.7415570275

00:56:45.060 --> 00:56:47.496
So here I've got my position,

NOTE Confidence: 0.7415570275

00:56:47.500 --> 00:56:50.080
my speed, and my acceleration.

NOTE Confidence: 0.7415570275

00:56:50.080 --> 00:56:51.850
I also have a threshold which

NOTE Confidence: 0.7415570275

00:56:51.850 --> 00:56:54.177
means if I land the cheese too

NOTE Confidence: 0.7415570275

00:56:54.177 --> 00:56:56.560
quickly then the game is over.

NOTE Confidence: 0.7415570275

00:56:56.560 --> 00:56:58.216
And I have a texture for my piece

NOTE Confidence: 0.7415570275

00:56:58.216 --> 00:57:00.168
of bread that I'm landing on and a

NOTE Confidence: 0.7415570275

00:57:00.168 --> 00:57:01.798
texture for my starfield at the back.

NOTE Confidence: 0.7415570275

00:57:01.800 --> 00:57:02.960
I don't know why he's the star field,

NOTE Confidence: 0.7415570275

00:57:02.960 --> 00:57:04.200
but what the hay?

NOTE Confidence: 0.7415570275

00:57:04.200 --> 00:57:06.870
And then I have textures for the cheese.

NOTE Confidence: 0.7415570275

00:57:06.870 --> 00:57:08.970
And also some messages.

NOTE Confidence: 0.7415570275

00:57:08.970 --> 00:57:10.545
Here's my accelerometer.

NOTE Confidence: 0.7415570275

00:57:10.550 --> 00:57:13.544
And. This is a.

NOTE Confidence: 0.7415570275

00:57:13.544 --> 00:57:16.500
This game is well worth a good look.

NOTE Confidence: 0.7415570275

00:57:16.500 --> 00:57:18.848
Because it performs proper

NOTE Confidence: 0.7415570275

00:57:18.848 --> 00:57:20.609
game state management.

NOTE Confidence: 0.7415570275

00:57:20.610 --> 00:57:22.738
So this game is actually in marketplace.

NOTE Confidence: 0.7415570275

00:57:22.740 --> 00:57:25.590
You can actually buy it.

NOTE Confidence: 0.7415570275

00:57:25.590 --> 00:57:29.190
About five people a week by cheese Lambda,

NOTE Confidence: 0.7415570275

00:57:29.190 --> 00:57:32.340
which when you see it, you'll be amazed.

NOTE Confidence: 0.7415570275

00:57:32.340 --> 00:57:33.380
It's five,

NOTE Confidence: 0.7415570275

00:57:33.380 --> 00:57:35.970
but it's it's been through the certification.

NOTE Confidence: 0.7415570275

00:57:35.970 --> 00:57:38.992
It's a proper formed game if

NOTE Confidence: 0.7415570275

00:57:38.992 --> 00:57:40.804
you start making a proper game,

NOTE Confidence: 0.7415570275

00:57:40.810 --> 00:57:42.910
you'll find that basically

NOTE Confidence: 0.7415570275

00:57:42.910 --> 00:57:45.010
it's a state machine.

NOTE Confidence: 0.7415570275

00:57:45.010 --> 00:57:46.074
At any given instant,

NOTE Confidence: 0.7415570275

00:57:46.074 --> 00:57:48.711
your game is in one of four or five

NOTE Confidence: 0.7415570275

00:57:48.711 --> 00:57:50.993
different States and the states I've got,

NOTE Confidence: 0.7415570275

00:57:51.000 --> 00:57:52.908
I'll make them larger so you

NOTE Confidence: 0.7415570275

00:57:52.908 --> 00:57:54.774
can see them properly. R.

NOTE Confidence: 0.7415570275

00:57:54.774 --> 00:57:59.916
Showing the title screen playing the game.

NOTE Confidence: 0.7415570275

00:57:59.916 --> 00:58:02.504
Paused. Someone, someone lost.

NOTE Confidence: 0.7415570275

00:58:02.504 --> 00:58:05.480
And so my update and my draw method

NOTE Confidence: 0.7415570275

00:58:05.565 --> 00:58:07.997
are basically switch statements.

NOTE Confidence: 0.7415570275

00:58:08.000 --> 00:58:10.754
And the idea is that I go into update.

NOTE Confidence: 0.7415570275

00:58:10.760 --> 00:58:11.588
Am I in?

NOTE Confidence: 0.7415570275

00:58:11.588 --> 00:58:13.520
I discovered just have a switch on

NOTE Confidence: 0.7415570275

00:58:13.592 --> 00:58:15.752
on the game state value and I then

NOTE Confidence: 0.7415570275

00:58:15.752 --> 00:58:17.966
just go off and do that behavior.

NOTE Confidence: 0.7415570275

00:58:17.970 --> 00:58:20.721
And when we hit the bread and

NOTE Confidence: 0.7415570275

00:58:20.721 --> 00:58:22.809
we win or we lose,

NOTE Confidence: 0.7415570275

00:58:22.810 --> 00:58:24.466
I flip to the one or last state

NOTE Confidence: 0.7415570275

00:58:24.466 --> 00:58:26.048
when they press the back button,

NOTE Confidence: 0.7415570275

00:58:26.050 --> 00:58:28.903
I go into pause and when the game starts,

NOTE Confidence: 0.7415570275

00:58:28.910 --> 00:58:31.382
it wakes up in title and so it's

NOTE Confidence: 0.7415570275

00:58:31.382 --> 00:58:33.009
effectively a state machine.

NOTE Confidence: 0.7415570275

00:58:33.010 --> 00:58:36.043
Now you can pick up this and use it

NOTE Confidence: 0.7415570275

00:58:36.043 --> 00:58:38.880
as the basis of any thing you like.

NOTE Confidence: 0.7415570275

00:58:38.880 --> 00:58:40.860
Other thing I'll mention about games

NOTE Confidence: 0.7415570275

00:58:40.860 --> 00:58:42.646
that make this more interesting as

NOTE Confidence: 0.7415570275

00:58:42.646 --> 00:58:44.970
well to put a game on marketplace,

NOTE Confidence: 0.7415570275

00:58:44.970 --> 00:58:46.800
it has to behave correctly when

NOTE Confidence: 0.7415570275

00:58:46.800 --> 00:58:48.020
you turn it on.

NOTE Confidence: 0.7415570275

00:58:48.020 --> 00:58:50.468
When you pause it and when the game

NOTE Confidence: 0.7415570275

00:58:50.468 --> 00:58:53.327
itself is terminated by an external event.

NOTE Confidence: 0.7415570275

00:58:53.330 --> 00:58:54.434
And I've got all the code in that

NOTE Confidence: 0.7415570275

00:58:54.434 --> 00:58:55.772
does that as well, so you can.

NOTE Confidence: 0.7415570275

00:58:55.772 --> 00:58:57.042
You can effectively pick that

NOTE Confidence: 0.7415570275

00:58:57.042 --> 00:58:58.669
up and and and run with it.

NOTE Confidence: 0.7415570275

00:58:58.670 --> 00:59:00.054
So without further ado,

NOTE Confidence: 0.7415570275

00:59:00.054 --> 00:59:02.130
because it just gets too exciting.

NOTE Confidence: 0.7415570275

00:59:02.130 --> 00:59:05.189
Otherwise I'll deploy this to the phone.

NOTE Confidence: 0.7415570275

00:59:05.190 --> 00:59:06.864
But it won't work because my

NOTE Confidence: 0.7415570275

00:59:06.864 --> 00:59:07.980
phone is presently locked,

NOTE Confidence: 0.7415570275

00:59:07.980 --> 00:59:09.580
so I'm not gonna get an error command

NOTE Confidence: 0.7415570275

00:59:09.580 --> 00:59:11.490
tell me the error come on, come on.

NOTE Confidence: 0.7415570275

00:59:11.490 --> 00:59:13.470
Bank so I have to unlock.

NOTE Confidence: 0.7415570275

00:59:13.470 --> 00:59:15.955
I have to wake my phone up.

NOTE Confidence: 0.7415570275

00:59:15.960 --> 00:59:18.140
Touch to that dismiss my.

NOTE Confidence: 0.7415570275

00:59:18.140 --> 00:59:20.720
Apparently I'm doing a lecture now

NOTE Confidence: 0.784187795714286

00:59:20.720 --> 00:59:23.317
who just sort it. Remove the screen.

NOTE Confidence: 0.784187795714286

00:59:23.320 --> 00:59:24.928
You'll see that in a second.

NOTE Confidence: 0.784187795714286

00:59:24.930 --> 00:59:27.063
And now I just say I know about that.

NOTE Confidence: 0.784187795714286

00:59:27.070 --> 00:59:28.582
No point in continuing.

NOTE Confidence: 0.784187795714286

00:59:28.582 --> 00:59:31.210
Run you up again, so now the program is

NOTE Confidence: 0.784187795714286

00:59:31.210 --> 00:59:33.059
being pushed down the wire into the phone.

NOTE Confidence: 0.784187795714286

00:59:33.060 --> 00:59:36.432
If I change to. The visualizer,

NOTE Confidence: 0.784187795714286

00:59:36.432 --> 00:59:38.418
then it's on the programs list.

NOTE Confidence: 0.784187795714286

00:59:38.420 --> 00:59:40.130
At the moment it's going

NOTE Confidence: 0.784187795714286

00:59:40.130 --> 00:59:41.498
in there deploy started.

NOTE Confidence: 0.784187795714286

00:59:41.500 --> 00:59:42.890
It's taking all the textures,

NOTE Confidence: 0.784187795714286

00:59:42.890 --> 00:59:43.994
all the sound effects,

NOTE Confidence: 0.784187795714286

00:59:43.994 --> 00:59:45.938
all the stuff and pushing them into

NOTE Confidence: 0.784187795714286

00:59:45.938 --> 00:59:47.999
the phone and in a minute or two cheese

NOTE Confidence: 0.784187795714286

00:59:48.058 --> 00:59:51.410
land they will start running and.

NOTE Confidence: 0.784187795714286

00:59:51.410 --> 00:59:53.475
There you go. This is so exciting

NOTE Confidence: 0.784187795714286

00:59:53.475 --> 00:59:55.908
and and if I just zoom out a bit,

NOTE Confidence: 0.784187795714286

00:59:55.910 --> 00:59:59.618
you can probably see it a little bit better.

NOTE Confidence: 0.784187795714286

00:59:59.620 --> 01:00:01.384
Right, so that's that cheese Lander, right?

NOTE Confidence: 0.784187795714286

01:00:01.384 --> 01:00:03.932
So effectively I'm using touch events to

NOTE Confidence: 0.784187795714286

01:00:03.932 --> 01:00:07.708
get the game going, so touch the screen.

NOTE Confidence: 0.784187795714286

01:00:07.710 --> 01:00:12.604
Touch the screen. Touch the screen.

NOTE Confidence: 0.784187795714286

01:00:12.604 --> 01:00:15.178
Hey, it's stopped.

NOTE Confidence: 0.784187795714286

01:00:15.180 --> 01:00:18.534
Really. OK. Here we go.

NOTE Confidence: 0.784187795714286

01:00:18.534 --> 01:00:19.797
We're going now.

NOTE Confidence: 0.784187795714286

01:00:19.800 --> 01:00:21.067
Now if you can see that the

NOTE Confidence: 0.784187795714286

01:00:21.067 --> 01:00:22.020
cheese is at the top,

NOTE Confidence: 0.784187795714286

01:00:22.020 --> 01:00:22.878
the bread is at the bottom.

NOTE Confidence: 0.784187795714286

01:00:22.880 --> 01:00:24.030
If I tip this up.

NOTE Confidence: 0.805174568

01:00:26.410 --> 01:00:27.910
The cheese starts to fall,

NOTE Confidence: 0.805174568

01:00:27.910 --> 01:00:29.597
I think about the other way the

NOTE Confidence: 0.805174568

01:00:29.597 --> 01:00:31.222
cheese will slow down and if

NOTE Confidence: 0.805174568

01:00:31.222 --> 01:00:33.148
I tip this down very gently,

NOTE Confidence: 0.805174568

01:00:33.150 --> 01:00:34.782
the cheese will head for the

NOTE Confidence: 0.805174568

01:00:34.782 --> 01:00:36.409
bread just bit further that way.

NOTE Confidence: 0.805174568

01:00:36.410 --> 01:00:38.858
And if I get this right.

NOTE Confidence: 0.805174568

01:00:38.860 --> 01:00:42.738
Ah, OK, too fast. So that's it.

NOTE Confidence: 0.805174568

01:00:42.740 --> 01:00:47.150
That's treasured again and now try again.

NOTE Confidence: 0.805174568

01:00:47.150 --> 01:00:48.743
And this not only about a three hour break,

NOTE Confidence: 0.805174568

01:00:48.750 --> 01:00:50.450
now Robert fails to play

NOTE Confidence: 0.805174568

01:00:50.450 --> 01:00:51.810
his own game properly.

NOTE Confidence: 0.805174568

01:00:51.810 --> 01:00:54.483
So if I just turn the engine off now.

NOTE Confidence: 0.805174568

01:00:54.490 --> 01:00:58.230
And just very very.

NOTE Confidence: 0.805174568

01:00:58.230 --> 01:00:59.253
There you go,

NOTE Confidence: 0.805174568

01:00:59.253 --> 01:01:01.640
that's how you play cheese Lander folks.

NOTE Confidence: 0.9813117

01:01:03.850 --> 01:01:09.835
Now that's it. People pay 79 pence for

NOTE Confidence: 0.9813117

01:01:09.835 --> 01:01:13.935
that and good luck to them if I if I can

NOTE Confidence: 0.9813117

01:01:13.935 --> 01:01:17.409
restart it if I if I pause the game,

NOTE Confidence: 0.9813117

01:01:17.410 --> 01:01:19.138
if I go back to the start menu,

NOTE Confidence: 0.9813117

01:01:19.140 --> 01:01:21.156
my Visual Studio project will pause.

NOTE Confidence: 0.9813117

01:01:21.160 --> 01:01:22.959
I can then actually go back to

NOTE Confidence: 0.9813117

01:01:22.959 --> 01:01:24.560
it and resume it like that,

NOTE Confidence: 0.9813117

01:01:24.560 --> 01:01:25.930
and the visual debugging environment

NOTE Confidence: 0.9813117

01:01:25.930 --> 01:01:27.940
will start up again and I go back

NOTE Confidence: 0.9813117

01:01:27.940 --> 01:01:29.312
into pause mode and there you go.

NOTE Confidence: 0.9813117

01:01:29.320 --> 01:01:30.492
So I press back.

NOTE Confidence: 0.9813117

01:01:30.492 --> 01:01:32.750
And I can start the game again.

NOTE Confidence: 0.865855231333333

01:01:36.170 --> 01:01:38.618
And do it again. The timer is this is

NOTE Confidence: 0.865855231333333

01:01:38.618 --> 01:01:40.736
version two of the game where you have

NOTE Confidence: 0.865855231333333

01:01:40.736 --> 01:01:43.426
like a time you have to land it by but

NOTE Confidence: 0.865855231333333

01:01:43.426 --> 01:01:44.953
haven't quite got that finished yet.

NOTE Confidence: 0.865855231333333

01:01:44.953 --> 01:01:46.640
So what you have here is kind

NOTE Confidence: 0.865855231333333

01:01:46.693 --> 01:01:48.049
of like a work in progress.

NOTE Confidence: 0.865855231333333

01:01:48.050 --> 01:01:51.875
If I go into here and just hit stop.

NOTE Confidence: 0.865855231333333

01:01:51.880 --> 01:01:53.743
Then I drop out of the program and go

NOTE Confidence: 0.865855231333333

01:01:53.743 --> 01:01:55.258
straight back to the previous screen.

NOTE Confidence: 0.865855231333333

01:01:55.260 --> 01:01:55.900
In a way you go,

NOTE Confidence: 0.865855231333333

01:01:55.900 --> 01:01:57.839
so deploying into the device is very,

NOTE Confidence: 0.865855231333333

01:01:57.840 --> 01:02:00.000
very easy to do.

NOTE Confidence: 0.865855231333333

01:02:00.000 --> 01:02:02.478
About that and the game is now

NOTE Confidence: 0.865855231333333

01:02:02.478 --> 01:02:05.231
stored on this device as well so I

NOTE Confidence: 0.865855231333333

01:02:05.231 --> 01:02:08.182
can go back into here and if I go

NOTE Confidence: 0.865855231333333

01:02:08.182 --> 01:02:11.740
into the programs on the device.

NOTE Confidence: 0.865855231333333

01:02:11.740 --> 01:02:13.380
See what a horrible picture

NOTE Confidence: 0.865855231333333

01:02:13.380 --> 01:02:16.730
Robert get out of it boink.

NOTE Confidence: 0.865855231333333

01:02:16.730 --> 01:02:17.510
And then I go into.

NOTE Confidence: 0.865855231333333

01:02:17.510 --> 01:02:19.540
Here I've set icons for this and

NOTE Confidence: 0.865855231333333

01:02:19.540 --> 01:02:21.884
away we go and that's that's the

NOTE Confidence: 0.865855231333333

01:02:21.884 --> 01:02:23.990
game running on the device so.

NOTE Confidence: 0.865855231333333

01:02:23.990 --> 01:02:24.554
It's easy,

NOTE Confidence: 0.865855231333333

01:02:24.554 --> 01:02:25.964
you can steal that cold,

NOTE Confidence: 0.865855231333333

01:02:25.970 --> 01:02:28.469
and if it makes you rich then

NOTE Confidence: 0.865855231333333

01:02:28.469 --> 01:02:30.739
you're a better man than I am.

NOTE Confidence: 0.865855231333333

01:02:30.740 --> 01:02:32.988
Good luck with that and what I'll do

NOTE Confidence: 0.865855231333333

01:02:32.988 --> 01:02:35.454
now is I'll continue on for the last

NOTE Confidence: 0.865855231333333

01:02:35.454 --> 01:02:37.950
10 minutes or so with the last little bit,

NOTE Confidence: 0.865855231333333

01:02:37.950 --> 01:02:39.984
and then then we'll stop and

NOTE Confidence: 0.865855231333333

01:02:39.984 --> 01:02:42.390
I will have a lie down so.

NOTE Confidence: 0.865855231333333

01:02:42.390 --> 01:02:45.070
Final bit of the story is how we

NOTE Confidence: 0.865855231333333

01:02:45.070 --> 01:02:47.316
put programs out there for the

NOTE Confidence: 0.865855231333333

01:02:47.316 --> 01:02:49.930
unwitting public to rush out and buy.

NOTE Confidence: 0.865855231333333

01:02:49.930 --> 01:02:52.384
And the idea is that everything

NOTE Confidence: 0.865855231333333

01:02:52.384 --> 01:02:56.107
on the phone is done in a managed

NOTE Confidence: 0.865855231333333

01:02:56.107 --> 01:02:58.107
way through the marketplace,

NOTE Confidence: 0.865855231333333

01:02:58.110 --> 01:03:00.780
so it's like another phone

NOTE Confidence: 0.865855231333333

01:03:00.780 --> 01:03:03.450
whose name begins with I.

NOTE Confidence: 0.865855231333333

01:03:03.450 --> 01:03:04.878
Never guess it's managed

NOTE Confidence: 0.865855231333333

01:03:04.878 --> 01:03:06.663
in a very similar way.

NOTE Confidence: 0.865855231333333

01:03:06.670 --> 01:03:08.950
Developers sign up on an annual

NOTE Confidence: 0.865855231333333

01:03:08.950 --> 01:03:12.179
basis and get the right to put

NOTE Confidence: 0.865855231333333

01:03:12.179 --> 01:03:14.026
applications into marketplace and

NOTE Confidence: 0.865855231333333

01:03:14.026 --> 01:03:15.538
each one that they put in there

NOTE Confidence: 0.865855231333333

01:03:15.538 --> 01:03:17.048
is vetted against a whole bunch

NOTE Confidence: 0.865855231333333

01:03:17.048 --> 01:03:18.578
of guidelines to make sure that

NOTE Confidence: 0.865855231333333

01:03:18.631 --> 01:03:20.269
when the customer buys this thing,

NOTE Confidence: 0.865855231333333

01:03:20.270 --> 01:03:22.442
it ain't going to steal their

NOTE Confidence: 0.865855231333333

01:03:22.442 --> 01:03:24.670
passwords or crash the device or

NOTE Confidence: 0.865855231333333

01:03:24.670 --> 01:03:27.155
flatten the battery or make it catch

NOTE Confidence: 0.865855231333333

01:03:27.155 --> 01:03:29.526
fire or track everywhere they go.

NOTE Confidence: 0.865855231333333

01:03:29.530 --> 01:03:30.320
Who would have thought of

NOTE Confidence: 0.865855231333333

01:03:30.320 --> 01:03:31.110
phone could ever do that?

NOTE Confidence: 0.865855231333333

01:03:31.110 --> 01:03:31.536
Hey,

NOTE Confidence: 0.865855231333333

01:03:31.536 --> 01:03:32.814
it's just there.

NOTE Confidence: 0.865855231333333

01:03:32.814 --> 01:03:35.370
Using a particular set of resources

NOTE Confidence: 0.865855231333333

01:03:35.448 --> 01:03:38.016
and mounted on the phone and so the

NOTE Confidence: 0.865855231333333

01:03:38.016 --> 01:03:40.846
idea is that you register and then

NOTE Confidence: 0.865855231333333

01:03:40.846 --> 01:03:43.354
once you're registered you can submit

NOTE Confidence: 0.865855231333333

01:03:43.354 --> 01:03:45.994
applications to the marketplace and you

NOTE Confidence: 0.865855231333333

01:03:45.994 --> 01:03:48.586
can also unlock devices for development.

NOTE Confidence: 0.865855231333333

01:03:48.590 --> 01:03:49.974
A standard Windows Phone

NOTE Confidence: 0.865855231333333

01:03:49.974 --> 01:03:51.704
you buy in the shops.

NOTE Confidence: 0.865855231333333

01:03:51.710 --> 01:03:53.108
And sign up for a contract.

NOTE Confidence: 0.865855231333333

01:03:53.110 --> 01:03:56.146
Will not accept applications from studio.

NOTE Confidence: 0.865855231333333

01:03:56.150 --> 01:03:57.178
There's an unlocking process.

NOTE Confidence: 0.865855231333333

01:03:57.178 --> 01:03:58.720
You have to go through which

NOTE Confidence: 0.865855231333333

01:03:58.764 --> 01:03:59.960
is managed via marketplace,

NOTE Confidence: 0.865855231333333

01:03:59.960 --> 01:04:02.678
and developers can do that to

NOTE Confidence: 0.865855231333333

01:04:02.678 --> 01:04:05.899
two or three of their phones.

NOTE Confidence: 0.865855231333333

01:04:05.900 --> 01:04:08.679
It costs you 99 bucks a year.

NOTE Confidence: 0.865855231333333

01:04:08.680 --> 01:04:11.344
It's all done via your Windows Live identity.

NOTE Confidence: 0.851692474

01:04:14.630 --> 01:04:18.320
And. If you're a student or

NOTE Confidence: 0.851692474

01:04:18.320 --> 01:04:21.380
have a kid who's a student.

NOTE Confidence: 0.851692474

01:04:21.380 --> 01:04:25.345
You, I didn't say that but but

NOTE Confidence: 0.851692474

01:04:25.345 --> 01:04:27.535
I could hear you thinking it.

NOTE Confidence: 0.851692474

01:04:27.540 --> 01:04:29.700
I don't care if she's doing history of art.

NOTE Confidence: 0.851692474

01:04:29.700 --> 01:04:33.704
She wants to write games and the Dream

NOTE Confidence: 0.851692474

01:04:33.704 --> 01:04:36.608
Spark project allows students to actually

NOTE Confidence: 0.851692474

01:04:36.608 --> 01:04:39.868
sign up and get marketplace membership

NOTE Confidence: 0.851692474

01:04:39.868 --> 01:04:43.204
for free and they can unlock just one device.

NOTE Confidence: 0.851692474

01:04:43.210 --> 01:04:44.890
But they can publish apps

NOTE Confidence: 0.851692474

01:04:44.890 --> 01:04:45.898
like everybody else.

NOTE Confidence: 0.851692474

01:04:45.900 --> 01:04:48.340
Loads of our students in Hull are actually

NOTE Confidence: 0.851692474

01:04:48.340 --> 01:04:50.400
doing this now and my friend Harry,

NOTE Confidence: 0.851692474

01:04:50.400 --> 01:04:51.780
with his 10,000 downloads.

NOTE Confidence: 0.851692474

01:04:51.780 --> 01:04:54.112
Go on marketplace, look for destruction golf.

NOTE Confidence: 0.851692474

01:04:54.112 --> 01:04:54.758
It's there.

NOTE Confidence: 0.851692474

01:04:54.760 --> 01:04:56.279
He's had more hits than I have.

NOTE Confidence: 0.851692474

01:04:56.280 --> 01:04:59.129
Look for cheese Lander that's there too,

NOTE Confidence: 0.851692474

01:04:59.130 --> 01:05:00.360
and there are a couple of

NOTE Confidence: 0.851692474

01:05:00.360 --> 01:05:01.600
other games of mine as well,

NOTE Confidence: 0.851692474

01:05:01.600 --> 01:05:04.556
but the idea is that once you're out there,

NOTE Confidence: 0.851692474

01:05:04.556 --> 01:05:06.410
you can then start deploying your

NOTE Confidence: 0.851692474

01:05:06.469 --> 01:05:08.898
applications and your games to the platform.

NOTE Confidence: 0.851692474

01:05:08.900 --> 01:05:10.826
I tell my students they're probably

NOTE Confidence: 0.851692474

01:05:10.826 --> 01:05:13.159
not going to get Rich doing this.

NOTE Confidence: 0.851692474

01:05:13.160 --> 01:05:15.099
But it gets their name out there

NOTE Confidence: 0.851692474

01:05:15.099 --> 01:05:17.655
if they want to go and work for a

NOTE Confidence: 0.851692474

01:05:17.655 --> 01:05:19.380
game publisher when they graduate.

NOTE Confidence: 0.851692474

01:05:19.380 --> 01:05:20.700
If they can wander in and say, OK,

NOTE Confidence: 0.851692474

01:05:20.700 --> 01:05:22.100
I've got these three games out there,

NOTE Confidence: 0.851692474

01:05:22.100 --> 01:05:23.387
getting reasonable reviews,

NOTE Confidence: 0.851692474

01:05:23.387 --> 01:05:26.390
fair number of hits that marks them

NOTE Confidence: 0.851692474

01:05:26.462 --> 01:05:28.779
out as better than the other guys.

NOTE Confidence: 0.851692474

01:05:28.780 --> 01:05:31.660
And so this is a great way of

NOTE Confidence: 0.851692474

01:05:31.660 --> 01:05:33.025
promoting yourself as a student.

NOTE Confidence: 0.851692474

01:05:33.025 --> 01:05:34.315
It might be that you write

NOTE Confidence: 0.851692474

01:05:34.315 --> 01:05:35.420
the next Angry Birds.

NOTE Confidence: 0.851692474

01:05:35.420 --> 01:05:37.256
Fantastic if you do, and good luck to you.

NOTE Confidence: 0.851692474

01:05:37.260 --> 01:05:40.376
As far as your I'm I'm concerned and

NOTE Confidence: 0.851692474

01:05:40.376 --> 01:05:43.038
this is really sad. But it's true.

NOTE Confidence: 0.851692474

01:05:43.038 --> 01:05:46.448
I would pay 99 bucks a year just so I can

NOTE Confidence: 0.851692474

01:05:46.448 --> 01:05:48.815
put games on my phone that I can play.

NOTE Confidence: 0.851692474

01:05:48.820 --> 01:05:49.968
I like writing code.

NOTE Confidence: 0.851692474

01:05:49.968 --> 01:05:52.323
I buy all these Xbox games and I

NOTE Confidence: 0.851692474

01:05:52.323 --> 01:05:54.318
keep them at home in the shrinkwrap.

NOTE Confidence: 0.851692474

01:05:54.320 --> 01:05:55.384
Never get them out.

NOTE Confidence: 0.851692474

01:05:55.384 --> 01:05:56.980
I'm spending all my time making

NOTE Confidence: 0.851692474

01:05:57.036 --> 01:05:58.756
cheese bounced around the screen.

NOTE Confidence: 0.851692474

01:05:58.760 --> 01:06:00.055
And that's what I do, but it's fun.

NOTE Confidence: 0.851692474

01:06:00.055 --> 01:06:00.795
I like doing that.

NOTE Confidence: 0.851692474

01:06:00.800 --> 01:06:04.519
So there you go. That's just me.

NOTE Confidence: 0.851692474

01:06:04.519 --> 01:06:05.848
As a developer,

NOTE Confidence: 0.851692474

01:06:05.850 --> 01:06:07.400
you can give away applications.

NOTE Confidence: 0.851692474

01:06:07.400 --> 01:06:08.870
You can give free ones away,

NOTE Confidence: 0.851692474

01:06:08.870 --> 01:06:10.616
or you can charge for them.

NOTE Confidence: 0.851692474

01:06:10.620 --> 01:06:12.834
You can give it to 100 away 300 different

NOTE Confidence: 0.851692474

01:06:12.834 --> 01:06:14.180
applications if you want to do that,

NOTE Confidence: 0.851692474

01:06:14.180 --> 01:06:15.152
and you can also and this

NOTE Confidence: 0.851692474

01:06:15.152 --> 01:06:16.080
is a really good trick.

NOTE Confidence: 0.851692474

01:06:16.080 --> 01:06:18.376
You can make trial versions as well

NOTE Confidence: 0.851692474

01:06:18.380 --> 01:06:20.210
so you can produce applications to

NOTE Confidence: 0.851692474

01:06:20.210 --> 01:06:22.710
have a trial mode and you can detect

NOTE Confidence: 0.851692474

01:06:22.710 --> 01:06:24.540
in the game whether your programs

NOTE Confidence: 0.851692474

01:06:24.601 --> 01:06:26.419
running in trial or full blown,

NOTE Confidence: 0.851692474

01:06:26.420 --> 01:06:28.082
and you can actually then have

NOTE Confidence: 0.851692474

01:06:28.082 --> 01:06:29.855
just the first couple of levels

NOTE Confidence: 0.851692474

01:06:29.855 --> 01:06:31.375
playable until they bought it.

NOTE Confidence: 0.851692474

01:06:31.380 --> 01:06:33.810
Or you can do any kind of self through

NOTE Confidence: 0.851692474

01:06:33.810 --> 01:06:37.220
that you like on that basis if you.

NOTE Confidence: 0.851692474

01:06:37.220 --> 01:06:38.808
Publish in the states.

NOTE Confidence: 0.851692474

01:06:38.808 --> 01:06:41.190
You can actually make use of

NOTE Confidence: 0.851692474

01:06:41.269 --> 01:06:43.449
in game advertising as well.

NOTE Confidence: 0.851692474

01:06:43.450 --> 01:06:44.380
That's not available in the

NOTE Confidence: 0.851692474

01:06:44.380 --> 01:06:45.500
in the in Europe just yet,

NOTE Confidence: 0.851692474

01:06:45.500 --> 01:06:45.804
unfortunately,

NOTE Confidence: 0.851692474

01:06:45.804 --> 01:06:48.236
but you can also do that as well,

NOTE Confidence: 0.851692474

01:06:48.240 --> 01:06:50.409
so it's there's all kinds of ways you can.

NOTE Confidence: 0.851692474

01:06:50.410 --> 01:06:52.070
You can actually manage the

NOTE Confidence: 0.851692474

01:06:52.070 --> 01:06:56.439
manipulation of it you go through.

NOTE Confidence: 0.91732576375

01:06:56.440 --> 01:07:00.680
Process to submit your apps the way that.

NOTE Confidence: 0.91732576375

01:07:00.680 --> 01:07:03.431
Applications of packaged is that the output

NOTE Confidence: 0.91732576375

01:07:03.431 --> 01:07:06.718
of the compile and build process is a Farkle.

NOTE Confidence: 0.91732576375

01:07:06.720 --> 01:07:09.960
Does app file X8 P and that's basically

NOTE Confidence: 0.91732576375

01:07:09.960 --> 01:07:13.027
a zip archive with a manifest.

NOTE Confidence: 0.91732576375

01:07:13.030 --> 01:07:15.016
And that contains all your assets,

NOTE Confidence: 0.91732576375

01:07:15.020 --> 01:07:19.350
your executables and the manifest,

NOTE Confidence: 0.91732576375

01:07:19.350 --> 01:07:20.494
which states what phone

NOTE Confidence: 0.91732576375

01:07:20.494 --> 01:07:21.924
attributes you want to use.

NOTE Confidence: 0.91732576375

01:07:21.930 --> 01:07:24.090
You push that up to.

NOTE Confidence: 0.91732576375

01:07:24.090 --> 01:07:25.506
The marketplace they then

NOTE Confidence: 0.91732576375

01:07:25.506 --> 01:07:27.630
run a testing process on it,

NOTE Confidence: 0.91732576375

01:07:27.630 --> 01:07:31.039
which is some automatic and some human.

NOTE Confidence: 0.91732576375

01:07:31.040 --> 01:07:33.040
And they then come back to you with

NOTE Confidence: 0.91732576375

01:07:33.040 --> 01:07:34.700
feedback on whether it's past or

NOTE Confidence: 0.91732576375

01:07:34.700 --> 01:07:36.790
whether it's failed and if it's failed.

NOTE Confidence: 0.91732576375

01:07:36.790 --> 01:07:39.358
Which bits have actually not passed?

NOTE Confidence: 0.91732576375

01:07:39.360 --> 01:07:41.190
I've had applications that haven't

NOTE Confidence: 0.91732576375

01:07:41.190 --> 01:07:42.654
passed certification because I've

NOTE Confidence: 0.91732576375

01:07:42.654 --> 01:07:44.506
done stupid things in assuming the

NOTE Confidence: 0.91732576375

01:07:44.506 --> 01:07:46.240
way that things supposed to work.

NOTE Confidence: 0.91732576375

01:07:46.240 --> 01:07:48.340
You get really good feedback.

NOTE Confidence: 0.91732576375

01:07:48.340 --> 01:07:49.685
They're extremely good at telling

NOTE Confidence: 0.91732576375

01:07:49.685 --> 01:07:51.260
you what's wrong with your rap.

NOTE Confidence: 0.91732576375

01:07:51.260 --> 01:07:52.532
They'll say menu three.

NOTE Confidence: 0.91732576375

01:07:52.532 --> 01:07:54.440
This bit here shouldn't do this.

NOTE Confidence: 0.91732576375

01:07:54.440 --> 01:07:55.740
It should do this, right?

NOTE Confidence: 0.91732576375

01:07:55.740 --> 01:07:57.576
OK, I'll go in and change my state machine,

NOTE Confidence: 0.91732576375

01:07:57.580 --> 01:07:59.316
fix that in a way we go,

NOTE Confidence: 0.91732576375

01:07:59.320 --> 01:08:02.530
so you push that file up.

NOTE Confidence: 0.91732576375

01:08:02.530 --> 01:08:03.842
You get your feedback.

NOTE Confidence: 0.91732576375

01:08:03.842 --> 01:08:06.402
If it's approved, it goes into marketplace.

NOTE Confidence: 0.91732576375

01:08:06.402 --> 01:08:08.367
The process normally takes around

NOTE Confidence: 0.91732576375

01:08:08.367 --> 01:08:10.573
3:00 or 4 working days very

NOTE Confidence: 0.91732576375

01:08:10.573 --> 01:08:14.088
quick and works extremely well.

NOTE Confidence: 0.91732576375

01:08:14.090 --> 01:08:15.434
They're very keen to get your apps

NOTE Confidence: 0.91732576375

01:08:15.434 --> 01:08:17.092
out there so they give you extremely

NOTE Confidence: 0.91732576375

01:08:17.092 --> 01:08:18.387
good feedback once it's approved,

NOTE Confidence: 0.91732576375

01:08:18.390 --> 01:08:19.982
it's it's out there.

NOTE Confidence: 0.91732576375

01:08:19.982 --> 01:08:21.972
You can push out upgrades.

NOTE Confidence: 0.91732576375

01:08:21.980 --> 01:08:23.288
If you push an upgrade out,

NOTE Confidence: 0.91732576375

01:08:23.290 --> 01:08:25.936
the user gets the chance to upgrade

NOTE Confidence: 0.91732576375

01:08:25.936 --> 01:08:28.571
via marketplace on on their device and.

NOTE Confidence: 0.91732576375

01:08:28.571 --> 01:08:30.426
This the bottom bullet points

NOTE Confidence: 0.91732576375

01:08:30.426 --> 01:08:33.159
on here are the ones you should

NOTE Confidence: 0.91732576375

01:08:33.159 --> 01:08:35.109
pay the most attention to,

NOTE Confidence: 0.91732576375

01:08:35.110 --> 01:08:37.282
and there's a really good submission

NOTE Confidence: 0.91732576375

01:08:37.282 --> 01:08:39.449
guidelines document which you should read.

NOTE Confidence: 0.91732576375

01:08:39.450 --> 01:08:40.260
It's well worth having a look,

NOTE Confidence: 0.91732576375

01:08:40.260 --> 01:08:41.865
so it'll it'll basically short

NOTE Confidence: 0.91732576375

01:08:41.865 --> 01:08:43.149
circuit the application process.

NOTE Confidence: 0.91732576375

01:08:43.150 --> 01:08:45.262
I didn't read it properly and my

NOTE Confidence: 0.91732576375

01:08:45.262 --> 01:08:47.294
app got bounced, but that's just me,

NOTE Confidence: 0.91732576375

01:08:47.294 --> 01:08:49.610
so read that and you'll be fine.

NOTE Confidence: 0.91732576375

01:08:49.610 --> 01:08:54.988
You get 70% of the fee paid once

NOTE Confidence: 0.91732576375

01:08:54.988 --> 01:08:57.878
you've earned over 200 bucks.

NOTE Confidence: 0.91732576375

01:08:57.880 --> 01:08:59.260
Then you start getting money

NOTE Confidence: 0.91732576375

01:08:59.260 --> 01:09:00.364
fed through to you.

NOTE Confidence: 0.91732576375

01:09:00.370 --> 01:09:02.908
The payment process is a bit of a pain.

NOTE Confidence: 0.91732576375

01:09:02.910 --> 01:09:05.346
To be frank, if you're from Europe.

NOTE Confidence: 0.91732576375

01:09:05.350 --> 01:09:06.676
If you're in the states, it's great.

NOTE Confidence: 0.91732576375

01:09:06.676 --> 01:09:07.728
If you're in Europe,

NOTE Confidence: 0.91732576375

01:09:07.730 --> 01:09:11.298
you have to get some tax stuff sorted,

NOTE Confidence: 0.91732576375

01:09:11.300 --> 01:09:13.883
but that's just a question of doing

NOTE Confidence: 0.91732576375

01:09:13.883 --> 01:09:15.709
some registration fun and games,

NOTE Confidence: 0.91732576375

01:09:15.710 --> 01:09:16.970
and once you've done that,

NOTE Confidence: 0.91732576375

01:09:16.970 --> 01:09:18.590
you can actually start getting money.

NOTE Confidence: 0.91732576375

01:09:18.590 --> 01:09:21.320
The registration process does not

NOTE Confidence: 0.91732576375

01:09:21.320 --> 01:09:23.630
affect whether you can submit apps,

NOTE Confidence: 0.91732576375

01:09:23.630 --> 01:09:23.948
cheese,

NOTE Confidence: 0.91732576375

01:09:23.948 --> 01:09:26.174
Lambda and all my other applications are

NOTE Confidence: 0.91732576375

01:09:26.174 --> 01:09:28.789
out there attracting huge amounts of revenue,

NOTE Confidence: 0.91732576375

01:09:28.790 --> 01:09:31.580
but I haven't yet sorted my tax thing out so.

NOTE Confidence: 0.91732576375

01:09:31.580 --> 01:09:33.794
All this money sitting in Microsoft

NOTE Confidence: 0.91732576375

01:09:33.794 --> 01:09:36.088
Bank account waiting to come my way.

NOTE Confidence: 0.91732576375

01:09:36.090 --> 01:09:37.770
Probably I'll buy a yacht.

NOTE Confidence: 0.91732576375

01:09:37.770 --> 01:09:39.486
Maybe it'll be a Lego one,

NOTE Confidence: 0.91732576375

01:09:39.490 --> 01:09:41.856
so we'll move on so you can

NOTE Confidence: 0.91732576375

01:09:41.856 --> 01:09:42.870
always submit apps.

NOTE Confidence: 0.91732576375

01:09:42.870 --> 01:09:46.146
If you're a student and you're going

NOTE Confidence: 0.91732576375

01:09:46.146 --> 01:09:49.390
through dream Spark really important tip.

NOTE Confidence: 0.91732576375

01:09:49.390 --> 01:09:51.310
As soon as you registered,

NOTE Confidence: 0.91732576375

01:09:51.310 --> 01:09:52.369
submit an app,

NOTE Confidence: 0.91732576375

01:09:52.369 --> 01:09:55.970
even if it's just a torch app or something.

NOTE Confidence: 0.807722928333333

01:09:55.970 --> 01:09:58.350
Very simple, because for students

NOTE Confidence: 0.807722928333333

01:09:58.350 --> 01:10:00.730
the actual very sign authentication

NOTE Confidence: 0.807722928333333

01:10:00.803 --> 01:10:03.408
process where they give you your

NOTE Confidence: 0.807722928333333

01:10:03.408 --> 01:10:05.116
own very signed certificate.

NOTE Confidence: 0.807722928333333

01:10:05.120 --> 01:10:07.290
That process only starts for

NOTE Confidence: 0.807722928333333

01:10:07.290 --> 01:10:09.460
students when they submit something.

NOTE Confidence: 0.807722928333333

01:10:09.460 --> 01:10:12.450
If you pay 99 bucks.

NOTE Confidence: 0.807722928333333

01:10:12.450 --> 01:10:15.102
Then that process starts instantly if

NOTE Confidence: 0.807722928333333

01:10:15.102 --> 01:10:17.569
you register the student, they go OK.

NOTE Confidence: 0.807722928333333

01:10:17.569 --> 01:10:18.734
We're only gonna actually go

NOTE Confidence: 0.807722928333333

01:10:18.734 --> 01:10:20.060
through this process for those

NOTE Confidence: 0.807722928333333

01:10:20.060 --> 01:10:21.410
that register and do something.

NOTE Confidence: 0.807722928333333

01:10:21.410 --> 01:10:24.895
Students are legendary for not

NOTE Confidence: 0.807722928333333

01:10:24.895 --> 01:10:27.434
turning up your organizing a party.

NOTE Confidence: 0.807722928333333

01:10:27.434 --> 01:10:29.950
Oh yeah, we'll all come party arrives.

NOTE Confidence: 0.807722928333333

01:10:29.950 --> 01:10:33.526
No one turns up, and Microsoft knows this.

NOTE Confidence: 0.807722928333333

01:10:33.530 --> 01:10:34.976
And So what they do is, they say,

NOTE Confidence: 0.807722928333333

01:10:34.976 --> 01:10:36.341
OK, we're only actually going

NOTE Confidence: 0.807722928333333

01:10:36.341 --> 01:10:38.290
to give you your authentication.

NOTE Confidence: 0.807722928333333

01:10:38.290 --> 01:10:41.050
Price it cost to do this for free.

NOTE Confidence: 0.807722928333333

01:10:41.050 --> 01:10:42.178
When you turn up,

NOTE Confidence: 0.807722928333333

01:10:42.178 --> 01:10:43.588
so if you're a student,

NOTE Confidence: 0.807722928333333

01:10:43.590 --> 01:10:47.019
get a game out there as soon as you

NOTE Confidence: 0.807722928333333

01:10:47.019 --> 01:10:47.400
registered.

NOTE Confidence: 0.807722928333333

01:10:47.400 --> 01:10:49.110
And that'll start the process off.

NOTE Confidence: 0.877052327142857

01:10:51.270 --> 01:10:53.090
70% fair enough that works for me.

NOTE Confidence: 0.877052327142857

01:10:53.090 --> 01:10:54.608
There's no other way I could

NOTE Confidence: 0.877052327142857

01:10:54.608 --> 01:10:56.020
get that kind of money.

NOTE Confidence: 0.877052327142857

01:10:56.020 --> 01:10:58.414
And so that's that's all the way it is.

NOTE Confidence: 0.877052327142857

01:10:58.420 --> 01:10:59.980
So what have we learned?

NOTE Confidence: 0.877052327142857

01:10:59.980 --> 01:11:02.304
Well, a couple of really good jokes.

NOTE Confidence: 0.851194865

01:11:04.430 --> 01:11:06.416
There's these two lions walking down

NOTE Confidence: 0.851194865

01:11:06.416 --> 01:11:08.530
the middle of Hull High Street.

NOTE Confidence: 0.851194865

01:11:08.530 --> 01:11:09.690
And one sister, the other.

NOTE Confidence: 0.851194865

01:11:09.690 --> 01:11:12.620
It's a bit quiet for a Saturday, isn't it?

NOTE Confidence: 0.851194865

01:11:12.620 --> 01:11:15.020
OK, I quite like that.

NOTE Confidence: 0.851194865

01:11:15.020 --> 01:11:18.016
So what we all have also learned

NOTE Confidence: 0.851194865

01:11:18.016 --> 01:11:19.821
Windows Phone platform provides

NOTE Confidence: 0.851194865

01:11:19.821 --> 01:11:22.485
a really good mix of resources.

NOTE Confidence: 0.851194865

01:11:22.490 --> 01:11:26.380
It's easy to use touch and accelerometer.

NOTE Confidence: 0.851194865

01:11:26.380 --> 01:11:29.866
Physics is easy to add as well.

NOTE Confidence: 0.851194865

01:11:29.870 --> 01:11:32.505
Publishing is is very easy

NOTE Confidence: 0.851194865

01:11:32.505 --> 01:11:35.233
and very cheap in my opinion.

NOTE Confidence: 0.851194865

01:11:35.233 --> 01:11:37.138
There's never been a better

NOTE Confidence: 0.851194865

01:11:37.138 --> 01:11:39.500
time to create mobile games,

NOTE Confidence: 0.851194865

01:11:39.500 --> 01:11:40.795
and you've never had such

NOTE Confidence: 0.851194865

01:11:40.795 --> 01:11:42.090
a good set of tools.

NOTE Confidence: 0.851194865

01:11:42.090 --> 01:11:44.580
Visual Studio is the best

NOTE Confidence: 0.851194865

01:11:44.580 --> 01:11:47.070
place to write code C.

NOTE Confidence: 0.851194865

01:11:47.070 --> 01:11:48.750
Is the best language in my opinion.

NOTE Confidence: 0.851194865

01:11:48.750 --> 01:11:51.310
If you write VB, that's fine you there.

NOTE Confidence: 0.851194865

01:11:51.310 --> 01:11:55.510
PVB wrappers for XNA on phone coming through.

NOTE Confidence: 0.851194865

01:11:55.510 --> 01:11:57.094
So you can think in terms of taking

NOTE Confidence: 0.851194865

01:11:57.094 --> 01:11:58.804
your VB skills and using those if

NOTE Confidence: 0.851194865

01:11:58.804 --> 01:12:00.260
that's what you'd rather work in.

NOTE Confidence: 0.851194865

01:12:00.260 --> 01:12:03.488
So it's all good solid stuff.

NOTE Confidence: 0.851194865

01:12:03.490 --> 01:12:05.380
And it's a great place to work

NOTE Confidence: 0.851194865

01:12:05.380 --> 01:12:07.180
and it works really well in

NOTE Confidence: 0.851194865

01:12:07.180 --> 01:12:08.560
terms of what to do next.

NOTE Confidence: 0.851194865

01:12:08.560 --> 01:12:12.186
The URLs you should look for our

NOTE Confidence: 0.851194865

01:12:12.190 --> 01:12:14.562
create.msdn.com which is the

NOTE Confidence: 0.851194865

01:12:14.562 --> 01:12:16.743
creators website and the most

NOTE Confidence: 0.851194865

01:12:16.743 --> 01:12:18.458
important one which is robmiles.com.

NOTE Confidence: 0.851194865

01:12:18.458 --> 01:12:20.010
Which is my blog.

NOTE Confidence: 0.851194865

01:12:20.010 --> 01:12:22.368
I'll show you my blog because

NOTE Confidence: 0.851194865

01:12:22.370 --> 01:12:23.434
I I'm very shallow.

NOTE Confidence: 0.851194865

01:12:23.434 --> 01:12:25.030
I need I need the traffic.

NOTE Confidence: 0.851194865

01:12:25.030 --> 01:12:26.422
Basically there you go.

NOTE Confidence: 0.851194865

01:12:26.422 --> 01:12:28.241
So this is robmiles.com and it

NOTE Confidence: 0.851194865

01:12:28.241 --> 01:12:30.040
has a a bit of whining about

NOTE Confidence: 0.851194865

01:12:30.097 --> 01:12:31.329
trains that don't work.

NOTE Confidence: 0.851194865

01:12:31.330 --> 01:12:33.948
My schedule all kinds of other stuff,

NOTE Confidence: 0.851194865

01:12:33.950 --> 01:12:35.180
but if you do the sensible

NOTE Confidence: 0.851194865

01:12:35.180 --> 01:12:36.415
thing which is just to add

NOTE Confidence: 0.851194865

01:12:36.415 --> 01:12:37.519
the word demos on the end.

NOTE Confidence: 0.912320626666666

01:12:39.710 --> 01:12:42.972
Robmars.com/demos then what you get now is

NOTE Confidence: 0.912320626666666

01:12:42.972 --> 01:12:45.150
effectively everything you've seen today,

NOTE Confidence: 0.912320626666666

01:12:45.150 --> 01:12:47.364
plus a whole bunch of other stuff as well.

NOTE Confidence: 0.912320626666666

01:12:47.370 --> 01:12:50.729
The Windows Phone blue book is 180

NOTE Confidence: 0.912320626666666

01:12:50.729 --> 01:12:52.892
pages of PDF, which basically tells you

NOTE Confidence: 0.912320626666666

01:12:52.892 --> 01:12:55.366
how to write code for Windows Phone.

NOTE Confidence: 0.912320626666666

01:12:55.370 --> 01:12:58.639
It's got a fairly strong Silverlight focus,

NOTE Confidence: 0.912320626666666

01:12:58.640 --> 01:13:00.446
but there is actually a section

NOTE Confidence: 0.912320626666666

01:13:00.446 --> 01:13:01.650
on XNA as well.

NOTE Confidence: 0.912320626666666

01:13:01.650 --> 01:13:03.690
Silverlight is worth spending some

NOTE Confidence: 0.912320626666666

01:13:03.690 --> 01:13:06.274
time on because at mix Microsoft

NOTE Confidence: 0.912320626666666

01:13:06.274 --> 01:13:08.479
announced that the next version.

NOTE Confidence: 0.912320626666666

01:13:08.480 --> 01:13:11.366
Off the phone, software codenamed Mango

NOTE Confidence: 0.912320626666666

01:13:11.366 --> 01:13:14.438
will let you combine Silverlight and

NOTE Confidence: 0.912320626666666

01:13:14.438 --> 01:13:17.624
XNA programs in the same application.

NOTE Confidence: 0.912320626666666

01:13:17.630 --> 01:13:20.014
Now, one of the problems with XNA is

NOTE Confidence: 0.912320626666666

01:13:20.014 --> 01:13:22.557
that you can make menus and you can

NOTE Confidence: 0.912320626666666

01:13:22.557 --> 01:13:24.870
make buttons and you can do your UI,

NOTE Confidence: 0.912320626666666

01:13:24.870 --> 01:13:26.530
but it's kinda hard work.

NOTE Confidence: 0.912320626666666

01:13:26.530 --> 01:13:29.138
You have to use textures and touch events.

NOTE Confidence: 0.912320626666666

01:13:29.140 --> 01:13:30.270
All that kind of stuff.

NOTE Confidence: 0.912320626666666

01:13:30.270 --> 01:13:33.290
Silverlight is great for UI.

NOTE Confidence: 0.912320626666666

01:13:33.290 --> 01:13:35.341
But it's game behavior is a bit

NOTE Confidence: 0.912320626666666

01:13:35.341 --> 01:13:37.480
slow because of the way it renders.

NOTE Confidence: 0.912320626666666

01:13:37.480 --> 01:13:39.616
It doesn't go as fast as XNA does,

NOTE Confidence: 0.912320626666666

01:13:39.620 --> 01:13:42.014
So what you've got coming down the

NOTE Confidence: 0.912320626666666

01:13:42.014 --> 01:13:44.100
tracks is the best of both worlds.

NOTE Confidence: 0.912320626666666

01:13:44.100 --> 01:13:46.374
You can get a developer who's

NOTE Confidence: 0.912320626666666

01:13:46.374 --> 01:13:48.565
good with Silverlight and good at

NOTE Confidence: 0.912320626666666

01:13:48.565 --> 01:13:50.658
UI design to do your menu side,

NOTE Confidence: 0.912320626666666

01:13:50.660 --> 01:13:52.793
and then you can crack on with the XNA

NOTE Confidence: 0.912320626666666

01:13:52.793 --> 01:13:54.871
side and make a game that plays really

NOTE Confidence: 0.912320626666666

01:13:54.871 --> 01:13:57.017
well and you can marry them together.

NOTE Confidence: 0.912320626666666

01:13:57.020 --> 01:13:58.028
The developer tools without,

NOTE Confidence: 0.912320626666666

01:13:58.028 --> 01:13:59.524
uh, coming out fairly soon.

NOTE Confidence: 0.912320626666666

01:13:59.524 --> 01:14:02.130
So it's well worth taking a look there,

NOTE Confidence: 0.912320626666666

01:14:02.130 --> 01:14:04.060
but here Windows Phone has

NOTE Confidence: 0.912320626666666

01:14:04.060 --> 01:14:05.218
some some Silverlight.

NOTE Confidence: 0.912320626666666

01:14:05.220 --> 01:14:08.020
It'll get you started there and XNA

NOTE Confidence: 0.912320626666666

01:14:08.020 --> 01:14:09.708
if you were to learn some C sharp,

NOTE Confidence: 0.912320626666666

01:14:09.710 --> 01:14:11.628
take a look at my yellow book

NOTE Confidence: 0.912320626666666

01:14:11.628 --> 01:14:13.793
and then here I've got a whole

NOTE Confidence: 0.912320626666666

01:14:13.793 --> 01:14:15.730
bunch of different XNA demos,

NOTE Confidence: 0.912320626666666

01:14:15.730 --> 01:14:18.180
including the ones you've seen

NOTE Confidence: 0.912320626666666

01:14:18.180 --> 01:14:21.029
today and other ones that do

NOTE Confidence: 0.912320626666666

01:14:21.029 --> 01:14:23.179
things like load maps from.

NOTE Confidence: 0.912320626666666

01:14:23.180 --> 01:14:25.240
Bing Maps and display them

NOTE Confidence: 0.912320626666666

01:14:25.240 --> 01:14:26.888
in Windows Phone games.

NOTE Confidence: 0.912320626666666

01:14:26.890 --> 01:14:28.304
There's all kinds of good stuff there.

NOTE Confidence: 0.912320626666666

01:14:28.310 --> 01:14:30.166
Please go along there and take a look.

NOTE Confidence: 0.912320626666666

01:14:30.170 --> 01:14:31.796
I've got 39 seconds left before

NOTE Confidence: 0.912320626666666

01:14:31.796 --> 01:14:33.749
I get to run for the door.

NOTE Confidence: 0.912320626666666

01:14:33.750 --> 01:14:34.670
I could see the clock.

NOTE Confidence: 0.912320626666666

01:14:34.670 --> 01:14:36.162
It's kind of scary,

NOTE Confidence: 0.912320626666666

01:14:36.162 --> 01:14:38.400
but thank you very very much

NOTE Confidence: 0.912320626666666

01:14:38.487 --> 01:14:40.977
for being a tremendous audience.

NOTE Confidence: 0.912320626666666

01:14:40.980 --> 01:14:42.710
Those are the things there.

NOTE Confidence: 0.912320626666666

01:14:42.710 --> 01:14:43.844
So if you have any questions around

NOTE Confidence: 0.912320626666666

01:14:43.844 --> 01:14:45.088
the front and feel free to ask them.

NOTE Confidence: 0.912320626666666

01:14:45.090 --> 01:14:46.287
But thank you for the great audience.

NOTE Confidence: 0.912320626666666

01:14:46.290 --> 01:14:48.200
Don't forget your evals and

NOTE Confidence: 0.912320626666666

01:14:48.200 --> 01:14:49.728
thank you very much.
