We’ve added some additional functions to the project we shared last week—micro:bit avoiding bricks.
1.Add the GIF while starting the game for a preparation.
2.Add a score counting function
3.Accelerate the falling speed of the bricks with the increasing of the scores.
4.Display the scores while the game is over.
See the samples below:
Open the MakeCode editor:https://makecode.microbit.org/_baW6tqDgkY3J
Boot animation
It requires the show number and show led bricks in the basic drawer.
Choose three show number bricks and one show led and a pause brick as the picture shows.
Score counting:
1.Set the score as 0 as the picture shows:
2.Set the score add by 1 while the value of y is over 3.
Change the falling speed:
You can define it by yourself:
If the score is over 3, set sudu as 500.
If the score is over 6, set sudu as 400.
If the score is over 9, set sudu as 300.
Please note the speed of the falling is faster with a smaller value of sudu.
Program completed:
Link:https://makecode.microbit.org/_i1sazAbHRe1r
If you have any ideas or opinions, please feel free to contact us via [email protected].