© Pradeeka Seneviratne  2019
Pradeeka SeneviratneBBC micro:bit Recipeshttps://doi.org/10.1007/978-1-4842-4913-0_15

15. Building Simple Games

Pradeeka Seneviratne1 
(1)
Udumulla, Mulleriyawa, Sri Lanka
 

This chapter provides some basic techniques that you can use to develop simple games with the micro:bit LED display and two built-in buttons.

15-1. Creating a Sprite

Problem

You want to create a sprite at (x2,y2) on the micro:bit LED screen.

Solution

  • In the Toolbox, click on the Variables category. Next, click on the Make a Variable… button. In the New variable name box, type sprite for the variable name. Then click the Ok button.

  • In the Toolbox, click on the Variables category. Then click and drag the set sprite to block over, and place it inside the on ...

Get BBC micro:bit Recipes: Learn Programming with Microsoft MakeCode Blocks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.