A computer is really a system.
It is a combination of two very different parts.
Neither part is any use without the other.
Hardware
These are the bits of the computer you can see and touch. The hardware is NOT clever or intelligent. In fact it can only do what the software tells it to. It needs an application to make it work.
Application
The software application tells the computer what to do. It is a computer program. A program is a lot of simple instructions written by a programmer in a language or code which the computer can understand.
Where do all the software apps that you download onto your phones, chromebooks and tablets come from?
All software applications are written by programmers.
Computer programmers are perfectly normal people who are lucky enough to do a creative job which fascinates them.
Applications, software or programs are written in a computer language. These languages are more like a series of instructions in code.
You have been programming in a language called Scratch.
A Background is just an image that is placed on the Scratch stage - it could be a picture drawn using paint or a photograph downloaded from Google images.
Log into your Scratch account and click on the Create tab.
You will see the Scratch project editor screen shown below.
It is divided into five sections:
Costumes - Learn how to create your own sprite and two different costumes for the same sprite.
Backgrounds - To create a background for your program, you have the options of choosing one from the Scratch library, drawing one of your own, uploading an image that you have saved on your Google drive or taking a snapshot.
Script blocks - Scratch is programmed using pieces of script known as blocks.
There are 10 different blocks paletts in Scratch 2:
Motion - moving a sprite and X Y co-ordinates
Events - when something happens
Looks - setting costumes and text
Control - starting and ending programs, loops and conditions
Sound - adding simple sound effects (you can even record your own)
Sensing - mouse control, sensing and timing
Pen - drawing lines
Operators - calculations and operations
Variables - setting and using variables
More blocks - make a block or add an extension
No matter which language you use, there are certain techniques or constructs that you will need to learn to make your programs more sophisticated.
Read on to learn about some of the most important constructs
To bring your characters to life you are going to make them move.
Practise some of the things that you were taught in the video.
Were you able to make a Sprite move?
Create an animated character (it can be a person, an animal or an alien being) using a single sprite with two costumes. Make it move across the screen changing costume as it goes.
Were you able to use a Repeat Loop to make the cat move across the screen
Remember, Scratch uses X and Y coordinates to position a character on the screen.
Study the picture of the Scratch stage shown above.
What are the x y coordinates of the four fish?
By changing the x and y coordinates of your sprite you can move it round the stage.
x is the horizontal direction.
y is the vertical direction.
To move down you must make x smaller by subtracting.
To move to the left you must make y smaller by subtracting.
The script below shows how to do this using four key press events.
i) Control a sprite using the arrow keys.
You can use the mouse to move a sprite. That is how the girl is moved in the Pony Game.
To see an example of the mouse being used to move a sprite, search for and open the Scratch file, sjcs_pony. Click Remix to make it your own for hacking.
Operators
Operators can be used to make a program do some maths.
You met the > (greater than) operator in the previous lesson.
Other operators are:
+ (add)
x (multiply)
- (subtract)
< (less than)
= (equals)
/ (divide)
You can do a lot of maths with these few operators.
Study the Maths cat program script below.
first_number, second_number and result are the three variables in this program?
Update your your Scratch Programming Progress Record before you move on to the next lesson.
One of the best ways to learn to program is to 'hack' code created by someone else.
This is perfectly acceptable so long as you have the creator's permission to do so.
You can open these games from Scratch 2 - do a search for them and then Look inside.
Hack them to learn some of the constructs used to make them.
sjcs_pony
sjcs_racing_game
sjcs_maths_cat
Click Remix to make them your own for hacking.
You can also use the Mukoku tutorials below to learn how to create simple games in Scratch.
Click this link to try learn more Scratch from the Mukotu tutorials
Search for and open the Scratch file, sjcs_aquarium
Click Remix to make it your own for hacking.
Many games make use of multiple sprites with the same or similar properties. There is no need to program each sprite separately - just program one and then duplicate it.
You can tweek the code later if you want each sprite to do something slightly different.
Watch the video below to find out how to duplicate a script for two or more Sprites.
Update your your Scratch Programming Progress Record and move onto the Scratch app development project.
Reviewing
You will have the opportunity to review a game that was developed by someone else.
For each game you review, complete a new Computer Game Review Report.
As you review a game, write in your name as the Reviewer and the name of the person who developed the game as the Developer.
Comment on two things that you particularly liked about the game.
Give one tip that might help the Developer to improve the game if they have more time.
Rate the game out of 10 (10 is the top score).
NB Write neatly and clearly, you will get a star for each game you thoroughly review.
Python is another programming language.
After Scratch it is probably the best language to learn.
It is a textural language, remember the Q Basic Nerd, it is a bit like the language that he was using. You have to type in all of the script in the form of text characters.
Take one of the Pythoin Beginner booklets and start to work through it.
Once you have learned a few command words you can start to use this language yourself.