GithubHelp home page GithubHelp logo

bigeagleowl / mind-the-rocks Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 33 KB

A multi player micro:bit game - all start together and see who can avoid the rocks for the longest!

License: MIT License

Python 100.00%
microbit micropython micropython-scripts game multiplayer bluetooth radio rocks

mind-the-rocks's Introduction

Mind-the-Rocks!

This is a multiplayer game for the BBC micro:bit where you have to avoid the falling rocks. The player who avoids the rocks for the longest wins - simple eh!

How do I Play?

When the game starts, you will see the spinning clock finger on the display. When this stops you are off and running, and the rocks will start dropping from the top of the screen. You are the pixel in the middle of the bottom row. You have to avoid the falling rocks by using the 2 microbit buttons. Button A (on left) moves you to the left and button B (on right) moves you to the right. (Well it would not make sense if it was the other way round.) If a rock hits you, it is game over. The game them restarts - what fun! Oh yes, the rocks fall faster and faster!

I Want to Play with My Friends

  1. Check everyone has Mind the Rocks on their microbit.

We Now Need to Register All the Players Who Want to Join In

  1. Get everyone to reset their microbits using the reset button (which is the button on the opposite side to the LEDs). ย 
  2. When you see the spinning clock finger, press and hold the button A (on left). When it sees others doing the same with their microbits, it lights a LED for each player who joins. Wait till your microbit displays the correct number of players.
  3. When all have joined let go of button A. It will tell you which player number you are, and then it will start the game :-)

Now you Play!

  1. When a rock hits you you will see the skull image, and your microbit will wait till all players have finished.
  2. The microbit will display the number of the player who won. Here's hoping that is you!
  3. It automatically restarts the game so that you can all have more fun!

Where Did the Inspiration Come From?

I attended an Oxford Codebar (their twitter) session on Python programming for microbits where I was demoing the A Shaky Start Talk Timer. There, one of the cool Python Mentors was coding up a block drop type game for the microbit. If that was you I would love to credit you here. This got me thinking that I could write a multi-player version so here it is :-)

Teachers & Coding Mentors

You are very welcome to use this to help make coding fun - in fact that is the whole point. If you have an idea for an improvement, just add an issue describing your suggestion :-)

Tech Stack

This is written in MicroPython.

How to Install

Here is how to compile and copy a MicroPython script (in this case mindtherocksformicrobit.py) or hex file (grab from the latest release) file to your microbit :-)

Trivia

I coded up the very first version of the game whilst on holiday in the Northumberland National Park. When looking up from the screen I could see the wonderful hills of the upper Coquetdale valley.

mind-the-rocks's People

Contributors

bigeagleowl avatar

Watchers

 avatar

mind-the-rocks's Issues

Tech Stack

Describe tech stack and instructions on how to compile.

Players to all play same game

Currently the players in multiplayer mode get a different version of the game. It would be great if they all played the same version of the game. An idea to do this is seed the random rock generator on each microbit with the same seed, using the lowest player integer that is transmitted - that is the theory.

Code Quality

The first version was hacked together and needs to be rewritten to make a more maintainable version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.