sábado, 14 de enero de 2017

Our first game: a car race!

Lets get started!

1 Start by creating the racetrack backdrop.

Click on the stage-background tap and draw the racetrack.



2 Draw the racing car

Now create your racing car: you can draw an easy one using just some coloured rectangles.




3 Set the starting position

Set the position of the car to the starting point at the beginning of the program, therefore each time the program stars, the car will be ready to run the race!
Set x and y coordinates to the desired location.



4 Move with the arrow keys

Lets make our car move with the arrow keys on the keyboard:

Press the up/down arrow key and the car will move some steps forward/backward.

Or press the right/left arrow key and the car will turn some degrees to the right/left.


5. Watch out! 

The car should not leave the race-track: each time the car touch the green area, it will be moved to the starting point.



6. Using a Variable to Keep Score

Now lets count the number of complete trips around the race track:

The next step is to create a variable which will keep score of the number of laps.

Go to the Variables blocks. Click on the Make a Variable button to display the New Variable dialog box.


Type in the name of the variable (Laps Score) and click the OK button.
Your variable will now be displayed on the stage, and some blocks will appear that you can use with it.

Each time the car reach the finish line (orange color), the Laps Score variable will be increased by 1 and the car will go to its starting point.

Don’t forget to initialize the variable to 0 at the beginning of the program, so it will be ready to start counting from cero next time you play your game.



7. Time the game

What about adding a new variable to time the game
This timer variable will start at a given number of seconds (try 60) and then reduce by 1 every second. 

When the number gets to zero, time’s up!😀😀

Game is over

6. Some ideas

  • Add a second car, so you can play with a friend
  • Decrease some points the laps score whenever the green area is touched
  • Add sound!

7. Give it a try!




viernes, 23 de diciembre de 2016

Glide over the stage area or follow the mouse

Now glide over the stage area.

you can imaging the stage area as a grid with different values in the horizontal or x axis and vertical or y axis.
The center of this area will have values of 0 (x=0; y=0).

When you move the mouse pointer over the stage area you can see the x and y values over the sprite area.

You will use this x and y values or coordinates with the glide block.


In the next video we can see an example:

Make your sprite glide-HD from Lifelong Kindergarten on Vimeo


Or make your sprite follow the mouse pointer


Try these Scratch blocks and see what happens:

Lets make our sprite dance

Watch this video and make your sprite dance.

Lets add some music.
In addition to the blocks that we have already used, in this video we will learn how to add sounds to our project.
Click on the Sounds tab and select one from the many available sounds. You can also record your own voice or music.
Now click on the Scripts tab and drag the 'play sound until done' block.


Make your sprite dance from Lifelong Kindergarten on Vimeo.

What can I do? move, spin, change color...

In the following videos we will use these Scratch blocks.
From the control blocks:



From the motion blocks:


From the looks blocks:

Play with the different Scratch blocks!

Drag and drop Scratch blocks into the scripting area.

Experiment by clicking on each block to see what they do or try snapping blocks together.






In this video you will learn how to move our sprite forward.


Make your sprite spin


Make your sprite change color

jueves, 22 de diciembre de 2016

Programming with SCRATCH

Starting with Scratch:
Scratch is a programming language that makes you easy to create your own interactive stories, games, music, and art.
Scratch Overview Video from ScratchEd on Vimeo.