"It’s Here! The BFCM Sale of the Year – Grab Your Favorites!"

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

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].

Leave a Reply

images
In March, ELECFREAKS supported 5 schools to carry out school science and technology festival activities
images
Children’s Programming Education is the Future Trend
images
Technical verification! Nezha series products can complete WRO competition tasks
images
Let's take part in the Ceremony of the New Factory of ELECFREAKS together!
images
Bluetooth Bee(HC-05 and HC-06) User Guide
images
In March, ELECFREAKS supported 5 schools to carry out school science and technology festival activities
Monthly Archive