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.

Once coded and wired up there's plenty of options and fun to be had, but as ever if you really want to get the most out of a new piece of technology then you have to find a good fun way that both demonstrates what the technology can do and also gives enough scope that your starting project can be easily adapted and improved upon.

In this project we're going to make a brain training game, although it shouldn't stretch you too much. The idea being that you have to memorise commands, such as push a button or shake the board when an LED is illuminated on the micro:bit.

This will create a starting point for a larger project that can become more advanced as time, code, hardware and knowledge increases.

This project will demonstrate how to use the official coding areas that are available at the time of launch, but, of course, the basics of this project can easily be adapted for use with MicroPython or any other languages that the micro:bit supports.

We'll also take a progressive look at the code areas available on the micro:bit website, starting with the incredibly easy Block Editor and then moving on to a far more familiar coding environment in the form of Touch Develop.

Once the code is written and tested we can then look at connecting our hardware, albeit a simple push switch. Remember that the micro:bit is designed as an educational aid rather than a rival to the Arduino or the family of Raspberry Pi boards, so although in its own right it's a powerful development tool, if you want to take projects to the next level then the design of the board does enables full and easy integration with these alternatives and other microprocessor boards.

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.

Latest in Computing
Microsoft Surface Laptop and Surface Pro devices on a table.
Hate Windows 11’s search? Microsoft is fixing it with AI, and that almost makes me want to buy a Copilot+ PC
Google Maps on a phone being held in someone's hand
Google Maps is getting two key upgrades, for easier route planning and quicker access to Gemini AI
Gemini on a smartphone.
Gemini 2.5 is now available for Advanced users and it seriously improves Google’s AI reasoning
Pixel Studio on an phone
Pixel Studio on the Pixel 9 now lets you generate AI images of people, and the results can be terrifying
Render of a new RTX 4000 Max-Q gaming laptop.
I can't say I'm surprised, but Nvidia's RTX 5090 laptop GPU has a big performance leap over its predecessor, according to early benchmarks
Google AI Mode
I tried Google's new AI mode powered by Gemini, and it might be the end of Search as we know it
Latest in How Tos
Mobile phone with logo of video game distribution platform Steam operated by Valve on screen in front of web page
How to gift a game on Steam
Venezuela's forward #09 Jhonder Cadiz celebrates after scoring during the 2026 FIFA World Cup South American qualifiers football match between Ecuador and Venezuela, at the Rodrigo Paz Delgado stadium in Quito, on March 21, 2025 ahead of Venezuela vs Peru
Venezuela vs Peru live stream: how to watch today's FIFA World Cup 2026 qualifier anywhere online
The cast of Alone Australia season 3, standing in a knee-high body of water
How to watch Alone Australia season 3 online – stream the survival show from anywhere
Pinterest
How to post on Pinterest
ChatGPT app on an iPhone
5 things you should ask ChatGPT today – oh, and 1 you should never ask it!
This City Is Ours
How to watch This City Is Ours online – stream Sean Bean crime drama from anywhere