How To Make A Football Game in Scratch: Instructables
How To Make A Football Game in Scratch: Instructables
by A_J_M
Have a good day friends. Today i am going to share you how to make a Football (soccer) game in scratch. It is a advanced
scratch tutorial, but even if you are a beginner you can make this project if you just follow my instructions. This is my rst
instructuble so please support.
It is a pretty simple game. It is a 2 player game. You have 2 player Red and Blue ( of course you can change the colors. )
They will be shooting a ball to the goal. you can control it by the arrow keys and wasd keys.
Supplies:
First you need to click on the sprite. Click on costume. delete the current costumes.
Convert the costume window to bitmap. Draw a circle using the red circle draw tool. Draw 2 white eyes using the paint
Go to code window. Drag down the 'when ag clicked' new variable. rst one is redspeedX and the redspeedY.
block. Here is a tip:- when you cannot nd where a Now you need to place list of block under the 'when ag
block is look it's color and go to the panel of the clicked' block. I had put the photo of the codes above.
color, and you will nd that block in there. you need Just look at codes and be a copycat.
to create some variables. go to variables panels. click on
Hover the mouse above the create new sprite and click on paint. Convert it to bitmap. select the circle tool and select the
outline. change ll colour to black. Daw a circle and ll it with white color.
Click sprite one. And do the coding just like shown in the second photo. We using the 'w,a,s,d' keys to control the read
ball. Try controlling the red ball with 'w,a,s,d' keys, isn't it smooth.
we are going to shrink the ball and the sprite. set the size to 50 or any other number you want.
Add the blocks shown in the rst image. and then click on new message in broadcast. change it to 'redpoint'.
then go to variable make a new variable named 'balldirection'. create another variable called 'ballspeed'. And drop down
the codes done in the last image just above.
The blue player is identical to the red player,I am simply duplicating the red player.
Duplicate code from 'if touching sprite 1 then'. delete last two block. and place the duplicated code over the last 2 blocks
okay now we are going to add the football eld to this game. yes we are adding the backdrop. Download the image from
this link:- https://drive.google.com/ le/d/0B4DzEoZJ4i8KdGV3Y...
click on the upload backdrop option as shown in the picture. select the downloaded image.
Go to sprite one (red) and drag the block codes shown in rst image. Go to sprite 3 (blue) and do the codes shown in the
second image. Go to sprite 2 (ball) and do the codes shown in third image.we have done a error in a code in sprite 2 . lets
change that. Like in image 4 change 'x position' to 'direction'.
Now our game is somewhat completed , but it not look good right. the variables are all over the screen. To hide the
variables, go to variables unmark/untick all the variables except redscore and bluescore. that is our score line. place the
variables in the goal posts like in the image 2. Double click the variables to change it to a di erent format.
At last our game game is complete. Hurrah...... friends so thank you. please support me. Special Thanks for
you have just created a football game. Do you know Mcguy for inspiration. De nitely check out his
what is the rule creativity is? If you creative or you want channel:-https://www.youtube.com/channel/UC2MtlTiL
to be creative, don't just copy anything you see add your xWNQAjHyF...
own elements to it, customize it ,then that is what i
called creative. you can add an opening title to this BE CREATIVE
game or a timer or a ending were you can know who
won, anything you want. This was my rst instructuble