On Thursday we have a workshop with teachers about Calliope, the small mini computer. They want to know what they can do with such a thing and teach their students. We will talk about the sensors, buttons, LEDs, but also how to program the Calliope.
For this I programmed a game last night, which I came up with on the way to work in the morning. Since it is supposed to be suitable for children, I called it Cherry and not something with Zombie.
The aim is to catch the falling cherries:
You are standing on the last row and try to catch the cherries. Depending on the level, only one cherry per field is displayed at the first level, which is totally boring. The second level is a bit faster and there are two cherries on the playing field. Level 3 becomes almost too fast for three cherries. In total three cherries may fall to the floor, which is shown by the LED, and the fourth one will be a Game Over.
The catcher is controlled by pressing button A. When he’s at the end, he teleports forward to the beginning. Actually, I wanted to use the second button for back and forth. But it didn’t work and I think it’s quite good with one button.
Here is some code to move the cherries from the previous row to the next and to set the first row:
… if you want to try Cherry out for yourself, you can find the code here.