Ping Pong with Scratch 3 and the BBC Micro:Bit

Ping Pong with Scratch 3 and the BBC Micro:Bit

We all love playing games…..so we decided it was time to recreate the classic Ping Pong game using Scratch 3 and the BBC micro:bit. In the first part of today’s tutorial we will write code in Scratch 3 so that we are able to play the game using our good old computer keyboard. The left and right keys on the keyboard will be used to move the paddle stick towards the left or right of the screen. We will then test out the game to make sure everything works as expected and iron out any issues that we might encounter.

Once we have worked through our first challenge we will focus on adding functionality to our Scratch 3 game that allows us to use the BBC micro:bit as a game controller. We will add code to our Scratch 3 Ping Pong game such that we are able to use the two buttons on the BBC micro:bit to move the paddle to left and right of the screen. We will program Scratch 3 such that button A on the BBC micro:bit moves the paddle to the left of the screen and button B moves the paddle to the right side of the screen. Check out the tutorial below –

In our next tutorial we will build upon the Ping Pong game we have created today and use the sensors on-board the BBC Micro:bit to move the paddle towards the left or right of the screen. We’ll use the tilt sensing capability on the BBC micro:bit and write relevant code in Scratch 3 to move the paddle on the screen.


With the move to Scratch 3 the Ping Pong tutorial is now longer part of the tutorials available at the Scratch website. Click on the following link to download the Ping Pong backdrop for Scratch 3 – <Download>

All our learning content is made available for free at KidzCanCode.com. Access our new free course on Scratch 3 and the BBC micro:bit at KidzCanCode.com through the following link – Exploring Scratch 3 and the BBC micro:bit – I. You can grab a BBC micro:bit here – <OzToyLib Store>.

Hopefully you have enjoyed the tutorials. If you have any questions, comments or suggestions for future tutorials drop us a note at – learning at hack2 dot live.

Leave a Reply

!!! We Can Help You With Your Coding - Electronics - Robotics learning journey. Call us now !!!Shop Now
×

Cart

WANT 10% OFF?
Subscribe to our mailing list and get a 10% discount coupon. Don't miss out!!
    SUBSCRIBE
    I agree with the term and condition