Friday, December 25, 2015

Makey Makey Go One Day Build

I just got my new Makey Makey Go two days before Christmas. I figured why not make something before Christmas. So I decided to do a Makey Makey Go One Day Build.

 

First, about Makey Makey Go, it's quite different from the original Makey Makey. It only has one input connection, which can be changed with a touch pad. The input can be selected to be either space key or mouse left click. There is also another touch pad to modify the sensitivity of the input.

My weapon of choice is Unity3D. My first task is writing an interfacing script to interpret the input from the device. You can take a look at the script here, and you will see it's a pretty simple script but with one complication: it can interpret multiple clicks. With only one input mechanism, I can easily see the need of a way to differentiate one click and two consecutive clicks, so that they can be used to control different things. My script runs a delayed coroutine, which means given a click, it will always delay for some time (0.2 seconds by default) to wait for the next click. If there is no next click, a event will fire to notify the number of accumulated clicks, otherwise, it will keep adding to the accumulator and wait for the next click. As mentioned, input of Makey Makey Go can be selected to either space key or mouse left click, a made a Mode enum field to select which (or both) to listen to.



With the input taken care of, I just went ahead and made an extremely simple game.



The entire game project is hosted on GitHub.

No comments:

Post a Comment