Browse content similar to Cracking the Code. Check below for episodes and series from the same categories and more!
Line | From | To | |
---|---|---|---|
Being a racing driver is an exciting job | 0:00:09 | 0:00:12 | |
that needs split-second reactions and nerves of steel. | 0:00:12 | 0:00:15 | |
When driving round tracks at high speeds, | 0:00:15 | 0:00:18 | |
it's important that drivers know exactly what they're doing. | 0:00:18 | 0:00:21 | |
Nowadays, racing simulators are used by all the top racing teams | 0:00:21 | 0:00:24 | |
to train their drivers. | 0:00:24 | 0:00:26 | |
These simulators aim to recreate the racing experience | 0:00:26 | 0:00:29 | |
as closely as possible. | 0:00:29 | 0:00:31 | |
So, how do computers make the virtual world so realistic? | 0:00:31 | 0:00:35 | |
I'm here at Silverstone racing track | 0:00:35 | 0:00:37 | |
with my computer hackers to find out more. | 0:00:37 | 0:00:40 | |
I'm Bradley. | 0:00:40 | 0:00:41 | |
I'm Hannah. | 0:00:41 | 0:00:43 | |
Hi, I'm Stuart, I'm going to be your driver. | 0:00:43 | 0:00:45 | |
Before we can find out how realistic simulators are, | 0:00:50 | 0:00:53 | |
we first need to know what it's like in a real car. | 0:00:53 | 0:00:56 | |
So we're getting in the back | 0:00:56 | 0:00:58 | |
as racing driver Stuart takes the wheel. | 0:00:58 | 0:01:00 | |
Wow, that is so fast and really scary! | 0:01:08 | 0:01:11 | |
Luckily, Stuart's a professional who knows what he's doing. | 0:01:13 | 0:01:16 | |
To get that good, he's needed to do a lot of practice. | 0:01:16 | 0:01:19 | |
OK, how was it? | 0:01:21 | 0:01:23 | |
-Amazing. -It was really cool. | 0:01:23 | 0:01:25 | |
How come you can go so fast on the track? | 0:01:25 | 0:01:28 | |
It's fair to say I've probably done quite a few laps around Silverstone, | 0:01:28 | 0:01:32 | |
I do know it very well. | 0:01:32 | 0:01:33 | |
And also I know the car very well, | 0:01:33 | 0:01:35 | |
so you put those two things together | 0:01:35 | 0:01:37 | |
and obviously that makes it easy for me. | 0:01:37 | 0:01:39 | |
But nowadays, drivers don't do all their practice on the real track. | 0:01:41 | 0:01:45 | |
Our next stop is the University of Hertfordshire | 0:01:46 | 0:01:50 | |
to see how their racing simulator helps drivers | 0:01:50 | 0:01:52 | |
to get the perfect lap time. | 0:01:52 | 0:01:54 | |
I'm here with Geoff, who runs the simulator, | 0:01:54 | 0:01:57 | |
and Claire, whose company makes the simulators. | 0:01:57 | 0:02:00 | |
So guys, what do you think? | 0:02:00 | 0:02:02 | |
Awesome. | 0:02:02 | 0:02:03 | |
Absolutely amazing. | 0:02:03 | 0:02:05 | |
What's it made up from? | 0:02:06 | 0:02:08 | |
The simulator is a complex mix of high-tech hardware and software. | 0:02:08 | 0:02:13 | |
On the hardware side, we've got the motion base, | 0:02:13 | 0:02:16 | |
we have the steering wheel, the pedals, the screens. | 0:02:16 | 0:02:19 | |
And on the software side, | 0:02:19 | 0:02:21 | |
we have lots of models working hard behind the scenes | 0:02:21 | 0:02:23 | |
to make sure the driver sees the right thing | 0:02:23 | 0:02:25 | |
and feels the right thing. | 0:02:25 | 0:02:27 | |
And to make sure the driver does feel and see the right thing, | 0:02:28 | 0:02:31 | |
programmers have to know about physics. | 0:02:31 | 0:02:33 | |
They need to understand how cars behave in real life, | 0:02:33 | 0:02:36 | |
so that they can programme the simulator to work in the same way. | 0:02:36 | 0:02:40 | |
-So if you practise on one of these... -Yeah. | 0:02:42 | 0:02:44 | |
..would you be able to drive a real car? | 0:02:44 | 0:02:46 | |
You would, yeah. | 0:02:46 | 0:02:48 | |
I mean, drivers come in here, professional drivers, | 0:02:48 | 0:02:50 | |
they will drive the car, learn the circuit | 0:02:50 | 0:02:53 | |
and we've had drivers win the race straight after this, | 0:02:53 | 0:02:57 | |
they've never been to the circuit before. | 0:02:57 | 0:02:59 | |
Can we have a go? | 0:02:59 | 0:03:00 | |
Of course, let's go and do it. | 0:03:00 | 0:03:02 | |
In order to make the simulator as realistic as possible, | 0:03:17 | 0:03:21 | |
programmers have to make a very accurate virtual world | 0:03:21 | 0:03:25 | |
inside the computer. | 0:03:25 | 0:03:26 | |
We call this modelling. | 0:03:26 | 0:03:28 | |
So the simulator code must use the laws of physics, | 0:03:31 | 0:03:34 | |
it has to know how to work out the speed of the car | 0:03:34 | 0:03:37 | |
or the forces that the driver feels. | 0:03:37 | 0:03:39 | |
It also needs lots of information - lengths, heights, weights, | 0:03:41 | 0:03:46 | |
numbers that describe the car, the track, the bumps, everything. | 0:03:46 | 0:03:51 | |
So we create our model of the world using rules and information. | 0:03:51 | 0:03:56 | |
This file describes the car, | 0:03:56 | 0:03:57 | |
so if we have a look at it here, | 0:03:57 | 0:03:59 | |
there's various numbers, | 0:03:59 | 0:04:01 | |
you've got the mass of the car, | 0:04:01 | 0:04:02 | |
so that tells you how much the car weighs in kilograms. | 0:04:02 | 0:04:05 | |
We have power, we have braking, | 0:04:05 | 0:04:08 | |
we have the torque of the engine, | 0:04:08 | 0:04:10 | |
so how much power the engine's able to deliver to the track. | 0:04:10 | 0:04:14 | |
What happens if you change the numbers? | 0:04:17 | 0:04:19 | |
These numbers? | 0:04:19 | 0:04:21 | |
Well, you could make a new car. | 0:04:21 | 0:04:22 | |
If we took some of these numbers, | 0:04:22 | 0:04:24 | |
maybe we changed 20 of the numbers, | 0:04:24 | 0:04:27 | |
things like the engine performance, the engine speed, | 0:04:27 | 0:04:31 | |
the weight of the car... | 0:04:31 | 0:04:32 | |
we can make that Renault Megane drive like the F1 car | 0:04:32 | 0:04:36 | |
and be as fast as the F1 car. | 0:04:36 | 0:04:38 | |
That's pretty cool. | 0:04:38 | 0:04:39 | |
So can we have a go with the Formula 1? | 0:04:39 | 0:04:41 | |
We can, yeah, but that is tough, | 0:04:41 | 0:04:43 | |
you've got to be good to drive the F1 car. | 0:04:43 | 0:04:46 | |
So Hannah and Bradley had a few crashes in the Formula 1 car. | 0:05:07 | 0:05:11 | |
Good job it's just a simulator. | 0:05:11 | 0:05:13 | |
But now, it's time to find out how a professional does it. | 0:05:13 | 0:05:17 | |
We've seen how we can represent different cars using information | 0:05:22 | 0:05:25 | |
like the mass of the car or the power of the engine. | 0:05:25 | 0:05:28 | |
But how does a simulator use that information | 0:05:28 | 0:05:31 | |
to create a thrilling experience which responds to the driver? | 0:05:31 | 0:05:34 | |
That's done by writing the computer program. | 0:05:34 | 0:05:38 | |
How do you programme the simulator? | 0:05:38 | 0:05:40 | |
What we can see here is the core computer code of the simulator, | 0:05:40 | 0:05:44 | |
we can see it's a set of many, many commands - | 0:05:44 | 0:05:48 | |
if you turn left, the simulator will move in such a way | 0:05:48 | 0:05:51 | |
that you feel like you're really turning left. | 0:05:51 | 0:05:54 | |
If you put your foot down on the accelerator, | 0:05:54 | 0:05:57 | |
it's going to make you feel you're going really fast. | 0:05:57 | 0:05:59 | |
That's all written in this code. | 0:05:59 | 0:06:02 | |
On screen, we've got a load of words and symbols, | 0:06:02 | 0:06:05 | |
but when we run this code, | 0:06:05 | 0:06:07 | |
it creates the whole simulator experience | 0:06:07 | 0:06:09 | |
and brings the virtual world to life. | 0:06:09 | 0:06:11 | |
This code is where the programmers are applying the laws of physics. | 0:06:11 | 0:06:14 | |
What else does the simulator have to do? | 0:06:14 | 0:06:17 | |
The simulator is having to do so many different things at once. | 0:06:17 | 0:06:21 | |
If you're the driver and you're hurtling towards a corner, | 0:06:21 | 0:06:24 | |
the simulator needs to know - | 0:06:24 | 0:06:25 | |
are you going to make the corner in time? | 0:06:25 | 0:06:28 | |
If you don't, are you going to spin off and hit the wall? | 0:06:28 | 0:06:30 | |
Is it raining? Are you going to slip? | 0:06:30 | 0:06:32 | |
What noises does it need to make, what do the graphics need to show? | 0:06:32 | 0:06:35 | |
Every single element of the simulator is talking to each other | 0:06:35 | 0:06:38 | |
-about 1,000 times a second. -Wow! | 0:06:38 | 0:06:40 | |
So, guys, what did you think of that? | 0:06:40 | 0:06:42 | |
-Awesome. -Scary. | 0:06:42 | 0:06:45 | |
So, how did the two of you think it compared to Silverstone? | 0:06:45 | 0:06:48 | |
When you were racing round, it looked really real. | 0:06:48 | 0:06:51 | |
It was fun, | 0:06:51 | 0:06:53 | |
but it wasn't quite as real as being actually at Silverstone. | 0:06:53 | 0:06:57 | |
The simulator isn't perfect, | 0:06:57 | 0:06:59 | |
because there are limits to what computers can do. | 0:06:59 | 0:07:02 | |
So how much information they can read, | 0:07:02 | 0:07:04 | |
how fast they can work out calculations, | 0:07:04 | 0:07:06 | |
or how much detail the graphics card can draw on the screen. | 0:07:06 | 0:07:10 | |
So simulators may still have some way to go, | 0:07:10 | 0:07:13 | |
but computer programmers are improving on their programs, | 0:07:13 | 0:07:15 | |
and newer computers are making it easier and faster | 0:07:15 | 0:07:19 | |
to work with more information, | 0:07:19 | 0:07:21 | |
so simulators can become even more realistic, | 0:07:21 | 0:07:23 | |
to the point where maybe it will be difficult to tell the difference | 0:07:23 | 0:07:27 | |
between computer-generated environments and the real world. | 0:07:27 | 0:07:31 | |
Video games are popular all over the world | 0:07:42 | 0:07:45 | |
and I know I can be found playing on my games console for hours. | 0:07:45 | 0:07:48 | |
But creating the game can be just as fun and challenging | 0:07:48 | 0:07:51 | |
as playing the game itself. | 0:07:51 | 0:07:52 | |
So I've come to St Saviour's Primary School, in London, | 0:07:52 | 0:07:55 | |
to meet the year sixes who are using Scratch to create games. | 0:07:55 | 0:07:59 | |
So do you all like playing video games? | 0:07:59 | 0:08:01 | |
ALL: Yes. | 0:08:01 | 0:08:03 | |
All of you, that's great. | 0:08:03 | 0:08:04 | |
Well, today, you are going to get some cool stuff, | 0:08:04 | 0:08:06 | |
you're going to create your own video game. | 0:08:06 | 0:08:09 | |
It's a simple game of cat and mouse, | 0:08:09 | 0:08:10 | |
and you're controlling the mouse with your mouse. | 0:08:10 | 0:08:13 | |
'The children are using a free piece of coding software. | 0:08:13 | 0:08:16 | |
'All the commands you need are laid out on the left hand side, | 0:08:16 | 0:08:20 | |
'these are all the instructions which make up your code. | 0:08:20 | 0:08:24 | |
'You then drag all the commands into the middle to write your program. | 0:08:24 | 0:08:28 | |
'On the right, you have your characters, or sprites, | 0:08:28 | 0:08:31 | |
'and above this, your stage, where you can view everything.' | 0:08:31 | 0:08:34 | |
-The mouse is trying to run away from the cat. -Oh, wow. | 0:08:34 | 0:08:38 | |
OK, so how are you doing that? | 0:08:38 | 0:08:40 | |
-You have to give it a script. -OK. | 0:08:40 | 0:08:42 | |
So for the mouse mine is "move 20 steps" | 0:08:42 | 0:08:47 | |
and it would be quite boring | 0:08:47 | 0:08:49 | |
if you had to press it and press it over again, | 0:08:49 | 0:08:51 | |
so you would go to Control, | 0:08:51 | 0:08:53 | |
then you would put "for ever", | 0:08:53 | 0:08:57 | |
-or you can do "repeat", but I'm choosing "for ever". -OK. | 0:08:57 | 0:09:00 | |
And so you could put sounds on it, | 0:09:00 | 0:09:03 | |
just jam it in through here | 0:09:03 | 0:09:05 | |
and it has to, you have to go to Controls again, | 0:09:05 | 0:09:10 | |
and there's an option saying "when green flag clicked", | 0:09:10 | 0:09:15 | |
so you put it at the very top. | 0:09:15 | 0:09:17 | |
And let's test it out and... | 0:09:17 | 0:09:19 | |
Oh yeah, that's cool. | 0:09:19 | 0:09:21 | |
'Although the children are designing the same basic game, | 0:09:21 | 0:09:23 | |
'the beauty of using coding software such as this | 0:09:23 | 0:09:27 | |
'is that it gives the freedom to develop your own version | 0:09:27 | 0:09:30 | |
'and be as creative as you like.' | 0:09:30 | 0:09:32 | |
This mouse, Herbert, follows me around and the cat, Felix, | 0:09:32 | 0:09:37 | |
follows Herbert around, | 0:09:37 | 0:09:39 | |
but when Herbert gets caught by Felix, he turns into a ghost. | 0:09:39 | 0:09:44 | |
Wow! | 0:09:44 | 0:09:46 | |
'Like all good games, we need a scoring system. | 0:09:46 | 0:09:48 | |
'A score is a variable, so you need to use the variable commands | 0:09:48 | 0:09:52 | |
'in the top left of the screen.' | 0:09:52 | 0:09:54 | |
Every time Herbert gets caught by Felix, | 0:09:54 | 0:09:59 | |
the score goes minus 100, | 0:09:59 | 0:10:01 | |
and it goes up every second | 0:10:01 | 0:10:03 | |
when you keep him away from Felix. | 0:10:03 | 0:10:05 | |
OK, so every time the mouse gets caught by Felix, | 0:10:05 | 0:10:09 | |
-you lose 100 points. -Yeah. | 0:10:09 | 0:10:10 | |
But, as long as you keep the mouse away from Felix, | 0:10:10 | 0:10:13 | |
-you're gaining points all the time. -Yeah. | 0:10:13 | 0:10:15 | |
-So you have four sprites in your game? -Yeah. | 0:10:19 | 0:10:22 | |
That's a bit complicated. | 0:10:22 | 0:10:24 | |
-Yeah, it's a harder game to play than the one on here. -Uh-huh. | 0:10:24 | 0:10:27 | |
I still need to work a bit on the programming of the two new ones, | 0:10:27 | 0:10:31 | |
cos it's not really working with the other two ones. | 0:10:31 | 0:10:35 | |
Yeah, at the moment, it looks like Herbert and that fish, | 0:10:35 | 0:10:38 | |
-one of your new sprites, is kind of glued together. -Yeah. | 0:10:38 | 0:10:41 | |
All right, well, it seems awfully complicated, | 0:10:41 | 0:10:44 | |
so I'll let you get on with that. | 0:10:44 | 0:10:45 | |
'When you're programming, things often don't work out the first time, | 0:10:45 | 0:10:49 | |
'so you have to really make sure you've understood the problem | 0:10:49 | 0:10:52 | |
'and that you have all the right steps, and in the right order. | 0:10:52 | 0:10:56 | |
'All this coding has got them thinking | 0:10:56 | 0:10:58 | |
'about the kind of games they'd like to create, | 0:10:58 | 0:11:00 | |
'the rules of the games, and how they'd fit together.' | 0:11:00 | 0:11:04 | |
I would like to make a game based on pinball, | 0:11:04 | 0:11:06 | |
and when the ball touches some holes, it gets points. | 0:11:06 | 0:11:13 | |
I would like to make a maze | 0:11:13 | 0:11:14 | |
and you have to... The character will follow you with your mouse | 0:11:14 | 0:11:18 | |
and you have to collect like, food items along the way to power up. | 0:11:18 | 0:11:21 | |
I would like to make my own car game. | 0:11:21 | 0:11:24 | |
You have to avoid objects | 0:11:24 | 0:11:26 | |
and if you hit an object, you lose points. | 0:11:26 | 0:11:29 | |
Now you've heard their ideas, | 0:11:29 | 0:11:31 | |
what sorts of game would you make? | 0:11:31 | 0:11:33 | |
Where are we? | 0:11:45 | 0:11:46 | |
The Parliament of the Daleks. | 0:11:46 | 0:11:48 | |
I don't know about you, | 0:11:51 | 0:11:52 | |
but I'm a massive Doctor Who fan. | 0:11:52 | 0:11:54 | |
I grew up watching The Doctor, | 0:11:54 | 0:11:56 | |
transfixed as he travelled around the universe | 0:11:56 | 0:11:59 | |
escaping from all the weird and wonderful cultures. | 0:11:59 | 0:12:01 | |
A lot's changed since then, | 0:12:03 | 0:12:04 | |
different Doctors have come and gone, | 0:12:04 | 0:12:06 | |
but I think it's fair to say that the show gets better and better | 0:12:06 | 0:12:09 | |
and looks more and more stunning. | 0:12:09 | 0:12:11 | |
And a lot of that is due to computer programming. | 0:12:11 | 0:12:14 | |
Hi, I'm Joey. | 0:12:16 | 0:12:18 | |
Hi, I'm Effie. | 0:12:18 | 0:12:19 | |
So me and my two lucky hackers, Effie and Joey, | 0:12:19 | 0:12:23 | |
who are both Doctor Who crazy, | 0:12:23 | 0:12:25 | |
have both come to BBC Television Centre | 0:12:25 | 0:12:27 | |
to find out where it all began. | 0:12:27 | 0:12:29 | |
Back in the 1960s, when Doctor Who started, | 0:12:35 | 0:12:38 | |
they used to make all these props by hand, | 0:12:38 | 0:12:40 | |
I mean, they still make some of the props by hand now, | 0:12:40 | 0:12:43 | |
but it's all a bit time-consuming, | 0:12:43 | 0:12:44 | |
so how else do you think they make them? | 0:12:44 | 0:12:47 | |
-Using computers... -Graphics and stuff. | 0:12:47 | 0:12:49 | |
Shall we go and find out? | 0:12:49 | 0:12:50 | |
-Yeah. -Come on, let's go, then. | 0:12:50 | 0:12:52 | |
The next stop is the Visual Effects Studio. | 0:12:56 | 0:12:58 | |
There are many elements that go into making Doctor Who | 0:12:58 | 0:13:01 | |
such an amazing, magical show. | 0:13:01 | 0:13:03 | |
But some of it isn't possible with just actors and props. | 0:13:03 | 0:13:06 | |
So, guys, we're here with Cat and guess what? | 0:13:06 | 0:13:09 | |
She works on Doctor Who! | 0:13:09 | 0:13:11 | |
Really? | 0:13:11 | 0:13:12 | |
Do you actually do the episodes and stuff and like that? | 0:13:12 | 0:13:15 | |
Yeah, we work on a lot of the Doctor Who episodes. | 0:13:15 | 0:13:18 | |
Cat shows the children | 0:13:18 | 0:13:20 | |
how computers are used | 0:13:20 | 0:13:22 | |
to produce really exciting visual effects for the series. | 0:13:22 | 0:13:25 | |
So, let's have a look at this Dalek, | 0:13:25 | 0:13:28 | |
this is one Dalek by itself, but... | 0:13:28 | 0:13:31 | |
-Lonely. -Yeah, he looks lonely. | 0:13:31 | 0:13:34 | |
So how do you think we could make a bunch more Daleks? | 0:13:34 | 0:13:38 | |
BOTH: Um... Copy and paste? | 0:13:38 | 0:13:42 | |
THEY CHUCKLE | 0:13:42 | 0:13:43 | |
Well, we could do that, but it would take a really, really long time, | 0:13:43 | 0:13:46 | |
so, instead, we're going to be lazy and use some programming. | 0:13:46 | 0:13:51 | |
And I've got this little bit of script here | 0:13:51 | 0:13:54 | |
and I can run that to make a set of Daleks, | 0:13:54 | 0:13:58 | |
six rows with six in each row. | 0:13:58 | 0:14:02 | |
'So with this piece of code, | 0:14:03 | 0:14:05 | |
'we can create six rows of six Daleks from the one original Dalek. | 0:14:05 | 0:14:10 | |
'The code tells us that for each row, | 0:14:10 | 0:14:12 | |
'and for every position within the row, make one Dalek. | 0:14:12 | 0:14:15 | |
'Then, move the Dalek into position.' | 0:14:20 | 0:14:22 | |
So, if I just run that. | 0:14:28 | 0:14:30 | |
Wow! That's a lot of Daleks. | 0:14:32 | 0:14:34 | |
We have a little army of Daleks. | 0:14:34 | 0:14:37 | |
When I watched Doctor Who as a kid, | 0:14:37 | 0:14:39 | |
often from behind the sofa, | 0:14:39 | 0:14:41 | |
you could only ever have a few Daleks on screen, | 0:14:41 | 0:14:44 | |
because they were actual props, | 0:14:44 | 0:14:46 | |
but here we're creating whole armies with a little computer code. | 0:14:46 | 0:14:49 | |
'It's terrifying.' | 0:14:49 | 0:14:52 | |
What's even more amazing | 0:14:52 | 0:14:54 | |
is that every single Dalek in that army can behave independently. | 0:14:54 | 0:14:57 | |
Using a piece of code, called the rand command, | 0:14:57 | 0:15:01 | |
we can instruct each Dalek to move its eyestalk, | 0:15:01 | 0:15:04 | |
head and body randomly. | 0:15:04 | 0:15:06 | |
So can we all have a go at changing the code? | 0:15:07 | 0:15:09 | |
Yeah, sure, we could make them look in the same direction, | 0:15:09 | 0:15:12 | |
if you'd like. | 0:15:12 | 0:15:14 | |
Yeah, that would look cool. | 0:15:14 | 0:15:15 | |
So let's change the head rotate, | 0:15:15 | 0:15:17 | |
cos that's which direction they're looking in, | 0:15:17 | 0:15:20 | |
so, instead of this, which picks a random number, | 0:15:20 | 0:15:24 | |
what we're going to do is we can put in just a number that you choose. | 0:15:24 | 0:15:29 | |
So let's give them a number. | 0:15:29 | 0:15:31 | |
Um... I don't know. | 0:15:31 | 0:15:34 | |
Pick a number. | 0:15:34 | 0:15:35 | |
By changing the code, we replace the rand command with a set number | 0:15:37 | 0:15:42 | |
and hey presto, you have an army of Daleks staring in one direction. | 0:15:42 | 0:15:46 | |
And they all look the same, | 0:15:46 | 0:15:48 | |
exactly the same way. | 0:15:48 | 0:15:50 | |
So you wouldn't want to be facing them. | 0:15:50 | 0:15:53 | |
'But that's exactly what we're going to do | 0:15:56 | 0:15:59 | |
'as visual effects artist, Rose, | 0:15:59 | 0:16:00 | |
'puts our acting skills to the test. | 0:16:00 | 0:16:02 | |
'Right, Rose, what's our motivation?' | 0:16:02 | 0:16:05 | |
In this scene, it's the Dalek Parliament, | 0:16:05 | 0:16:07 | |
so you're all surrounded by Daleks, | 0:16:07 | 0:16:10 | |
and I want you to look like, kind of scared. | 0:16:10 | 0:16:12 | |
Brilliant. Yeah, that works, like that. | 0:16:12 | 0:16:15 | |
Brilliant. And action. | 0:16:15 | 0:16:17 | |
When we want to mix actors with computer-generated effects, | 0:16:24 | 0:16:27 | |
you need to film them against a green screen, | 0:16:27 | 0:16:29 | |
so you can replace the background | 0:16:29 | 0:16:31 | |
with something you've designed yourself. | 0:16:31 | 0:16:33 | |
They're everywhere, what are you going to do? | 0:16:33 | 0:16:36 | |
Right, now, stand up, stand up. | 0:16:36 | 0:16:38 | |
Cool, now, look really brave. | 0:16:38 | 0:16:42 | |
Now, you're not going to be scared of these guys, | 0:16:42 | 0:16:44 | |
the Doctor's going to come along and save you in a bit. | 0:16:44 | 0:16:47 | |
'OK, that's a wrap. | 0:16:47 | 0:16:49 | |
'Now, it's back to the edit to upload and review the footage.' | 0:16:49 | 0:16:52 | |
You look great, don't you? | 0:16:52 | 0:16:54 | |
Your face is all covered up. | 0:16:55 | 0:16:57 | |
Wow, look at you, guys. | 0:16:59 | 0:17:00 | |
Oh, it's hilarious! | 0:17:00 | 0:17:02 | |
So shall we put you guys in this? | 0:17:02 | 0:17:06 | |
All right, so... | 0:17:06 | 0:17:08 | |
I'm going to use the computer here | 0:17:09 | 0:17:11 | |
to select all of the green and get rid of it. | 0:17:11 | 0:17:13 | |
-Are you ready? -Yeah. | 0:17:13 | 0:17:14 | |
It's going to look really cool. | 0:17:14 | 0:17:17 | |
There it goes, see? | 0:17:17 | 0:17:18 | |
Is this how they film Doctor Who, then? | 0:17:18 | 0:17:21 | |
Yeah, this is how all of the green screen shots are done on Doctor Who, | 0:17:21 | 0:17:24 | |
using this kind of method. | 0:17:24 | 0:17:27 | |
That's so cool! | 0:17:27 | 0:17:28 | |
How long does it take to film an episode? | 0:17:28 | 0:17:30 | |
It depends on the episode, | 0:17:30 | 0:17:32 | |
it can be anywhere between a few weeks | 0:17:32 | 0:17:35 | |
or a couple of months, it depends on how many creatures are in it. | 0:17:35 | 0:17:38 | |
Now, I can put you on top of the footage I have here, | 0:17:38 | 0:17:42 | |
so that you'll be sitting in the Dalek Parliament. | 0:17:42 | 0:17:45 | |
So here we go. | 0:17:45 | 0:17:48 | |
That's you guys there. | 0:17:48 | 0:17:50 | |
Wow. That's so cool. | 0:17:50 | 0:17:51 | |
'Rose has used a graphics package to superimpose us into the shot. | 0:17:51 | 0:17:55 | |
'The computer runs a program | 0:17:55 | 0:17:56 | |
'which has removed all the green pixels from the footage | 0:17:56 | 0:17:59 | |
'and then merged the video with the computer-generated images. | 0:17:59 | 0:18:03 | |
'Hollywood, eat your heart out. | 0:18:03 | 0:18:05 | |
'Here comes the finished shot, | 0:18:05 | 0:18:07 | |
'the three of us transported into the Dalek Parliament.' | 0:18:07 | 0:18:10 | |
Here I am! | 0:18:13 | 0:18:14 | |
'And here's the Doctor on the same set.' | 0:18:15 | 0:18:18 | |
Remember, next time, when you watch all the monsters on Doctor Who, | 0:18:18 | 0:18:21 | |
that lots of them were generated by computers | 0:18:21 | 0:18:24 | |
and computer code was used to make them move around and look scary. | 0:18:24 | 0:18:27 | |
And it's all done by artists and coders | 0:18:27 | 0:18:30 | |
sitting around computers like these. | 0:18:30 | 0:18:32 | |
When writing your own computer program, | 0:18:47 | 0:18:49 | |
you'll sometimes want to include graphics. | 0:18:49 | 0:18:53 | |
I'm here with the pupils from the Ilsleys Primary School | 0:18:53 | 0:18:55 | |
so we can create our own computer graphics. | 0:18:55 | 0:18:58 | |
You can create something known as a bitmap | 0:18:58 | 0:19:00 | |
and that's when you break the picture down into a grid | 0:19:00 | 0:19:03 | |
of different coloured squares. | 0:19:03 | 0:19:04 | |
Hi, guys! | 0:19:06 | 0:19:08 | |
So we've given you a stack of cards and also a grid, known as a bitmap, | 0:19:08 | 0:19:12 | |
and that has a series of zeros and ones. | 0:19:12 | 0:19:15 | |
Every time you see a zero, that represents white. | 0:19:15 | 0:19:17 | |
When you see a one, that represents a black. | 0:19:17 | 0:19:20 | |
So just turn over the cards when you see a one | 0:19:20 | 0:19:22 | |
and see what picture you get. | 0:19:22 | 0:19:24 | |
'We've got two different teams, | 0:19:27 | 0:19:29 | |
'and each team is working through a different bitmap grid.' | 0:19:29 | 0:19:32 | |
Zero up there, white up there. | 0:19:32 | 0:19:35 | |
'When there's a zero in the grid, they place the card white face up, | 0:19:35 | 0:19:38 | |
'when there's a one, they place it black face up. | 0:19:38 | 0:19:43 | |
'We're using only zeros and ones to represent the information | 0:19:43 | 0:19:46 | |
'and we call this binary. | 0:19:46 | 0:19:48 | |
'So a computer can represent graphics and pictures | 0:19:50 | 0:19:52 | |
'as a grid of numbers. | 0:19:52 | 0:19:54 | |
'Each number tells us the colour of one small square called a pixel, | 0:19:55 | 0:19:59 | |
'and we build up the whole picture using a load of these pixels.' | 0:19:59 | 0:20:03 | |
All right, so, guys, how are you approaching this, | 0:20:03 | 0:20:05 | |
how are you working as a team? | 0:20:05 | 0:20:06 | |
We're doing the corners first and then seeing where they're going. | 0:20:06 | 0:20:09 | |
-So you're the director, telling everyone what to do. -Yeah. | 0:20:09 | 0:20:12 | |
And they place them. Oh, that's cool. | 0:20:12 | 0:20:14 | |
Guys, wow, you seem to be doing really well. What's your strategy? | 0:20:16 | 0:20:19 | |
-Going row, row, row. -Row, row, row. | 0:20:19 | 0:20:21 | |
Cool, so what do you think it could be? | 0:20:21 | 0:20:23 | |
I have no idea, it looks like antennae. | 0:20:23 | 0:20:27 | |
-We don't know... -You've lost where you're at. | 0:20:32 | 0:20:34 | |
One, two, three, four, five, you're on the sixth level up. | 0:20:34 | 0:20:37 | |
Wow, you guys were super quick, that was awesome. | 0:20:41 | 0:20:45 | |
So what do you think it could be? | 0:20:45 | 0:20:47 | |
-Alien. -An alien? Do you all think that? | 0:20:47 | 0:20:50 | |
-Like a robot. -A robot? | 0:20:50 | 0:20:52 | |
What about computers? | 0:20:52 | 0:20:54 | |
Think about games. | 0:20:54 | 0:20:55 | |
-Space Invaders! -Space Invaders, I think that's right. | 0:20:55 | 0:20:58 | |
Wow, you guys have done it as well. | 0:21:00 | 0:21:02 | |
So what do you reckon this is? | 0:21:02 | 0:21:04 | |
-A dog. -A dog? What makes you say that? | 0:21:04 | 0:21:06 | |
Because it's got the legs and it's got the ears, | 0:21:06 | 0:21:08 | |
and it's kind of got the body shape. | 0:21:08 | 0:21:10 | |
-OK, oh, yeah, and that over there's a tail, I suppose. -Yeah. | 0:21:10 | 0:21:13 | |
OK, no eyes, though. | 0:21:13 | 0:21:15 | |
But I've got to ask you, how come that leg down there, | 0:21:15 | 0:21:19 | |
it seems by itself? | 0:21:19 | 0:21:21 | |
Is there a black missing? | 0:21:21 | 0:21:22 | |
So I reckon this one actually should be a black, | 0:21:22 | 0:21:25 | |
I think it was a number one. | 0:21:25 | 0:21:27 | |
Yeah... | 0:21:27 | 0:21:29 | |
-Now, that looks a bit better, doesn't it? -Yeah. | 0:21:29 | 0:21:32 | |
So, guys, these look totally awesome. | 0:21:32 | 0:21:34 | |
However, they do look rather blocky | 0:21:34 | 0:21:36 | |
and that's because the squares we're using are rather big. | 0:21:36 | 0:21:38 | |
So I have some smaller squares, which are a quarter of the size - | 0:21:38 | 0:21:42 | |
you can fit four of these | 0:21:42 | 0:21:43 | |
into one of the squares you've got at the moment | 0:21:43 | 0:21:45 | |
making it a bit smoother, and that's something we call higher resolution. | 0:21:45 | 0:21:49 | |
'A higher resolution picture contains more pixels, | 0:21:55 | 0:21:58 | |
'so there's more information and we can have more detail. | 0:21:58 | 0:22:02 | |
'And there are other ways to improve the picture too. | 0:22:02 | 0:22:05 | |
'Today, we're only using zero and one for white and black, | 0:22:05 | 0:22:09 | |
'but if we used more numbers, we could have different colours. | 0:22:09 | 0:22:13 | |
'When your computer stores a photo, | 0:22:13 | 0:22:15 | |
'each pixel could be any one of over 16,000,000 colours.' | 0:22:15 | 0:22:20 | |
That's better already, can you see? It's actually less harsh, | 0:22:20 | 0:22:24 | |
it curves a bit more, these edges are a lot smoother. | 0:22:24 | 0:22:29 | |
Yeah, that's working really well, cool. | 0:22:29 | 0:22:31 | |
This is pretty impressive. | 0:22:31 | 0:22:33 | |
Oh, you've even put the white bits in the ears. | 0:22:33 | 0:22:35 | |
Yeah, I thought if we could have even smaller squares, | 0:22:35 | 0:22:39 | |
coloured maybe pink inside, | 0:22:39 | 0:22:42 | |
it would look even more effective. | 0:22:42 | 0:22:45 | |
Yeah, you could have the pink inside the ears, that would be great. | 0:22:45 | 0:22:48 | |
So what do you think, do you like it, do you think it looks better? | 0:22:48 | 0:22:51 | |
A bit smoother? | 0:22:51 | 0:22:52 | |
It has a higher resolution. | 0:22:52 | 0:22:54 | |
So, guys, these look great. | 0:22:56 | 0:22:58 | |
The smaller squares have improved it already, | 0:22:58 | 0:23:00 | |
and if we were to go even smaller with the squares, | 0:23:00 | 0:23:03 | |
we could make it much better, and if we were to add more numbers, | 0:23:03 | 0:23:06 | |
not just the zeros and ones, we could actually add some colour too. | 0:23:06 | 0:23:10 | |
Nowadays, miniature computers are everywhere, | 0:23:24 | 0:23:27 | |
inside our tablets and mobile phones. | 0:23:27 | 0:23:29 | |
This is a new generation computer, | 0:23:29 | 0:23:31 | |
the size of a credit card. | 0:23:31 | 0:23:34 | |
These tiny computers are what my hackers and I | 0:23:34 | 0:23:37 | |
have come to see today. | 0:23:37 | 0:23:38 | |
I'm Lottie. | 0:23:38 | 0:23:39 | |
I'm Harry. | 0:23:41 | 0:23:43 | |
And this is Dave. | 0:23:45 | 0:23:46 | |
Today, he's showing us the exciting things | 0:23:46 | 0:23:49 | |
we can do with a tiny computer and a bit of programming. | 0:23:49 | 0:23:52 | |
What is a Raspberry Pi? | 0:23:52 | 0:23:53 | |
It's a small computer, it's very cheap and it's very lightweight. | 0:23:53 | 0:23:57 | |
I thought it would be about that big, | 0:23:57 | 0:24:02 | |
but it's a lot smaller and it can still fit everything you need. | 0:24:02 | 0:24:06 | |
Some things you recognise off a normal computer, | 0:24:06 | 0:24:09 | |
and there's other things you've never seen before | 0:24:09 | 0:24:11 | |
because it's like on the inside, it's inside a computer. | 0:24:11 | 0:24:14 | |
Because it's a fully functional computer, | 0:24:17 | 0:24:19 | |
you can programme it to do all sorts of amazing things, | 0:24:19 | 0:24:22 | |
like building your own electronics projects. | 0:24:22 | 0:24:25 | |
And because it's small, | 0:24:25 | 0:24:27 | |
Dave and his friends have done something really cool. | 0:24:27 | 0:24:30 | |
You might think these photos were taken by satellite, | 0:24:32 | 0:24:35 | |
but, actually, they were taken from this balloon. | 0:24:35 | 0:24:39 | |
Hanging from the balloon is a box which contains an ordinary webcam, | 0:24:39 | 0:24:43 | |
a sat nav tracker, a radio transmitter | 0:24:43 | 0:24:46 | |
and, of course, the miniature computer, | 0:24:46 | 0:24:49 | |
which Dave has programmed to snap the photos | 0:24:49 | 0:24:51 | |
and then beam them back down to Earth. | 0:24:51 | 0:24:54 | |
So this is what we have in the payload, as it's called, | 0:24:54 | 0:24:58 | |
there's the webcam that it takes photos with, | 0:24:58 | 0:25:01 | |
and that's the aerial, so that dangles out the bottom | 0:25:01 | 0:25:05 | |
of the box and that transmits signals maybe 300, 500 miles away. | 0:25:05 | 0:25:11 | |
And how do you get the signals? | 0:25:11 | 0:25:12 | |
I've got a ten-metre pole in the garden there | 0:25:12 | 0:25:16 | |
-with an aerial up the top. -Oh, wow! | 0:25:16 | 0:25:18 | |
'So Dave's connected the webcam and sat nav tracker as inputs | 0:25:18 | 0:25:22 | |
'and the radio transmitter is the output. | 0:25:22 | 0:25:25 | |
'Now we know how it all works, | 0:25:25 | 0:25:27 | |
'let's get the kit ready for launch.' | 0:25:27 | 0:25:29 | |
Perfect, and then just slide in. | 0:25:31 | 0:25:33 | |
'The computer and webcam go into the protective box, | 0:25:35 | 0:25:39 | |
'and this will be hung underneath the balloon.' | 0:25:39 | 0:25:42 | |
That's probably the biggest balloon you've ever seen. | 0:25:42 | 0:25:44 | |
'Dave fills the balloon with helium, just like a massive party balloon.' | 0:25:44 | 0:25:48 | |
It's attacking me. | 0:25:52 | 0:25:53 | |
SHE LAUGHS | 0:25:53 | 0:25:55 | |
'With Dave and his friends, we ease it up into the sky. | 0:26:04 | 0:26:07 | |
'There's a balloon, a parachute, | 0:26:07 | 0:26:09 | |
'our computer and a backup transmitter | 0:26:09 | 0:26:13 | |
'so we can find it even if the computer goes wrong.' | 0:26:13 | 0:26:16 | |
Three, two, one! | 0:26:16 | 0:26:18 | |
THEY LAUGH | 0:26:18 | 0:26:21 | |
Bye-bye, balloon, see you later. | 0:26:26 | 0:26:30 | |
With the balloon launched, | 0:26:31 | 0:26:33 | |
the webcam is already taking pictures. | 0:26:33 | 0:26:35 | |
Each picture is split up into sections | 0:26:35 | 0:26:38 | |
which are transmitted piece by piece | 0:26:38 | 0:26:40 | |
over the radio transmitter back to Earth. | 0:26:40 | 0:26:43 | |
The photos look stunning, | 0:26:43 | 0:26:45 | |
but the quality of the image isn't very high. | 0:26:45 | 0:26:47 | |
The radio transmitter can send us the photos from a long way away, | 0:26:47 | 0:26:51 | |
but it's quite slow, so we can only send low-resolution pictures. | 0:26:51 | 0:26:56 | |
So, when I programme this, I have to choose what size image to take | 0:26:56 | 0:27:01 | |
and how much to compress it down to a file | 0:27:01 | 0:27:03 | |
that takes not too long to send. | 0:27:03 | 0:27:06 | |
So there's a compromise between a nice big image | 0:27:06 | 0:27:09 | |
that's got lots of detail but takes for ever to send | 0:27:09 | 0:27:12 | |
and then, a nice small image that we can send lots of. | 0:27:12 | 0:27:15 | |
All of this only works | 0:27:15 | 0:27:17 | |
because Dave's written some programs for the tiny computer | 0:27:17 | 0:27:19 | |
which make everything work together. | 0:27:19 | 0:27:22 | |
So what does the code look like? | 0:27:22 | 0:27:24 | |
It just looks like somebody's randomly done that. | 0:27:24 | 0:27:27 | |
Oh, yeah, that's how I build my programs. | 0:27:27 | 0:27:29 | |
It's not too bad actually. | 0:27:29 | 0:27:31 | |
One program tells the webcam to take the pictures | 0:27:31 | 0:27:34 | |
and what resolution to take them at. | 0:27:34 | 0:27:36 | |
This is written as a loop | 0:27:36 | 0:27:38 | |
so the webcam keeps taking pictures one after another, every 30 seconds. | 0:27:38 | 0:27:43 | |
Another program sends output to the radio transmitter, | 0:27:43 | 0:27:47 | |
transmitting the pictures to Earth. | 0:27:47 | 0:27:50 | |
It also sends the position from the sat nav tracker, | 0:27:50 | 0:27:53 | |
so that Dave and his friends can track the balloon. | 0:27:53 | 0:27:56 | |
With the balloon floating up above Earth, | 0:28:03 | 0:28:06 | |
Dave and his wife Julie set off to chase it. | 0:28:06 | 0:28:08 | |
The program on the minicomputer is constantly transmitting | 0:28:08 | 0:28:11 | |
its height and location, | 0:28:11 | 0:28:13 | |
so we know exactly where it is. | 0:28:13 | 0:28:15 | |
The balloon could land hundreds of kilometres away - | 0:28:15 | 0:28:18 | |
it's even landed in the sea before. | 0:28:18 | 0:28:20 | |
Let's hope that doesn't happen today. | 0:28:20 | 0:28:22 | |
Meanwhile, back at Mission Control, | 0:28:30 | 0:28:33 | |
with Dave's friend Anthony, | 0:28:33 | 0:28:34 | |
we view the pictures as well as tracking the balloon | 0:28:34 | 0:28:37 | |
and following Dave's progress. | 0:28:37 | 0:28:39 | |
OK, so those are just coming in now, | 0:28:40 | 0:28:43 | |
those are slightly higher than you would go in a plane. | 0:28:43 | 0:28:46 | |
If you just go up a little bit, | 0:28:46 | 0:28:48 | |
-you see the sky's beginning to get dark. -Yeah. -Yeah. | 0:28:48 | 0:28:52 | |
And you're getting more and more of the curvature of the Earth. | 0:28:52 | 0:28:54 | |
It's incredible, it's amazing. | 0:28:54 | 0:28:57 | |
I like that one because there's the sun, | 0:28:57 | 0:28:59 | |
the Earth and the black of space. | 0:28:59 | 0:29:01 | |
Yeah, it's beautiful, it's gorgeous. | 0:29:01 | 0:29:03 | |
That's one of my favourites because it's really bright. | 0:29:03 | 0:29:06 | |
Yeah. That's incredible. | 0:29:06 | 0:29:08 | |
It's amazing to think these photos were taken | 0:29:11 | 0:29:13 | |
by a computer the size of a credit card | 0:29:13 | 0:29:15 | |
floating above the clouds in a homemade box. | 0:29:15 | 0:29:19 | |
Dave even holds the record | 0:29:19 | 0:29:21 | |
for the highest photograph taken by amateur equipment, | 0:29:21 | 0:29:24 | |
nearly 40 kilometres above the Earth. | 0:29:24 | 0:29:27 | |
But today, our balloon is only travelling | 0:29:27 | 0:29:30 | |
up to about 30 kilometres. | 0:29:30 | 0:29:32 | |
That's still three times as high as a passenger plane flies. | 0:29:32 | 0:29:36 | |
Then, it bursts and starts its descent back to Earth by parachute. | 0:29:36 | 0:29:41 | |
-OK, there it goes, it's just burst. -Oh, wow! | 0:29:41 | 0:29:44 | |
Looks like it's burst. | 0:29:44 | 0:29:45 | |
Oh, good, what altitude did it burst at? | 0:29:45 | 0:29:48 | |
30, 431. | 0:29:48 | 0:29:49 | |
30, 431. OK, that's good. | 0:29:49 | 0:29:51 | |
So Dave now knows, so he will go and track it down. | 0:29:51 | 0:29:54 | |
Yeah, he will have picked up in the car that it's burst | 0:29:54 | 0:29:57 | |
and he will now be going. | 0:29:57 | 0:29:58 | |
'After about 30 minutes, the balloon lands back on Earth.' | 0:29:58 | 0:30:02 | |
So that's the field it's landed in. | 0:30:02 | 0:30:04 | |
'Once the height we're receiving stops going down, | 0:30:04 | 0:30:07 | |
'we know the balloon's landed | 0:30:07 | 0:30:09 | |
'and, of course, we also get a picture of the ground.' | 0:30:09 | 0:30:13 | |
Can we talk to Dave? | 0:30:13 | 0:30:15 | |
Yeah, absolutely, yeah, if you type in that box there, | 0:30:15 | 0:30:17 | |
type in, "Dave, head up the M11." | 0:30:17 | 0:30:19 | |
We're heading left on the M11 in a few miles. Excellent! | 0:30:22 | 0:30:26 | |
There's a road on the left there, | 0:30:37 | 0:30:39 | |
so that's probably where we want Dave to get to. | 0:30:39 | 0:30:41 | |
As night falls, Dave pulls up in the field, | 0:30:47 | 0:30:50 | |
but will he be able to find the box in the dark? | 0:30:50 | 0:30:53 | |
There you go, so, how has it survived? | 0:30:55 | 0:30:59 | |
That looks pretty good, so almost completely intact, | 0:30:59 | 0:31:03 | |
and that's what's left of the balloon. | 0:31:03 | 0:31:05 | |
TELEPHONE RINGS | 0:31:05 | 0:31:07 | |
-Oh, there you go. Well, let's see where they're at. -It's just moved. | 0:31:07 | 0:31:10 | |
Hiya, Dave. | 0:31:10 | 0:31:12 | |
Hey, Anthony, how are you doing? | 0:31:12 | 0:31:13 | |
-Hey, excellent. -'I have some good news for you.' | 0:31:13 | 0:31:15 | |
I am holding in my hand | 0:31:15 | 0:31:17 | |
a parachute, the full piece of latex | 0:31:17 | 0:31:19 | |
and the Pi payload and buzz as well. | 0:31:19 | 0:31:22 | |
ALL: Yeah! | 0:31:22 | 0:31:23 | |
Superb! | 0:31:23 | 0:31:24 | |
'That's cool.' | 0:31:24 | 0:31:26 | |
They're quite pleased. | 0:31:26 | 0:31:28 | |
-Very pleased, yeah. -Speak to you soon. | 0:31:28 | 0:31:30 | |
-'Thank you, bye-bye.' -Bye, cheers, bye. | 0:31:30 | 0:31:32 | |
This has been a record-breaking piece of programming, | 0:31:34 | 0:31:37 | |
and we've been able to take some amazing pictures. | 0:31:37 | 0:31:40 | |
'By learning to program, | 0:31:40 | 0:31:41 | |
'there's all sorts of things we can make possible, | 0:31:41 | 0:31:43 | |
'whether it's creating a game for our mobile phone | 0:31:43 | 0:31:46 | |
'or doing something really cool with a tiny computer.' | 0:31:46 | 0:31:50 | |
The sky's the limit. | 0:31:50 | 0:31:51 | |
Today's computers are getting smaller and cheaper, | 0:32:02 | 0:32:05 | |
and this little thing is a Raspberry Pi. | 0:32:05 | 0:32:07 | |
It's a credit card-sized computer | 0:32:07 | 0:32:09 | |
and you can plug in your keyboard, mouse and monitor. | 0:32:09 | 0:32:14 | |
These have been designed to explore computer programming, | 0:32:14 | 0:32:17 | |
so I've come to St Saviour's Primary | 0:32:17 | 0:32:19 | |
to see how they're using their Pi | 0:32:19 | 0:32:20 | |
to generate code that has some real bite. | 0:32:20 | 0:32:23 | |
'Getting started is really straightforward. | 0:32:24 | 0:32:26 | |
'Just like any computer, plug in your inputs, such as your keyboard, | 0:32:26 | 0:32:31 | |
'and your outputs, in this case, your monitor. | 0:32:31 | 0:32:35 | |
'With the computers connected up, | 0:32:35 | 0:32:36 | |
'we're using open source coding software | 0:32:36 | 0:32:40 | |
'to programme a motion-sensing crocodile, | 0:32:40 | 0:32:42 | |
'so that when you place your finger in the croc's mouth, | 0:32:42 | 0:32:44 | |
'it'll bite you.' | 0:32:44 | 0:32:46 | |
It's now croc time, so you should see a box of Lego | 0:32:48 | 0:32:50 | |
along with some instructions - get going! | 0:32:50 | 0:32:52 | |
'So first off, following the instruction sheet, | 0:33:01 | 0:33:03 | |
'the group need to build their crocodile.' | 0:33:03 | 0:33:06 | |
Donna, where does this one go? | 0:33:06 | 0:33:09 | |
'The crocodile will then be brought to life by connecting it up | 0:33:09 | 0:33:12 | |
'to the miniature computer before we start the coding.' | 0:33:12 | 0:33:16 | |
-Is it those? -Yeah! | 0:33:16 | 0:33:17 | |
OK, so what are all these bits? | 0:33:17 | 0:33:19 | |
So, this is the motor and this is the sensor, | 0:33:19 | 0:33:23 | |
so when the finger comes along, | 0:33:23 | 0:33:26 | |
-there will be a thing here and it will... -Trap your finger. | 0:33:26 | 0:33:31 | |
Yeah, trap your finger. | 0:33:31 | 0:33:32 | |
So it will be the roof of the mouth. | 0:33:32 | 0:33:34 | |
And then, what does the motor do? | 0:33:34 | 0:33:37 | |
So the motor powers it to go up and down. | 0:33:37 | 0:33:39 | |
Up and down, oh, cool. | 0:33:39 | 0:33:41 | |
'So, in this system, the sensor is the input and the motor the output.' | 0:33:41 | 0:33:47 | |
So if you put your finger here, it will bite you? | 0:33:47 | 0:33:50 | |
Yeah. | 0:33:50 | 0:33:51 | |
So has everyone finished building their crocodiles? | 0:34:00 | 0:34:02 | |
ALL: Yes. | 0:34:02 | 0:34:03 | |
Awesome, now we're getting to the dangerous bit. | 0:34:03 | 0:34:05 | |
We want you to write a program, using Scratch, | 0:34:05 | 0:34:08 | |
so that when you put your finger in the crocodile's mouth, | 0:34:08 | 0:34:10 | |
it will bite you. | 0:34:10 | 0:34:12 | |
In the same way that the crocodile fits together piece by piece, | 0:34:12 | 0:34:15 | |
this computer code fits together like building blocks. | 0:34:15 | 0:34:19 | |
All the commands you need are on the left hand side of the screen, | 0:34:19 | 0:34:22 | |
which you drag into the middle to write your program. | 0:34:22 | 0:34:25 | |
For this program, we're going to need to use the sensing commands, | 0:34:25 | 0:34:29 | |
which tell the crocodile when to shut its mouth. | 0:34:29 | 0:34:32 | |
The sensor value tells you how far you are from the crocodile's mouth. | 0:34:32 | 0:34:36 | |
As your hand gets closer to the sensor, the number decreases, | 0:34:36 | 0:34:40 | |
so you need to check what number it goes down to | 0:34:40 | 0:34:43 | |
when your finger is in its mouth. | 0:34:43 | 0:34:45 | |
Now that the croc is programmed to know when to bite, | 0:34:46 | 0:34:49 | |
we need to programme it so it knows how to bite, | 0:34:49 | 0:34:52 | |
so we need to write some code for the croc's motor | 0:34:52 | 0:34:55 | |
so its mouth will open and shut. | 0:34:55 | 0:34:57 | |
Great, so you've programmed yours to start biting your finger, right? | 0:34:57 | 0:35:01 | |
-Yeah. -OK, do you want to show me what you did? | 0:35:01 | 0:35:03 | |
So, as you can see, it's less than 20, | 0:35:03 | 0:35:07 | |
it won't bite unless it's under 20. | 0:35:07 | 0:35:11 | |
-So 20, that's the distance your finger is from the sensor. -Yeah. | 0:35:11 | 0:35:15 | |
So when it closes, it stays on for one second, | 0:35:15 | 0:35:20 | |
and then, this way means it goes open, | 0:35:20 | 0:35:24 | |
so it goes that way for one second and then this way. | 0:35:24 | 0:35:27 | |
-So it bites your finger for one second and then lets go? -Yeah. -OK. | 0:35:27 | 0:35:31 | |
-And that's all down to your programming? -Yeah. | 0:35:31 | 0:35:33 | |
Oh, that's so cool. | 0:35:33 | 0:35:35 | |
'And it really is that straightforward | 0:35:35 | 0:35:37 | |
'to write a simple computer program.' | 0:35:37 | 0:35:39 | |
Congratulations, you all built and coded a finger-biting crocodile. | 0:35:39 | 0:35:44 | |
Did anyone lose any fingers though? | 0:35:44 | 0:35:46 | |
ALL: No. | 0:35:46 | 0:35:47 | |
Good stuff. | 0:35:47 | 0:35:49 | |
'It's incredible to think you can do all this | 0:35:49 | 0:35:52 | |
'with such a tiny little computer. | 0:35:52 | 0:35:54 | |
'I wonder what else you can do with it?' | 0:35:54 | 0:35:56 | |
Robots aren't just in science-fiction stories, | 0:36:09 | 0:36:12 | |
they're already playing a role in our lives, | 0:36:12 | 0:36:15 | |
from making cars, toys and electronic gadgets - | 0:36:15 | 0:36:17 | |
we've even got them playing their own sport now. | 0:36:17 | 0:36:20 | |
WHISTLE | 0:36:20 | 0:36:22 | |
All robots are controlled by a computer, | 0:36:22 | 0:36:24 | |
but the question is, how does the computer tell them what to do? | 0:36:24 | 0:36:28 | |
My hackers and I are going to find out. | 0:36:28 | 0:36:30 | |
Hi, I'm Sam. | 0:36:30 | 0:36:32 | |
Hi, I'm Saffia. | 0:36:32 | 0:36:34 | |
We've come to Plymouth University to meet their robot football team. | 0:36:34 | 0:36:37 | |
Come on, guys! | 0:36:37 | 0:36:38 | |
One, two, three, go! | 0:36:41 | 0:36:43 | |
Today, it's people versus machines. | 0:36:49 | 0:36:52 | |
Sam and Saffia are using game controllers | 0:36:52 | 0:36:54 | |
to control these white robots, | 0:36:54 | 0:36:56 | |
but they're up against Plymouth's Black Ninja robots, | 0:36:56 | 0:36:59 | |
who play football in the International Robot World Cup. | 0:36:59 | 0:37:03 | |
The black robots have been programmed | 0:37:03 | 0:37:05 | |
so they can play by themselves, | 0:37:05 | 0:37:07 | |
they don't need anyone controlling them with joy pads. | 0:37:07 | 0:37:09 | |
It's pretty clever stuff. | 0:37:09 | 0:37:11 | |
These are our football robots. | 0:37:12 | 0:37:14 | |
The rules state, in the competition, | 0:37:14 | 0:37:16 | |
that all the robots have to be what's known as autonomous, | 0:37:16 | 0:37:19 | |
that means automatic. | 0:37:19 | 0:37:21 | |
So they have to do everything by themselves, | 0:37:21 | 0:37:24 | |
without humans controlling. | 0:37:24 | 0:37:26 | |
The main thing about these robots is that they use shapes | 0:37:26 | 0:37:30 | |
and colours to define things, | 0:37:30 | 0:37:32 | |
but they have to have little tricks, | 0:37:32 | 0:37:35 | |
like an orange thing on a green background. | 0:37:35 | 0:37:39 | |
If you took that orange ball | 0:37:39 | 0:37:40 | |
and you put it over in a different coloured background, | 0:37:40 | 0:37:43 | |
it won't think that's the ball. | 0:37:43 | 0:37:44 | |
You have to make very simple rules to make it understand what to do. | 0:37:44 | 0:37:49 | |
THEY CHEER | 0:37:49 | 0:37:54 | |
'To make robots play for themselves, | 0:37:55 | 0:37:58 | |
'we have to write computer code - | 0:37:58 | 0:38:00 | |
'it's this code that makes the robot do things, | 0:38:00 | 0:38:02 | |
'like walk or kick the ball. | 0:38:02 | 0:38:04 | |
'Programmers need to think hard | 0:38:04 | 0:38:06 | |
'about exactly what actions the robot needs to perform, | 0:38:06 | 0:38:09 | |
'what things does the program need to know | 0:38:09 | 0:38:11 | |
'and what things doesn't it need to worry about. | 0:38:11 | 0:38:14 | |
'For example, if we want to programme a robot goalkeeper | 0:38:14 | 0:38:18 | |
'we need to know where the ball is and when it's heading for the goal, | 0:38:18 | 0:38:21 | |
'so the position is the most important thing. | 0:38:21 | 0:38:24 | |
'We can think of a number line for our position, | 0:38:24 | 0:38:28 | |
'with zero in the middle where our goalkeeper starts. | 0:38:28 | 0:38:31 | |
'If the ball is heading for the negative numbers, | 0:38:31 | 0:38:34 | |
'then the goalkeeper dives to the right. | 0:38:34 | 0:38:36 | |
'If it's positive, | 0:38:36 | 0:38:37 | |
'then the goalkeeper dives to the left, | 0:38:37 | 0:38:40 | |
'and if it's near the middle, then he stays in the middle. | 0:38:40 | 0:38:43 | |
'But what does the code to control the goalkeeper actually look like?' | 0:38:43 | 0:38:47 | |
If the ball is between this far away and over to the left, | 0:38:47 | 0:38:52 | |
then we want you to dive left. | 0:38:52 | 0:38:54 | |
'If the position along the goal line | 0:38:54 | 0:38:57 | |
'is bigger than 100 but less than 2,000, | 0:38:57 | 0:39:00 | |
'then the code makes the goalkeeper dive to the left. | 0:39:00 | 0:39:03 | |
'But if the position is between minus 100 and minus 2,000, | 0:39:06 | 0:39:11 | |
'the goalkeeper dives right.' | 0:39:11 | 0:39:13 | |
And also, we have to have a robot that just stands in the middle, | 0:39:13 | 0:39:17 | |
because, otherwise, if he dived left | 0:39:17 | 0:39:19 | |
and the ball was going straight at us, it would be a goal. | 0:39:19 | 0:39:21 | |
'If the position is close to zero, | 0:39:21 | 0:39:24 | |
'in between minus 100 and positive 100, | 0:39:24 | 0:39:26 | |
'then the goalkeeper stays in the middle. | 0:39:26 | 0:39:30 | |
'So the goalkeeper decides what he's going to do | 0:39:30 | 0:39:33 | |
'using these "if" conditions.' | 0:39:33 | 0:39:35 | |
How do you write such a long and complicated code? | 0:39:41 | 0:39:43 | |
A long piece of code is made up of small functions, | 0:39:43 | 0:39:49 | |
and the functions do various little things that we want. | 0:39:49 | 0:39:53 | |
So "looking for ball" would be a function. | 0:39:53 | 0:39:55 | |
Then "walk to ball" would be another function. | 0:40:00 | 0:40:03 | |
So that makes it much more manageable. | 0:40:08 | 0:40:10 | |
So robots break down playing football | 0:40:10 | 0:40:13 | |
into a series of different functions, simple tasks. | 0:40:13 | 0:40:16 | |
I wonder how different that is from what Sam and Saffia are doing | 0:40:16 | 0:40:19 | |
when they're controlling their robots. | 0:40:19 | 0:40:22 | |
Oh, come on! | 0:40:22 | 0:40:23 | |
BOTH: Yeah! | 0:40:23 | 0:40:25 | |
Once a program has been written, | 0:40:25 | 0:40:27 | |
the code gets downloaded onto the robot. | 0:40:27 | 0:40:30 | |
Each robot has its own processor board, | 0:40:30 | 0:40:33 | |
a tiny computer that runs the code | 0:40:33 | 0:40:34 | |
so it can decide what the robot should do. | 0:40:34 | 0:40:37 | |
All right, guys, that's it, OK. | 0:40:41 | 0:40:44 | |
The scores are 2-0 to the white team. | 0:40:44 | 0:40:46 | |
THEY CHEER | 0:40:46 | 0:40:48 | |
'With so many things to do, | 0:40:48 | 0:40:49 | |
'playing football's actually a very complicated game | 0:40:49 | 0:40:51 | |
'for a robot to play. | 0:40:51 | 0:40:53 | |
'Even with all the long code, | 0:40:53 | 0:40:55 | |
'the autonomous robots couldn't always find the ball | 0:40:55 | 0:40:58 | |
'or kick it in the right direction, | 0:40:58 | 0:40:59 | |
'so they just couldn't win against Saffia and Sam.' | 0:40:59 | 0:41:03 | |
Press that button there and he'll do an impression of Usain Bolt. | 0:41:03 | 0:41:07 | |
HE CHUCKLES | 0:41:07 | 0:41:08 | |
It's a pretty good look, right? | 0:41:08 | 0:41:10 | |
So robots can be programmed to play football and other games | 0:41:14 | 0:41:17 | |
by breaking the tasks down into a series of simple instructions. | 0:41:17 | 0:41:21 | |
But this robot is called iCub, | 0:41:21 | 0:41:24 | |
and he doesn't need step by step instructions, | 0:41:24 | 0:41:26 | |
he can learn what to do for himself. | 0:41:26 | 0:41:28 | |
We looked at how children learn | 0:41:28 | 0:41:31 | |
and we tried to model that process | 0:41:31 | 0:41:35 | |
so that our robot is able to learn | 0:41:35 | 0:41:38 | |
in the same way that you or I can. | 0:41:38 | 0:41:40 | |
This is a box. | 0:41:42 | 0:41:43 | |
iCub: Box. | 0:41:45 | 0:41:46 | |
-Cool. -What is this? | 0:41:46 | 0:41:47 | |
iCub: Box. | 0:41:49 | 0:41:50 | |
This is a stapler, what is this? | 0:41:53 | 0:41:55 | |
iCub: Stapler. | 0:41:56 | 0:41:57 | |
Where is the box? | 0:41:59 | 0:42:01 | |
'So iCub has been programmed in a different way. | 0:42:07 | 0:42:10 | |
'His computer program can learn new things, | 0:42:10 | 0:42:12 | |
'and that's a very complicated program to write.' | 0:42:12 | 0:42:16 | |
Does it only recognise one voice | 0:42:16 | 0:42:18 | |
or does it recognise other people's voices? | 0:42:18 | 0:42:20 | |
We use a commercial software for speech recognition, | 0:42:20 | 0:42:24 | |
and that's been trained on my voice. | 0:42:24 | 0:42:26 | |
Does it understand Northern, my accent? | 0:42:26 | 0:42:29 | |
-It would if we trained it on your voice, yes. -OK. | 0:42:29 | 0:42:31 | |
Getting speech recognition to work with children is difficult | 0:42:31 | 0:42:34 | |
because the pitch is much higher. | 0:42:34 | 0:42:36 | |
'So the robot really only understands Tony's voice, | 0:42:37 | 0:42:40 | |
'but we're going to give it a go anyway.' | 0:42:40 | 0:42:43 | |
This is a box. | 0:42:43 | 0:42:45 | |
What is this? | 0:42:45 | 0:42:47 | |
'Try speaking deeper, try to sound more like Tony.' | 0:42:48 | 0:42:51 | |
This is a box. | 0:42:51 | 0:42:53 | |
What is this? | 0:42:54 | 0:42:56 | |
iCub: Box. | 0:43:00 | 0:43:02 | |
Yeah, that's cool! | 0:43:02 | 0:43:05 | |
This is a stapler, what is this? | 0:43:09 | 0:43:12 | |
iCub: Box. | 0:43:15 | 0:43:17 | |
Where is the box? | 0:43:20 | 0:43:21 | |
THEY CHEER | 0:43:25 | 0:43:28 | |
'Tony says that iCub's learning things like children do. | 0:43:28 | 0:43:31 | |
'I wonder how similar it is | 0:43:31 | 0:43:33 | |
'to the way people actually do learn things.' | 0:43:33 | 0:43:36 | |
Why did it get some things wrong? | 0:43:36 | 0:43:39 | |
If we'd written our program as a series of steps to execute, | 0:43:39 | 0:43:44 | |
then it would have gone through those steps | 0:43:44 | 0:43:46 | |
and it would have performed perfectly. | 0:43:46 | 0:43:48 | |
What's going on here with iCub, | 0:43:48 | 0:43:50 | |
because it's learning things in much the same way that children do, | 0:43:50 | 0:43:55 | |
it does make mistakes, | 0:43:55 | 0:43:56 | |
it makes quite a lot of mistakes | 0:43:56 | 0:43:58 | |
and that doesn't always make for the best demo. | 0:43:58 | 0:44:01 | |
What iCub's doing that's different is... | 0:44:01 | 0:44:05 | |
it's working in situations that the designer can't foresee - | 0:44:05 | 0:44:09 | |
you can't lay down a set of rules saying, you know, | 0:44:09 | 0:44:12 | |
"This is what a stapler is going to look like." All right? | 0:44:12 | 0:44:15 | |
Because then somebody will bring in some new stapler | 0:44:15 | 0:44:18 | |
that looks a bit different and iCub's lost. | 0:44:18 | 0:44:21 | |
'Learning a few objects might not seem like much, | 0:44:21 | 0:44:24 | |
'but this is early days. | 0:44:24 | 0:44:25 | |
'Programmers like Tony are constantly developing their programs | 0:44:25 | 0:44:29 | |
'and improving them so that one day in the future, | 0:44:29 | 0:44:32 | |
'robots will be able to learn to do all sorts of things.' | 0:44:32 | 0:44:36 | |
So there's still some way to go, but, like all technologies, | 0:44:36 | 0:44:40 | |
it only takes a matter of time. | 0:44:40 | 0:44:42 | |
Maybe in the future, you'll be working on the next generation | 0:44:42 | 0:44:45 | |
of robot football players. | 0:44:45 | 0:44:47 | |
Have you ever wanted to own your own robot? | 0:44:59 | 0:45:01 | |
Robots are really cool, but they're useless | 0:45:01 | 0:45:03 | |
if you can't tell them what you want them to do | 0:45:03 | 0:45:06 | |
in a way that they'll understand. | 0:45:06 | 0:45:07 | |
So I'm here at The Digital School House | 0:45:07 | 0:45:10 | |
with some pupils from Marish Primary School | 0:45:10 | 0:45:12 | |
and they're going to show me how they program their own robots. | 0:45:12 | 0:45:15 | |
We've got a map of a town, | 0:45:16 | 0:45:18 | |
full of buildings like hairdressers, florists and a gym. | 0:45:18 | 0:45:22 | |
Our car is going to start next to the sports shop at A | 0:45:22 | 0:45:25 | |
and then drive through the town to the baker's at B. | 0:45:25 | 0:45:28 | |
FD, | 0:45:32 | 0:45:34 | |
RT90, | 0:45:34 | 0:45:37 | |
FD. | 0:45:37 | 0:45:39 | |
First of all, we've got to plan our route, | 0:45:39 | 0:45:41 | |
breaking it down into a sequence of step-by-step instructions. | 0:45:41 | 0:45:45 | |
We can get around the whole town with just three instructions - | 0:45:45 | 0:45:48 | |
move forward, turn left 90 degrees and turn right 90 degrees, so that | 0:45:48 | 0:45:53 | |
our car follows the road through the town avoiding all buildings. | 0:45:53 | 0:45:57 | |
FD, FD, done. | 0:45:58 | 0:46:02 | |
Now, we're recreating the town on our computer, | 0:46:03 | 0:46:06 | |
using different pictures to represent the shops and buildings. | 0:46:06 | 0:46:10 | |
We're making this like a town so the car can move around. | 0:46:10 | 0:46:14 | |
We're trying to match these pictures with those pictures over there. | 0:46:14 | 0:46:19 | |
OK, so all these objects represent shops in the town, is that it? | 0:46:19 | 0:46:23 | |
Yeah. | 0:46:23 | 0:46:25 | |
So we go to gym, we press gym. | 0:46:25 | 0:46:28 | |
So you've just added gym to the objects of things | 0:46:28 | 0:46:30 | |
that now are on your map. | 0:46:30 | 0:46:32 | |
Yeah, so it will make it more interesting, cos then | 0:46:32 | 0:46:34 | |
the robotic car can go to lots of different places, like everyday life. | 0:46:34 | 0:46:40 | |
Oh, cool. | 0:46:40 | 0:46:42 | |
Now we create a procedure called "Drive". | 0:46:42 | 0:46:45 | |
A procedure is the list of instructions | 0:46:45 | 0:46:47 | |
that our car is going to follow. It will only do exactly what we tell it | 0:46:47 | 0:46:52 | |
so we've got to make sure we've got all the instructions right | 0:46:52 | 0:46:55 | |
otherwise the car will go the wrong way. | 0:46:55 | 0:46:58 | |
So can you tell me about the commands? | 0:46:58 | 0:47:00 | |
Well, I'm telling it to do forward, forward, right turn 90 degrees. | 0:47:00 | 0:47:06 | |
So the FD means forward and then the RT90 means right turn 90, | 0:47:06 | 0:47:12 | |
so that 90 is the degrees you want your car to turn. | 0:47:12 | 0:47:15 | |
These simple instructions are the building blocks of our code, | 0:47:15 | 0:47:19 | |
and with the right sequence of instructions | 0:47:19 | 0:47:21 | |
we can make the robot travel any route we like. | 0:47:21 | 0:47:24 | |
So, where will your car end up, then? | 0:47:25 | 0:47:27 | |
Next to the bakery. | 0:47:27 | 0:47:29 | |
-OK, fingers crossed, that's if everything works out. -Yeah. | 0:47:29 | 0:47:32 | |
An important part of programming | 0:47:32 | 0:47:34 | |
is to test the code that we've written. | 0:47:34 | 0:47:37 | |
Some of the groups have decided to test their procedures | 0:47:37 | 0:47:39 | |
on the computer before they try it out with their actual robot. | 0:47:39 | 0:47:44 | |
That's a good idea, because it's going to be much quicker | 0:47:44 | 0:47:46 | |
to change it now rather than later. | 0:47:46 | 0:47:49 | |
Looks like the car's crashing into the gym. | 0:47:49 | 0:47:51 | |
You might need to check the code, guys! | 0:47:51 | 0:47:53 | |
Once we've tested it, we need to connect up our car | 0:47:55 | 0:47:58 | |
and download the procedure, so our code can tell the robot what to do. | 0:47:58 | 0:48:02 | |
And now, the moment of truth. Have we got it right? | 0:48:03 | 0:48:07 | |
We've made it past the first bend. | 0:48:11 | 0:48:13 | |
Hang on! | 0:48:15 | 0:48:16 | |
It's all gone wrong on this corner. | 0:48:16 | 0:48:18 | |
We should have turned right 90 degrees, | 0:48:18 | 0:48:20 | |
but we're going back the way we came. How did that happen?! | 0:48:20 | 0:48:24 | |
And now we've crashed into the cake shop. | 0:48:24 | 0:48:26 | |
That's what happens when you don't test your code properly! | 0:48:26 | 0:48:29 | |
Looking good so far. | 0:48:39 | 0:48:40 | |
So close! | 0:48:43 | 0:48:45 | |
But they've gone forward again. | 0:48:45 | 0:48:47 | |
They've missed the turn. Now they're not even on the map! | 0:48:47 | 0:48:51 | |
And, into the crash barrier. | 0:48:51 | 0:48:52 | |
When I was there, I was meant to do a RT90 | 0:48:52 | 0:48:55 | |
then move forward twice and then do an LE90. | 0:48:55 | 0:48:58 | |
OK, so it was the right and left you got wrong, basically. | 0:48:58 | 0:49:01 | |
Oh, that's such a shame, guys! | 0:49:01 | 0:49:03 | |
-Do you think it's going to work? -Yeah! | 0:49:03 | 0:49:05 | |
-Do you guys think it's going to work? -Yes. | 0:49:05 | 0:49:08 | |
OK, let's go. Fingers crossed. | 0:49:08 | 0:49:11 | |
Tension's mounting! | 0:49:23 | 0:49:25 | |
Brilliant! We've made it! | 0:49:33 | 0:49:35 | |
That's great, guys! Next to the baker, just how we wanted to be. | 0:49:35 | 0:49:39 | |
Cool! It looks like it's going to be easy | 0:49:39 | 0:49:41 | |
just to write a set of instructions, doesn't it? | 0:49:41 | 0:49:44 | |
But actually, it's quite hard. | 0:49:44 | 0:49:45 | |
But you need those instructions to be precise, so that your robot | 0:49:45 | 0:49:48 | |
knows exactly where to go, that step-by-step process. | 0:49:48 | 0:49:52 | |
When you're programming, you often have to find and fix mistakes | 0:49:52 | 0:49:56 | |
until your code does exactly what you want. | 0:49:56 | 0:49:59 | |
We call mistakes "bugs", | 0:49:59 | 0:50:00 | |
and getting rid of the bugs is all part of the fun. | 0:50:00 | 0:50:04 | |
Everybody loves playing with toys, | 0:50:15 | 0:50:17 | |
whether it's train sets, | 0:50:17 | 0:50:19 | |
action figures or board games. | 0:50:19 | 0:50:22 | |
Many of today's toys already have computers in, | 0:50:23 | 0:50:27 | |
but there's a new generation of toys | 0:50:27 | 0:50:28 | |
which are way more sophisticated | 0:50:28 | 0:50:30 | |
making their way into toy stores near you. | 0:50:30 | 0:50:33 | |
To find out more about this, | 0:50:33 | 0:50:35 | |
my two intrepid hackers, Edward and Hannah, have come with me | 0:50:35 | 0:50:39 | |
to meet two guys who've created something quite extraordinary. | 0:50:39 | 0:50:43 | |
Hi, I'm Edward. | 0:50:43 | 0:50:44 | |
Hi, I'm Hannah. | 0:50:46 | 0:50:48 | |
They've produced something they call AppToys, | 0:50:48 | 0:50:50 | |
which use the newest technologies | 0:50:50 | 0:50:52 | |
and the most inventive computer programming. | 0:50:52 | 0:50:55 | |
So, guys, do you know what AppToys are? | 0:50:55 | 0:50:57 | |
-Well, I know what apps are. -I know what toys are. | 0:50:57 | 0:50:59 | |
But we're not really sure what AppToys are. | 0:50:59 | 0:51:01 | |
OK, I think we're just about to find out. | 0:51:01 | 0:51:03 | |
Hi, guys. Come on down. | 0:51:06 | 0:51:07 | |
Thanks for coming. My name's Elliot, this is Martin. | 0:51:11 | 0:51:15 | |
Together, we're toy developers | 0:51:15 | 0:51:17 | |
and we'd like to show you our range of products. | 0:51:17 | 0:51:20 | |
AppToys use smart devices, such as phones or tablets, to control them. | 0:51:20 | 0:51:25 | |
First off, you download an app to your smart device, | 0:51:25 | 0:51:28 | |
which is then placed inside the toy, | 0:51:28 | 0:51:30 | |
such as a dog kennel or police car, which you buy from a toy shop. | 0:51:30 | 0:51:34 | |
When you put the phone inside the kennel | 0:51:34 | 0:51:38 | |
the phone recognises that it's inside the kennel. | 0:51:38 | 0:51:42 | |
Then it divides the screen up accordingly | 0:51:42 | 0:51:45 | |
so that it aligns with our mirrors, which gives it the 3D effect. | 0:51:45 | 0:51:49 | |
So, we have the phone that has the app we downloaded, | 0:51:49 | 0:51:53 | |
and then we've put it into this hardware, where there's mirrors, | 0:51:53 | 0:51:56 | |
but how does it all come together? | 0:51:56 | 0:51:58 | |
Are there sensors in the hardware, so the phone recognises it's there? | 0:51:58 | 0:52:04 | |
Yeah, there's accelerometers and the accelerometer recognises | 0:52:04 | 0:52:07 | |
what angle it's at, so if it's upside down, | 0:52:07 | 0:52:10 | |
which is what is required for the kennel, we can recognise that. | 0:52:10 | 0:52:13 | |
Smartphones are mini-computers | 0:52:13 | 0:52:15 | |
and have a number of different inputs, processors and outputs. | 0:52:15 | 0:52:21 | |
The accelerometer is one of these inputs | 0:52:21 | 0:52:24 | |
and tells the phone which way up it is. | 0:52:24 | 0:52:26 | |
The AppToy also uses the phone's other inputs, such as | 0:52:26 | 0:52:30 | |
the microphone, and processing software like speech recognition. | 0:52:30 | 0:52:34 | |
So, in this case, you give your virtual pets different commands. | 0:52:34 | 0:52:38 | |
Chase tail. | 0:52:38 | 0:52:40 | |
Wow! | 0:52:40 | 0:52:41 | |
-So it's using voice activation. -That's good. | 0:52:41 | 0:52:44 | |
-Can it roll over? -It can roll over. Roll over! | 0:52:44 | 0:52:48 | |
THEY LAUGH | 0:52:48 | 0:52:49 | |
-So how do you feed it? -You say, "Feed", | 0:52:49 | 0:52:51 | |
then you put your finger through the front | 0:52:51 | 0:52:53 | |
and the camera is looking for your finger | 0:52:53 | 0:52:55 | |
so it knows that you've fed it. | 0:52:55 | 0:52:57 | |
Some of the toys make use of the smartphones' ability | 0:52:57 | 0:53:00 | |
to transfer information between them using Bluetooth technology. | 0:53:00 | 0:53:04 | |
This one's a bit scarier than a dog. | 0:53:04 | 0:53:06 | |
CREATURE ROARS | 0:53:06 | 0:53:09 | |
That's called Battle-Dino | 0:53:09 | 0:53:10 | |
because you train it to become a real fighting machine | 0:53:10 | 0:53:13 | |
and then you send it to your friend's crate | 0:53:13 | 0:53:16 | |
and they battle it out together, so the strongest dinosaur wins. | 0:53:16 | 0:53:19 | |
-Wow! -That's really, really good. | 0:53:19 | 0:53:22 | |
That's cool? | 0:53:22 | 0:53:23 | |
-Good, we spent a long time working on it! -HE LAUGHS | 0:53:23 | 0:53:26 | |
AppToys use the existing technologies of smartphones, | 0:53:27 | 0:53:31 | |
but they still need to program all this technology | 0:53:31 | 0:53:33 | |
to get it to do all the cool things they want it to. | 0:53:33 | 0:53:37 | |
Programming whizz Martin shows us how he used computer coding | 0:53:37 | 0:53:41 | |
to design the T-Rex game. | 0:53:41 | 0:53:42 | |
HIGH-PITCHED ROAR | 0:53:42 | 0:53:44 | |
In the game, the T-Rex will grow from a baby to an adult | 0:53:44 | 0:53:48 | |
and as he gets bigger, his roar will have to change. | 0:53:48 | 0:53:51 | |
Now, the really cool thing about coding and sound is that you can | 0:53:51 | 0:53:55 | |
use the code to change the sound, so you don't need to have lots of | 0:53:55 | 0:53:59 | |
different recordings of him roaring, you can just change it in code. | 0:53:59 | 0:54:03 | |
And what we did, if we go back and look at the T-Rex code, you can | 0:54:03 | 0:54:07 | |
see, when we go down here, we have this command, "audio.pitch", OK? | 0:54:07 | 0:54:13 | |
The pitch of the sound is the quality that makes it | 0:54:13 | 0:54:16 | |
either high or low, and what we're going to do is, | 0:54:16 | 0:54:19 | |
we just make that pitch equal to the speed that he's animating at. | 0:54:19 | 0:54:24 | |
The computer uses this number, the audio.pitch value, | 0:54:24 | 0:54:28 | |
to determine how long to play the sound for. | 0:54:28 | 0:54:31 | |
-So, can we have a go at that? -Yeah, sure. | 0:54:31 | 0:54:33 | |
OK, so, instead of using the speed to do the pitch, | 0:54:33 | 0:54:38 | |
it could be anything, really, from 0 to 5, 6 or like 2.5, 3.5. | 0:54:38 | 0:54:46 | |
Shall we try 3.5? | 0:54:46 | 0:54:48 | |
-Yeah, go on. -You type it. | 0:54:48 | 0:54:51 | |
3.5. | 0:54:51 | 0:54:54 | |
And then we put that to finish the line, then we'll save it. | 0:54:54 | 0:54:58 | |
So he's going to roar at 3.5 now. | 0:54:58 | 0:55:02 | |
SQUEAKY ROAR | 0:55:02 | 0:55:04 | |
THEY LAUGH | 0:55:04 | 0:55:07 | |
That, it wasn't scary, it sounded like he was in pain! | 0:55:07 | 0:55:10 | |
Like someone had stood on him! | 0:55:10 | 0:55:12 | |
SQUEAKY ROAR | 0:55:12 | 0:55:14 | |
Shall we make it a bit deeper? | 0:55:14 | 0:55:15 | |
Do you want to choose a number that will make it a bit deeper? | 0:55:15 | 0:55:18 | |
0.25. | 0:55:18 | 0:55:23 | |
Let's see what that sounds like. | 0:55:26 | 0:55:28 | |
BOOMING, ECHOING ROAR | 0:55:29 | 0:55:33 | |
If it gets too low, you won't even hear it, you'll just feel rumbling. | 0:55:33 | 0:55:38 | |
That was like a train going through a tunnel or something, wasn't it? | 0:55:38 | 0:55:41 | |
It was very deep. | 0:55:41 | 0:55:43 | |
BOOMING ROAR | 0:55:44 | 0:55:45 | |
And it's not just the pitch you need to code for. | 0:55:45 | 0:55:49 | |
The T-Rex needs a really precise set of instructions. | 0:55:49 | 0:55:52 | |
Commands to tell it when to grow, roar or when to walk. | 0:55:52 | 0:55:56 | |
And it's the same for all the games. | 0:55:58 | 0:56:00 | |
Computer code is written to control everything, | 0:56:00 | 0:56:02 | |
from the speed of the police car, to the bark of the dog. | 0:56:02 | 0:56:06 | |
DOG BARKS | 0:56:06 | 0:56:07 | |
It's been great to get a behind the scenes look at all these AppToys | 0:56:07 | 0:56:10 | |
and unlock some of the secrets of the coding. | 0:56:10 | 0:56:13 | |
But Elliot has got one last thing to show us - their amazing aquarium. | 0:56:13 | 0:56:18 | |
Oh, that's so cool, that looks so realistic! | 0:56:18 | 0:56:22 | |
-Can we go? -Yeah. -Oh, wow! | 0:56:22 | 0:56:25 | |
-It's epic. -Wow. -Looks 3D, right? | 0:56:25 | 0:56:28 | |
Yeah! It's looks like you've got real fish there. | 0:56:28 | 0:56:31 | |
So these things are actually there, and the rest is projected onto this? | 0:56:33 | 0:56:37 | |
-You've got it absolutely right. -How does that work? | 0:56:37 | 0:56:40 | |
Well, we're reflecting the image from the tablet | 0:56:40 | 0:56:45 | |
onto some physical background that, | 0:56:45 | 0:56:47 | |
some of it you can see and some of it you can't see. | 0:56:47 | 0:56:50 | |
-So, can you see the doll on the right-hand side? -Yeah. | 0:56:50 | 0:56:53 | |
So we've pre-programmed in that the fish know where that doll is, | 0:56:53 | 0:56:57 | |
so when they swim behind it we make them disappear, | 0:56:57 | 0:56:59 | |
so it gives the illusion the fish are actually there, | 0:56:59 | 0:57:02 | |
so that's why the whole thing looks so realistic. | 0:57:02 | 0:57:04 | |
It's also interactive, so I can fish in the fish tank. | 0:57:04 | 0:57:09 | |
-Whoa! -Wow! -That is so cool! | 0:57:09 | 0:57:12 | |
Wow, that's amazing! You can go fishing! Fishing in your home. | 0:57:12 | 0:57:16 | |
In this setup, the information is being transferred | 0:57:17 | 0:57:20 | |
between two devices. | 0:57:20 | 0:57:22 | |
The phone's accelerometer is the input | 0:57:22 | 0:57:24 | |
and the display from the tablet, the output. | 0:57:24 | 0:57:27 | |
I'm just trying to figure out how it's all working! | 0:57:27 | 0:57:30 | |
Well, it's using Bluetooth to connect between the two, | 0:57:30 | 0:57:33 | |
and I'm using the accelerometers in here | 0:57:33 | 0:57:35 | |
-to determine what I'm doing with it, so it knows whether I'm... -FISHING REEL WHIRRS | 0:57:35 | 0:57:38 | |
Lifting it up or not. | 0:57:38 | 0:57:40 | |
-Go on, have a go. -You go first. | 0:57:40 | 0:57:41 | |
FISHING REEL WHIRRS | 0:57:41 | 0:57:43 | |
-That's it. -You have to wait for a fish to come to you. | 0:57:43 | 0:57:46 | |
Go on, pull up. Yes! | 0:57:46 | 0:57:48 | |
That was a big one, as well! | 0:57:48 | 0:57:49 | |
I think we'll give you the option to put it back in, | 0:57:49 | 0:57:52 | |
so that people don't get upset. | 0:57:52 | 0:57:53 | |
But this is only a prototype. | 0:57:53 | 0:57:55 | |
Yeah, well, what we're going to do is, when we launch these, | 0:57:55 | 0:57:58 | |
we're going to keep adding the features, | 0:57:58 | 0:57:59 | |
so it's never going to end, we're always going to put stuff in. | 0:57:59 | 0:58:02 | |
So if people come up with some good ideas, we can add it to it. | 0:58:02 | 0:58:05 | |
So, once we want to add a new feature | 0:58:05 | 0:58:07 | |
you just go back to the program, you write some new coding | 0:58:07 | 0:58:10 | |
-and then someone can download that app. -Exactly. | 0:58:10 | 0:58:13 | |
I bet the makers of this smartphone never imagined | 0:58:13 | 0:58:16 | |
that it could be used to control a toy like this, | 0:58:16 | 0:58:19 | |
where a little bit of programming has allowed the creators | 0:58:19 | 0:58:22 | |
of these toys to use Bluetooth and speech recognition software | 0:58:22 | 0:58:25 | |
in such a creative way. | 0:58:25 | 0:58:27 | |
HIGH-PITCHED ROAR | 0:58:27 | 0:58:28 | |
So maybe in the future, teddy bears and dinosaurs will just appear | 0:58:28 | 0:58:32 | |
in your room, in 3D, when you open an app on your phone. | 0:58:32 | 0:58:36 | |
Subtitles by Red Bee Media Ltd | 0:59:01 | 0:59:03 |