剧集 | 英国皇家科学院圣诞讲座:让火花飞(2014) | 导航列表
这里改写成数字12
Number 12 there
黄色对应数字13
and yellow is 13.
不对 黄色是11
So we put, oh, yellow is 11.
-11吗 好吧 -我们把这里改成11
- 11? yeah. - So we put 11 there
还有这里也是11
and 11 in this one here
-好了 -真棒
- Right. - Brilliant.
之前我还看到过一段代码
I also saw something before yet,
现在还在屏幕上面
it's still up there.
说的是"输出16 打印'砰'"
It says "output 16, print boom."
听起来很棒呀 那是什么呢
That sounds really good to me, what's that?
这些气球其实就像
That's because these balloons, they're like
我们最后大爆♥炸♥的一个倒计时
a countdown to our final explosion
所以它们每隔一秒爆♥炸♥一个
and that's why they go off one second after each other.
我们现在来准备最后的大爆♥炸♥
What we now need is our final explosion.
好吧
Okay.
-戴上这个 -好棒
- Put these on. - Right, brilliant.
我们最后的爆♥炸♥来自这里
Our final explosion comes from in here
这里面有什么呢
and what we've got inside here.
有一个气球
We have got a balloon
这个气球充满了爆♥炸♥性混合气体
and that ballon is full of an explosive mix of gas.
不只是高度易燃气体
Not just highly flammable gas,
而是爆♥炸♥性混合气体
but explosive mix.
-所以会很响的 -太棒了
- So, it is going to be loud. - Yeah, excellent
我把这个放进
And I'm just gonna put it inside there
油桶里 这样声音会更大些
inside the oil drum, it's gonna be a llittle louder.
而且我还要放些别的东西在油桶上面
But I 've got somethings just put on top of the oil drum,
这样我们就能看到爆♥炸♥
so we can see the explosion.
塑料球啊 太棒了
Plastic balls, brilliant.
大家准备好抓住它们
Get ready to catch them, everybody.
好了 塑料球我们也有了
Okay, so we've got our balls,
接下来我们做什么呢
what else do we need to do?
我们只需运行程序就可以了
We just need to run our programme,
你需要做些安全检查 这会很响的
you need to do much safety checks and it is going to be loud.
请大家用手捂住耳朵
I need all of you guys to put your hands over your ears.
爆♥炸♥声会非常非常响
It is going to be very, very loud.
请把灯光调暗一点
And can we lower the lights, please.
给你这个
Here we go.
谢谢
Thank you,
我就站在这儿吧
I am going to stand over here.
但愿好运吧
Fingers crossed,
开始吧
here we go.
五 四
Five, four,
三 二 一...
three, two, one...
起爆
Fire!
这真是太棒了
That was amazing.
-非常感谢芙兰 -谢谢
- Thank you so much Fran. - Thank you
如果有人跟你说写代码很枯燥
If anyone tells you that writing code is boring,
你应该给他们看看刚才
you need to show them that clip that
芙兰引爆气球的这段视频
Fran doing that explosive thhings
那看起来真是太棒了
that looked absolutely brilliant.
刚才芙兰所做的只是为一系列简单事件
What Fran was doing there was just writing code
编写程序
for a simple set of events.
这正是我们这个游戏所需要的
That is exactly the same as we need to do for our game.
这就是我们游戏的代码
Here is the code for our game.
我们这个游戏的代码很长
Our game is quite long
我就不为大家一一介绍其中的细节了
and I will not go into every single detail for you here.
但是我们可以看看其中一个片段
But we could just take a snippet of that.
我们可以看看
We could just look,
比如说
for example,
我们是如何清屏
at how we just clear the board
再从屏幕顶部开始游戏的
and start at the top of the screen.
我们也可以...
Then we could just say...
来看看我们究竟是如何玩的
let's just look at how we actually play,
或者当方块堆积到顶端时
or when it gets to the bottom,
代码是如何告诉这栋大楼
how the code tells the building
游戏结束的
that is game over.
这看起来是一段很长很长的代码
This looks like a long long piece of code.
但这是必须的
But it has to be
因为我们要控制很多不同的可能性
because we are dealing with lots of different possible controls.
然而我们和芙兰刚才用代码所做的事
But we are doing exactly the same thing as
是一样的
Fran did with her code.
这些事情我们一步一步完成
We are taking things step by step
按照一种系统而有序的方式来思考
and we're thinking in a very methodical and very ordered way.
不管怎样 现在我们已经编好了代码
So we have written the code and we have got it now.
我们最后需要的是一个输入装置
The final thing we need to do is to build an input device,
一个用来实际控制游戏的东西
something to actually control our game.
哈里森
So, Harrison,
我们在壳牌中心了吗
are we at the Shell Centre yet?
可以去南岸直播了吗
Can we go live to the South Bank
还是我们太早了点
or are we too early?
好的 太棒了
Oh, brilliant. Okay, excellent.
希望他不会觉得太冷
Hopefully he is not too cold.
其实我都冻僵了
Actually it's freezing.
我们一会儿再跟你连线 哈里森
We are coming back to you Harrison,
我们马上就好了
we are almost there,
再等我们一会儿 好吗
so just bear with us. OK.
好的
Okay, right.
我们的控制器其实不需要很复杂
Our controller doesn't really need to be anything complex.
我们应该可以用任何东西
We should be able to make anything control,
来控制其他东西
well, anything.
例如
For example,
我应该能通过这些果冻
I should be able to make these jellies
控制我的键盘
control my keyboard.
咱们看看
Let's just see,
听起来有点疯狂
it sounds crazy.
真的可以吗
Is it true?
如果我把自己也接入这个电路
If I attach myself to this circuit,
我就可以在这些果冻上演奏了
I should be able to play my jellies.
我可以用果冻做一架钢琴
I can make a piano with jellies.
太不可思议了
Fantastic.
其实我只是在这里
What is happening is
连接了一个非常简单的电路板
I am just using a very simple circuit board here
叫做Makey Makey电路板
called Makey Makey circuit board,
它把每个果冻变成了琴键
which is turning each of my jellies into a piano key,
一旦我把自己接入这个电路
so that when I connect myself to this circuit,
我只要按其中一个果冻就可以使回路闭合
I am completing the circuit by pressing one of the jellies
我也就成为了这个回路的一部分
so I'm becoming part of the circuit.
电脑不会认为这是一个果冻
The computer does not think it is a jelly,
它只会认为这是一条
it just thinks it is a message
来自键盘或鼠标的信息
coming from its keyboard or its mouse.
我可以弹一首曲子
I should be able to play a tune.
我要摇摆起来了
I am a bit wobbly!
如果我们不用果冻 升级一下
Could we replace our jelly and scale it up
比如说 可不可以把果冻换成人呢
and replace the jelly with people, for example?
让我们来看一看
Well, let's see if we can do that.
看一看我们能不能把坐在这里
Let's see if we can turn this front row here
第一排的同学变成键盘
into a keyboard.
我需要你们
What I want you to do is
把手伸出来
stick your hand out like a high five
看一看我们能不能成功
and we can see if it works.
我先把自己接入这个电路
I will connect myself to this circuit.
咱们来试着弹一首曲子
Let's try and play a tune.
准备好了吗
Ready?
她弹奏的曲目是《伦敦在燃烧》
怎么样
What do we think?
我们做到了
I think we do it.
我觉得我们可以把这个用在大楼上
I think we could make that work on our skyscraper.
我们可以用这个简单的电路板
I think we could make a simple game pad, control part
制♥作♥一个简易的游戏操纵手柄
just using a simple circuit board.
我们可能不会用果冻
We probably wouldn't use jelly,
而用一些特殊的制♥作♥模型用的黏土
剧集 | 英国皇家科学院圣诞讲座:让火花飞(2014) | 导航列表