Advanced
60 mins
Teacher/Student led
35 points
What you need:

Microbit: Invaders

Embark on an exciting journey to create your own 'Invaders' game using a Microbit. Learn to create and control sprites, detect collisions, and implement game logic. By the end, you'll have a fully functional game to play and share with your friends. Let's get started!
Learning Goals Learning Outcomes

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction

    Welcome to the 'Microbit: Invaders' lesson! In this lesson, you will learn how to create a simple yet exciting game of invaders using a Microbit. This game is inspired by the classic 'Space Invaders' arcade game, where you control a spaceship and your mission is to defeat waves of aliens with a laser cannon. In our version, you will learn how to create and control sprites, detect collisions, and implement game logic. By the end of this lesson, you will have a fully functional game that you can play and share with your friends. Let's get started!


    2 - Creating a Microbit Project

    We have to make a microbit project first. 

    To do this, we can go to the microbit website https://makecode.microbit.org/. Then, we can click New Project to start making our Microbit project.

    3 - Creating the Variables

    For this project, we are going to create three variables; Bullets, Players and Enemy.

    To create our variables, we can click on the Variables category and press the Make a Variable button. We can name these variables Bullets, Players and Enemy.

    4 - Position the Player Sprite

    Now, we are going to create our player sprite and the enemy sprite. 

    For our player sprite, it will be in the middle of the screen. We can use the code below to do this:



    5 - Moving the Player Sprite

    For this part, we are going to be moving our player sprite using the A and B buttons. The A button will move our player sprite to the left while the B button will move it to the right. 

    The code below will handle this logic.


    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more