Micro:bit Avoiding bricks---Additional functions
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
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.
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.
If you have any ideas or opinions, please feel free to contact us via email@example.com.
Share this post
About the Author
- Micro bit supplier
- Wholesale Suppliers
- Micro bit tutorial
- Micro bit classroom pack
- Mcorbit Environment Monitoring
- TPBot car
- Micro:bit car
- AI Lens
- Micor:bit AI Lens
- Microbit gyroscope
- Micro:bit LEDs
- BBC micro:bit
- Micro:bit Manipulator
- Wukong board
- Micro:bit Motorcycle
- Nezha breakout
- Micro:bit DIY
- 360° servos
- AI Lens
- Retro Arcade
- Microbit programming
- Do your:bit
- Rainbow LED Ring
- Wonder Building Kit