Homework
All Years Social Media Family Survey
As part of our continual drive to keep our pupils safe online we are asking all pupils to complete a survey on their family for homework. The aim of the survey is not to pry into home life but to generate discussion between pupils and their family about online safety. The section for family members is anonymous to ensure confidentiality.
The only data that will be stored from this survey is the names of the social media apps that your children are using. We can then use this data to tailor our lessons to teach children how to use these apps safely.
We thank you for your anticipated support on this project.
Click Here to download a PDF of the survey.
Year 8 Homework Project - Microbit Pacman
Click this link to open the Microbit website https://www.microbit.co.uk/create-code
1) First we need to create a function create sprite at the x, y coordinates and that set the variable called hero on the BBC micro:bit the first time we play.
2) Let's set up where we want our ghost will be. Create starting positions of the hero, ghost, and food in each individual quadrant. We will ensure that the ghost, food, and hero is set apart. Divide the BBC micro:bit into 4 quadrants. We don't want hero to be too close to the ghost so let's make the ghost starting positions in the 3 other quadrants. Hero is in the one quadrant. To do this, we need to keep track of the middle point in each quadrant. Create sprite at the x, y coordinates for the hero, food, and ghost.
3) Create a function called change blink that will plot a blinking point so the player can tell between a ghost and hero. The ghost should now blink whilst you are playing).
4) We want to identify the food so the player moves towards the food. We need to set the brightness of the variable food to 8. The brightness of the LED screen is expressed as a number between 0 and 255.
5) We want to include a block from the Loops drawer called While. Then set the While loop to true. This code will be important for repeating code of the game logic of the game. The game will continue to run using While loop while the Boolean condition is true. Finally, include a pause of 400 milliseconds before the logic of the game begins.
6) Let's create a function that will take care of keep the ghost pursuing the hero. We will need to a conditional statement that checks the position of the ghost and hero. The first condition will check if the horizontal coordinates of the ghost is less than the horizontal coordinates of the hero. We create a function from the Game drawer that will check the coordinates of the hero and the ghost. Finally, change the x-direction of the ghost by 1.
Then create another function that will take care of keep the ghost pursuing the hero. We will need to a conditional statement that checks the position of the ghost and hero. The second condition will check if the horizontal coordinates of the ghost is greater than the x-direction of hero. We create a function from the Game drawer that will check the x-direction of hero and ghost. Finally, change the x-direction of the ghost by -1.
7) Let's create the third function and forth function that continues the same logic in the y-direction of pacman and ghost. We create a function from the Game drawer that will check the y-direction of pacman and ghost. Finally, change the y-direction of the ghost to continue following pacman.
8) Let's enable pacman to move in the x-direction and move in the y-direction with acceleration using the BBC micro:bit sensor
9) Do not disconnect the blocks for the conditional statements. We are focusing on this section of the code and are not showing the entire code
Let's setup the logic for the food. If hero is touching "food", increase the score of the game by 1 and set x -direction of food randomly randomly from 0 to 4 and set y-direction of food randomly from 0 to 4.
10) Do not disconnect the blocks from the conditional statements. We are focusing on this section of the code and are not showing the entire code
Let's setup the logic for the food and the ghost to be in different quadrants.
11) Do not disconnect the blocks for the conditional statements. We are focusing on this section of the code and are not showing the entire code
The game over component is now upon the game. If the hero is touching the ghost, let's display game over.
12) Do not disconnect the conditional statements blocks from the remaining blocks. We are focusing on this section of the code and are not showing the entire code
The game can also use the buttons. Let's create a while loop for button A is pressed. If button A is pressed, the micro:bit will display the word Hero. Let's use a while loop for button B is pressed. If button B is pressed, the micro:bit will display image of the hero.
Extension challenges:
It starts straight away. Can you give instructions and a menu first? E.g. press __ to start.
Can you add messages, images or sounds to your game? High-pitched beeps for good things and low for bad. You could try to add a sombre tune when you are caught.