Sunday 17 November 2013

Hardware + 80:s classic game = winning

This year I actually won NaGaDeMon. Winning NaGaDeMon means you make a game, complete it and play it. That's it, really simple.
As I just recently bought an Arduino kit, I decided to cross the border from the familiar area of software into the mysterious land of hardware. I also learnt from last attempts failure to keep it simple. No really... really simple... and so I made a recreation of the classic 80:s game "Simon".

It's made from the components you can see in the video: 1 Arduino Uno, 4 push buttons, 4 coloured LED:s, 1 piezo(used to generate some noise) and a bunch of resistors and wire.

The thing that is not obvious in the video is the 226 lines of code.

So what is the game about?

The game selects a sequence of colours every round, and you´r task is to recreate the same sequence. Every round you manage to complete starts a new round with a sequence that is one colour longer. The game ends when the player selects a wrong colour in the sequence the game has performed.

The game has 2 modes:

1) Building mode, where the game only selects a random colour for the extra colour that is added every round. So the sequence is always the same, only one colour longer every round.
2) Random mode, where the game selects a random sequence of colours every round and adding an extra colour every round to make every round increasingly harder to copy for the player.

Building mode is selected by pressing any of the upper buttons, and when you do, the game answers by playing four spinning loops with the LED:s.

Random mode is selected by pressing any of the lower buttons, and when you do, the game answers by playing a randomised pattern with the LED:s.

No comments:

Post a Comment