Can you do the Kettle Run in less than 12 parsecs?

Here’s another Python game for the BBC MicroBit that’s very easy for pupils to edit and improve.

The idea is that you navigate your ship through a canyon – or cave system or mountains. You can rotate your MicroBit through 90 degrees and fly up & down or stay left and right. Use your imagination.

Use the A and B buttons to move left and right (or up and down), avoiding obstacles as you fly. If you hit anything it’s GAME OVER and you press the reset button on the back to play again.

The aim is to get to your home port in order to put the kettle on for a nice cup of tea.

Complete 1 mission, and you go again – this time the game is faster and the terrain harder to navigate. Complete 5 and you win the game.

Hook a speaker or headphones up to pins 0 and GND to hear the audio.

Kettle Run 2 is an improved version with random terrain blocks, longer runs on each level – and an exciting cup of tea as a level up reward.

The game was written in the excellent Mu offline Python editor – just install Mu on your Mac, Windows PC or Linux machine (Ubuntu has been tested, and Raspbian I believe), write your code, plug in your MicroBit, click ‘flash’ and it just works! It even scrolls error messages (or ‘debugging messages’ as I prefer to call them) across the MicroBit display. An amazing piece of work by Nicholas Tollervey and others in the Python community.

Kettle Run code in Mu

There’s loads of scope for students to make improvements to this game, simple or complex:

  • Add more levels by changing while level < 6: to a higher number.
  • Make the game harder by speeding it up more on each level by making the number bigger in speed -= 20
  • Edit the terrain image to make it bigger or more challenging – the game should play as long as the image lasts.
  • Perhaps add different terrains for different levels.

Here’s the code on Github: https://github.com/blogmywiki/kettle_run

And here’s the original Kettle Run in action:

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply