Lesson #10
Variables - Scoring in Scratch
A variable is a way of storing information in a computer program. Think of a variable like a container and the name of the variable as the label on the container which shows us what is inside. Variables are used in coding and programming to help coders understand, remember, and use the information in the program.
Variables in Scratch can store two types of values: numbers and text. In the video below we explore how to add variables, how to rename variables, how to hide variables and how we can change the value of a variable.
Like many games, keeping score is very important. Variables allow you to control a scoring system in scratch and keep track of this in plain sight. It allows you to know how successful you have been and we all know how exciting it is when you get a new high score! Happy Coding.
Variables Part 1
To fully understand variables we suggest completing the lesson below before moving onto the coding video itself. The PowerPoint and associated lesson plan will allow students to understand the key concepts of variables before adding this to their game
Variables Powerpoint
Variables Lesson Plan (35 minutes)
Key Learning in main task video
Setting scores.
Increasing score.
Plenary
See video input below related to creating Google Forms and using variables.
Questions
What were some of the challenges that arose from the scoring systems chosen?
Do you have a better understanding of the variables you may use in your game?
Extending the Learning
Using Variables In Google Forms
I can create a short quiz in Google Forms.
I can use variables to add a scoring system to my quiz.
I can apply what i have learned about variables to create a scoring system in Scratch.
Suggested Links to IDL Planner
List the skills and qualities that I think would be required of a games designer, visual effects artist, games tester, programmer, animator or script writer (HWB 2-20a)
Create CV for a young adult looking to apply for jobs in the Gaming industry. (HWB 2-20a)
Research further education opportunities related to the gaming industry and outline which subject areas are required to be accepted on these courses. (HWB 2-20a)
Discuss how to remain safe whilst gaming in today’s society. (HWB 2-20a, TCH 2-03a)
Research one of the following games developers and create a Slideshow to share with the class: Atari, Nintendo, Sega Games Co., Electronic Arts, Epic or another games developer of my choice. (SOC 2-06a)
Outline some steps and precautions that we have to take when engaging with others online. (TCH 2-03a)