Posts

Junkbots - Conclusion

Activity 8 - Extensions You’ve now successfully created your Scratch game, well done! Give the game to your partner and see what they think of it, play theirs and compare the two games. There’s still a lot more to do, below are some extra tasks you can do, or make your own up. Have fun ! Extension Tasks: Change the game so that instead of a score limit, there’s a time limit. How would you do this? What blocks would you use? Instead of there only being one item to break, add more in, each being worth a different score Add an end game screen, which shows the users score and maybe even a high score Create more than one bot, each with a different move speed, and let the user choose which one to play with Add an obstacle course, which deducts points if the user touches it.

Junkbots - Scoring

Image
  Activity 7 - Scoring and breaking the rocks This will be the main aim of the game. The code below will allow the user to touch the rock, it then breaks then disappears and a new rock spawns.  The first task is to start a scoring system. This will show the user their score and will update the score every time they hit the rock. It will also end the game when the user reaches a score of 20, you can make this score limit any score you want. To keep score we’ll be creating our own variable. (a data holder). On the scratch blocks scroll down on the left onto the Variables block . Create a variable named score and tick the box, like below:   Our whole code for this part of the game will be in one big loop. The loop will repeat as long as our Score variable is less than our score limit, in this example it’s 20. To make this loop use the Control, Operators and Variable blocks together.  The next loop will run when the user touches the rock. When this is ran, the rock wil...