BBC micro:bit
Using The Matrix

Introduction

In a Kodu world, you can detect when Micorbit is tilted and make something appropriate happen. This page describes how to set up the very simplest of Kodu worlds where you use the accelerometer readings to make the Kodu character move.

A Simple World

Start Kodu Game Lab and make a new world to act as a test environment for you.

Click on the character/object button at the bottom of the screen to add a Kodu character to the world,

Kodu World

Click on the character to be move it into position somewhere over the terrain of your world. Use the left mouse button to drag the character into position. Add a couple of objects to the world. In this example, there is a coin and a heart.

Kodu World

The character is programmed with three statements. The first one makes it move slowly as the micro:bit is tilted. The other two statements draw patterns on the LED when Kodu is moved over one of the objects. When you add the last tile, you get to choose the pattern you want. I chose to display a heart or a coin depending on which object was picked up.

Kodu World

Challenges

  1. Using the extra screen can be an interesting way of displaying a score or a game objective. Imagine a game where you had to collect different objects. There might only be one of each object and the order in which you collect them matters. The matrix could be used to display an icon to represent what needs to be found in the game world.
  2. You don't have to draw patterns. You can scroll words across the screen too. Think of a way to do this in a new or existing game world.