Each week we feature the best content from #AltDevBlogADay, a blog site on which developers write daily about things that they find interesting. This week it's the turn of Hogrocket's Pete Collier, revealing an innovative solution to a problem of resistance.
It was spring 2010 and there I was sat on the edge of my couch shouting excitingly at the television. I was gripped in the frenzied concentration and exacerbated stick wiggling that can only come from a game such as Fifa. Playing over Xbox live with a good friend (in this case Gavin Bartlett - Associate Art Director at Playground Games) and with headphones is a particularly heady combination guaranteed to cause maximum competitive stress and ridicule for the loser; great fun.
In the middle of a particularly hard fought game Gavin suddenly paused play. I glanced down and noticed that I was crushing my controller with all the ferocity of a crazy person. The intensity of the game had been so high that it wasn't until it was interrupted that I saw how caught up I had become. It was this moment that was to become the catalyst for a fascinating journey into measuring intensity of player experience. In the words of the fresh prince - this is a story all about how my life got flipped turned upside down...by biometrics.
Reflecting back on this mid-game moment it had got me thinking about whether the intensity of a gaming experience could be measured by how hard a player gripped the controller. The first thing to ascertain was whether I was a freak or not, was this phenomenon just unique to me? Turns out that thankfully it wasn't, enough people at the studio (at the time - Bizarre Creations) shared the same experience. High intensity, it seemed, equalled feverish grip.
I explained my theory to a close friend (James Thompson) who is an engineer by trade. I asked him if he knew of a sensor that measured pressure on an object. His first thought was a strain gauge. The problem, on further investigation, was that this was more suitable for measuring the deformity of an object, a shearing or twisting force. This wasn't what we wanted, what we needed was more a measure of how hard the controller was being squeezed, in effect the tightness of the grip. On further investigation we found another sensor called a 'Force Sensitive Resistor' or FSR for short. The FSR did exactly what we needed by measuring direct force or pressure on the sensor. To my great delight it also turned out to be pretty cheap and even better it could be bought in a small enough size to fit on a 360 pad, what a result! A cunning plan had begun to form in my head!
Now not being much of an electronics man I needed a solution where I could visualise the data from the FSR sensor. This came in the form of the wonderful Arduino board; a DIY electronic prototyping platform that even total amateurs like me can use. Not only could I buy an Arduino board but I could also buy a pack of FSR's and a bunch of other wires and other necessary paraphernalia from a wonderful specialist electronic website in the UK called Oomlout. These guys are also particularly awesome because they provide, free of charge, very well written step by step printed tutorials with each sensor that tells you how to get the sensors hooked up and working on the Arduino board. The FSR tutorial rig hooked up with an LED that would get brighter the more pressure that was applied to the sensor. This video was the result:
I felt like a kid again. There was something magical about playing with electronics again; it brought back memories of playing with those Lego motors as a kid. Having something tangible in your hands that you can fiddle and experiment with brings a certain joy that is lost on screen I think. I guess I could have stopped there, but I was a little bit hooked by this point. I'd become caught up in the excitement of rediscovering the simple joys of messing around with toys and electronics. I asked myself, how could I take this to the next level? How can I measure the force of player grip via more than a blinking LED!
The answer came as a result of some feverish googling. As a non-coder I've become somewhat of an expert in finding snippets of web-code on random websites and kind of hamming it into things until it eventually works through trial and error. It's a style I've honed over many years and it wasn't to disappoint me this time around either! I found this brilliant website: Ladyada.net. This page gave me a snippet of script that could be run with the Arduino SDK that measured the actual Newton force being output second to second by the sensor. Unbelievable, I guess this sense of euphoria would have been even further pronounced had I coded all this entirely by myself, but hey, progress was being made and that was more important!