micro:bit games
This repo contains several games written in TypeScript for micro:bit chips
- Open game directory in this repo
- Download
.hexfile - Follow steps
6+from the next paragraph
- Go to MS MakeCode and create new project
- Go to the JavaScript tab on the top of the editor
- Replace code field contents with the ones from the
game.tsfile.
Themicrobit.d.tsfile is a file with global typings to code in VSCode with autocomplete instead of an error, it's not required - Ensure code works by running the program in an emulator on the left (green triangle)
- Press
Downloadin the lower-left corner - Connect your micro:bit chip via USB
- Open the
MICROBITdevice from your file manager - Drop the downloaded
.hexfile to the opened device. It will disappear and appear in read-only mode later.
IMPORTANT: do NOT unplug the chip while the indicator there is blinking. - At the end of the indicator flashing unplug and turn on your micro:bit.
Game should start. Use the toggle to turn on/off chip, the bottom button to restart game. Game controls specified in the game description paragraph
- Go to directory
tetrisin this repo - Press
Left button (A)to move block left - Press
Right button (B)to move block right - Press
Both buttons (AB)to rotate block
- Go to directory
snakein this repo - Tilt chip to turn the snake
Do just what you want with this code. No one cares π₯±


