WEBVTT

00:00:00.000 --> 00:00:02.780
hi and welcome to the coding in sports

00:00:02.780 --> 00:00:06.390
exploration in this video we'll give a

00:00:06.390 --> 00:00:08.700
quick overview of computer programming

00:00:08.700 --> 00:00:11.730
and see how we can use block coding to

00:00:11.730 --> 00:00:14.759
create our own sports video games let's

00:00:14.759 --> 00:00:18.060
jump in computer programs are the way we

00:00:18.060 --> 00:00:20.789
communicate with the computer and give

00:00:20.789 --> 00:00:23.340
it instructions kind of like the way a

00:00:23.340 --> 00:00:25.590
professional soccer player tells their

00:00:25.590 --> 00:00:27.779
feet when to kick the ball and where to

00:00:27.779 --> 00:00:30.599
direct it but did you know that computer

00:00:30.599 --> 00:00:33.620
programming can also be used in sports

00:00:33.620 --> 00:00:36.239
computer programs can be used in many

00:00:36.239 --> 00:00:38.969
aspects of sports from processing

00:00:38.969 --> 00:00:40.890
different stats to creating games

00:00:40.890 --> 00:00:44.399
simulations today you'll be creating

00:00:44.399 --> 00:00:47.640
your own sports video game by developing

00:00:47.640 --> 00:00:50.309
a computer program we'll be using Java

00:00:50.309 --> 00:00:52.320
Script which is one of today's most

00:00:52.320 --> 00:00:55.170
widely used programming languages let's

00:00:55.170 --> 00:00:58.170
get started we'll be using block coding

00:00:58.170 --> 00:01:00.180
to create our game so let's take a look

00:01:00.180 --> 00:01:03.629
at how the editor works you'll see this

00:01:03.629 --> 00:01:06.060
green block titled program in the middle

00:01:06.060 --> 00:01:06.710
of the screen

00:01:06.710 --> 00:01:09.390
whatever we drop here will be read by

00:01:09.390 --> 00:01:12.030
the computer and added to our game which

00:01:12.030 --> 00:01:14.460
will load in this area on the right side

00:01:14.460 --> 00:01:17.759
of the screen on the left side you'll

00:01:17.759 --> 00:01:20.189
see the coding blocks library that you

00:01:20.189 --> 00:01:23.670
can use to create your game see how all

00:01:23.670 --> 00:01:25.770
of the coding blocks are color-coded and

00:01:25.770 --> 00:01:29.579
in their own library sections we'll be

00:01:29.579 --> 00:01:32.100
creating a simple make a shot game where

00:01:32.100 --> 00:01:34.439
the objective is to bounce an object

00:01:34.439 --> 00:01:37.650
into a goal we will need to set the

00:01:37.650 --> 00:01:39.600
background of our game what the ball

00:01:39.600 --> 00:01:41.579
object looks like what the goal looks

00:01:41.579 --> 00:01:43.950
like and what kind of paddle we use to

00:01:43.950 --> 00:01:47.100
bounce the object around let's start by

00:01:47.100 --> 00:01:50.430
setting our background to add each of

00:01:50.430 --> 00:01:52.409
these components I need to drag the

00:01:52.409 --> 00:01:54.840
block so that it snaps into place

00:01:54.840 --> 00:01:58.020
in my program block did you hear that

00:01:58.020 --> 00:02:01.049
click if the block isn't snapped in the

00:02:01.049 --> 00:02:03.329
computer will not read and load the

00:02:03.329 --> 00:02:06.329
block I can use one of these preset

00:02:06.329 --> 00:02:10.460
images or I can upload my own image

00:02:10.460 --> 00:02:14.240
I'll go to the upload tab here select

00:02:14.240 --> 00:02:17.330
upload file and select the image that I

00:02:17.330 --> 00:02:20.030
want to upload then a link is generated

00:02:20.030 --> 00:02:23.360
that I can use to load the file in my

00:02:23.360 --> 00:02:26.540
program I'll need to remove the current

00:02:26.540 --> 00:02:28.640
image block that is snapped in to delete

00:02:28.640 --> 00:02:30.920
a block you can either drag it to the

00:02:30.920 --> 00:02:33.830
trash can or select the block and press

00:02:33.830 --> 00:02:37.490
the delete button on your computer now I

00:02:37.490 --> 00:02:39.770
need to find the image block with custom

00:02:39.770 --> 00:02:41.940
images

00:02:41.940 --> 00:02:44.850
it's this one right here that has a URL

00:02:44.850 --> 00:02:48.120
I'll go ahead and paste the file URL

00:02:48.120 --> 00:02:52.950
that I copied into this block great now

00:02:52.950 --> 00:02:55.140
that I've added the background I need to

00:02:55.140 --> 00:03:05.740
add the goal paddle and bowl for my game

00:03:05.740 --> 00:03:09.989
you

00:03:09.989 --> 00:03:12.489
for the paddle I'll use one of the

00:03:12.489 --> 00:03:16.360
preset images if you want to see what

00:03:16.360 --> 00:03:18.459
your program looks like you can always

00:03:18.459 --> 00:03:21.340
click run to run the program and see how

00:03:21.340 --> 00:03:26.769
your game looks if you make any changes

00:03:26.769 --> 00:03:29.349
you can just click run again to see an

00:03:29.349 --> 00:03:31.720
updated version of your program once

00:03:31.720 --> 00:03:33.849
you're happy with your game click this

00:03:33.849 --> 00:03:35.980
share button to generate a link that you

00:03:35.980 --> 00:03:39.010
can send to your friends and family now

00:03:39.010 --> 00:03:41.260
it's your turn we hope you enjoy making

00:03:41.260 --> 00:03:44.670
your sports video game
