Microbit + Scratch

Microbit Accelerometer + Scratch – Burger Game

Project found here.
Original project by 0615022110 remixed from found here.

Even though the code for this game was fairly complex and I admit I did not understand it in its entirety for each of the sprites, switching the controls from the keyboard arrow keys to the microbit’s accelerometer was fairly simple using the “if tilted right” or “if tilted left” blocks. I also chose to use the “any button pressed” block for the jumping motion so that the burger sprite could pass over the spiked hurdles. I actually did not run into the issue of linear mapping, which was the main objective of this week’s assignment, and I’m not sure why ā€“ perhaps it’s cause it wasn’t a pong game?

In order to try using the mapping function, I then tried to remix a straightforward pong game, just like the example we used in class ā€“ and I still remain confused. I was able to use the mapping function and make the paddle go back and forth to the ends of the screen as necessary, as can be seen in the screenshot below. The white rectangle at the bottom right corner is the paddle ā€“ it was able to go to the ends.

However, I was also able to make the paddle go to the ends of the screen, without using the mapping function. I could simply use the “tilt angle” block. In the screenshot below, you’ll see the paddle still went to the ends of the screen.

This has only left me confused, as I don’t think I actually attained the objective of this week’s assignment, but more so because it seems like the mapping function is simply not necessary. I of course may completely be missing something in the code and doing something wrong. Either way, I would love some clarification on this.

Project can be found here – using the mapping function.
Project can be found here – without using the mapping function.
Original project by JackFletcher23-Test remixed from found here.

Leave a comment