Tuesday, January 17, 2012

Beat My Drum

Here's a very rough clip of me playing a beat on our application beat my drum. As you can see I'm no expert and my timing isn't brilliant but it is possible to keep a beat.   

We created beat my drum in October/November 2011.  After playing around with some of the other drum machines on WP7 I was a little disappointed. Some were absolutely useless and didn't let you play 2 drums at the same time.  Many others were not very responsive.  Some were quite responsive and nice to look at it but these seemed to fall down in the way the drums were layed out. Many of the app developers seemed to think it was a good idea for the GUI to be just like a real drum kit.  However I think this is not a good approach for 2 reasons:

1. Wasted screen real estate. 

The phone screen is small enough withough having to limit your taps to the image of a snare, tom or cymbal.

2. The hi hat is in an awkward position.

Most drummers (except for some jazz drummers) will hold the stick in their right hand and play accross their bodies.  This is fine in real life when you've got a large drum kit in front of you and your holding two 40cm sticks.  However on a phone it's awkward.  You have to either turn the phone around and play everything upside down or you've got to attempt to cross your right hand accross you left hand which is difficult when you're playing on such a small screen.  To me it makes a lot more sense to position the hi hat on the top right hand corner of the phone as it is the timekeeper pad that you'll most likely be hitting frequently with your right hand/finger.

So not being satisified with any of the other apps out there I decided to make my own drum machine.  The main roadblock was getting familiar with the touchpanel in the xna library.  Silverlight does not allow two buttons to be pressed at the same time so the user must use the touchpanel and detect multiple screen hits at the same time.

The main lesson I learnt was it is not possible tocreate a responsive touch application like this by just raising gesture events. It seems to work at first but if you start hitting the screen in multiple places frequently you will notice that atleast 60% of the time your second touch will be ignored.  The solution I used was to set up a timer which executed multiple times a second and poll the raw touchpanel data for screen taps. 

For more info you can read a couple of posts I made in the developer forums about this http://forums.create.msdn.com/forums/p/94206/564280.aspx#564280

Creating this simple application turned out to be a good move for us.   Over the last month Beat My Drum has surpassed Camera Flashlight to become our most profitable app. YAY.

No comments:

Post a Comment