Online Scratch Coding

Smiley face

Today Tuesday November 4, 2014 we made a pong game by using scratch on our
chrome books. We used three of the four main parts of coding; loops, functions,
variables, and conditionals. I started of by using conditionals to tell the
ball that if it hit the edge or a paddle to bounce away. Then I used loops
to tell the ball to keep moving forever. The last thing I used were variables.
I used the variables to set up the scoreboard in my game.

Above is my game which I embedded. For my game you need two players. To start
the game press the green flag. To move the left paddle use "w" to go up and
"s" to go down. To move the right paddle us the up arrow to go up and use the
down arrow to go down. If you want to pause the game press "p". To restart the
game press space. Enjoy!!

Today Wednesday November 5, 2014 I was assigned a task of making a game on scratch.
The game I had to make had to have user input, a background change, and a clicking
event. I made a game of a car having to dodge police cars. In the beginning the car
tells you to click on it to start the game. It then says that the police is coming
and it asks you if you want to drive. If you say no nothing happens ,but if you say
yes the game starts. When the game starts four police cars come at you at a slow speed.
you have to dodge them. When you pass the first swarm another four come out but at
a slightly faster speed. The swarms keep getting faster and faster until you crash.
In this game I used a variable to change the speed of the police cars every time they
got to the bottom. The click event was made by using a function where it said that when
you click the sprite the background should change and the police cars should come out.

BYOB "Build Your Own Block"

Smiley face

Today we started coding with BYOB. This language is almost the same as scratch except
that BYOB lets you build your own block. BYOB was also developed in Berkeley while
scratch was created in MIT.

Smiley face

Today I also made this cool optical illusion. First I made it and then I made it into
a block.

Smiley face

I first made a pentagon and then I just added a variable to make the spiral bigger.
As you can see in the picture above, all of this was in a repeat loop that repeated
everything 230 times.

Smiley face

I made the pentagon pictured above by using a parameter.

Smiley face

What a parameter does is that it lets you create a block in where you can put a
number to change what you want. As you can see in the picture above I used my
parameter to change the size of my pentagon. This lets me put a number in front
of the block. That number changes the size of the pentagon.

Smiley face

After I made the pentagon, I started using broadcasts to make controls for my sprite.
Even though this does not do anything special when you are alone it does help a lot
when you are on a mesh. Broadcasts are like channels on a walkie talkie. When you are
using a walkie talkie you have to find a channel that no one else is using so that no
one interferes in your conversation. The same goes with broadcasts except that you are
creating the channel. As shown in the picture above I first made it so that when I
press the up key it sends a broadcast. I then made another sprite in where it says that when
my first sprite broadcasts something my second sprite moves up. I had to make a separate
broadcast for every key I was planning to use. Now when I am in a mesh no one else can
control my sprite. The code for my second sprite is pictured below.

Smiley face