How to code your own game on the BBC Micro Bit

How to code your own game on the BBC Micro Bit

The BBC micro:bit has finally dropped into the hands of many Year 7 students across the UK and there's already a wealth of tutorials and resources out there to help both students and teachers get started.

Those projects are great at the basics, introducing you to what the micro:bit is, the coding languages that you can use, and how to connect physical inputs and outputs such as LEDs and motors to it.

How to code your own game on the BBC Micro Bit

If you're interested in quickly seeing what's possible with the micro:bit, the Block Editor is a great way to visually see what can be done, including connecting directly to a smartphone

To get started make sure that you have your micro:bit plugged into your machine through USB, once done it should appear in your list of drives. Once we write and compile the code the firmware file will download to your computer.

At present this file must be manually dropped from the Downloads folder onto the micro:bit as there's no automatic uploader for Linux distros, but a few have started to appear for Windows.

In your chosen browser open the micro:bit website and then in the navigation across the top select the 'Create Code 'option, then 'Block Editor'. Don't worry we're only going to stay in this environment briefly just to give you a demonstration of what it's all about and you'll also find that the layout is a great way to reference code as you're learning the micro:bit.