Friday 24th April
Coding: L.O. To use variables in the context of a game
We are going to move on to Lesson 3 today. Remember, if you go wrong, you can always reload the template and start again. This session is all about experimenting and trying things out. Coding can be difficult so have a play and see what you can do! Most importantly, enjoy what you're doing :)
Log onto J2e and then click on J2Code. Along the top of the page you will see the links to the lessons. Click on Year 5/6 Lesson plans.
Click on Lesson 3
Watch the video and then click on the lesson plan icon:
Scroll down the page and click on the link for an example of what you are going to do:
Play this a couple of times, until you are sure what you are meant to be doing then click on the template:
This is what you are going to use to complete the following tasks:
Task 1. Add in code to decrease the score by 3 when the rocket crashes. (Use the “set score to” block.
Task 2. Add in a “lives” variable so that the game ends after 3 crashes. You will need to broadcast “game over” when lives is equal to 0.
Challenge: Why not see if you can “clone” the planet sprite and change it to a different planet. Then experiment with the code so the object of the game is to hit the new planet. Look at the example "planet strike" and try making various changes to it.