Introduction: How to Create a Microbit Game

About: I am an growing expert of 15 years old and I am an Indian And my state is Tamil Nadu. One day the world will see me that is my dream I have both tinkercad and instructables account My user name on tinkercad i…
Hai pals, In this lesson I am going to teach you how to create a game in tinkercad using the new special component microbit

Supplies

A microbit and your coding skills

Step 1: Place a Microbit

First you need to select the microbit and place it in the the as you want for creating a game in microbit you only need coding more than design

Step 2: Start Creating Variables

for creating game you need to use variables

Variables;
Variables are a word used for storing values we want , variables are major part this game

In this code I have created variables such as
my position for storing value =2
Asteroid= random from 0 to 4. And
Count and score as 0 on Starting

Step 3: Create a Key for Moving My Position

You need fix how to control the character, so the above picture code means that the position of character need to change when 2nd button in microbit when simulation clicked means move

Clear screen block is used for clearing into normal position again after the button is pressed.

Step 4: Plotting the Players and Asteroids

You need use plot X,y block and along with brightness block also need to create points that needs to be in the game
For the asteroids need to fall continusally so we need to use count variable along with maths block as per our wish.

Step 5: Create If Block

This tells us that if the asteroids fall on the character means the game will over and the game starts once again from first onwards.

Step 6: Create Else Block Also ;

The else block implies us that if the 10 asteroids also didn't fall on the character the game will be win by us

Step 7: Execution

The above picture is the result of this coding lesson

I hope everyone understands my project and every one please vote me for Winning the contest
Thank you pals