Force Sensitive Resistor
Discovering a new biometric technique with Pete Collier
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!
What this new data output had provided was a means for me to sell the concept to my colleagues at Bizarre. If I had this Newton force data outputting in real-time from the FSR surely this could be visualised with a line graph? If recorded alongside someone playing our current games (at the time - Blur and James Bond: Bloodstone) we could determine the game-play intensity felt by the player when playing our games. This, I felt, would be really useful because at the time we had excellent resources gathering quantitative data and game metrics providing qualitative data but this would provide an extra dimension.
So I jury-rigged the FSR to a 360 controller and the Arduino to my netbook with it running the Newton Force script in the SDK. I have to say, it all looked pretty awesome in its nerdiness!
It drew a small crowd when I showed the FSR in action. I don't think many game developers can resist mad experiments so it was a successful demonstration. Everybody was pretty excited at the potential and interested in exactly how useful the data could be. We discussed other potential ways of visualising the data, Chris Pickford (now super developer at Jagex) and Michael Evans (our Tableau man) were convinced we could run the data through Tableau and get some really interesting overlays on our maps. So the next step was some further pillaging of clever coder brains. Two were to become my absolute heroes - tools programmers Ken Macleod and Jamie Hales - Jamie for joining me on this mini-project and Ken as his manager for giving him time in his schedule to do so!
Jamie was quick to write an application that communicated with the FSR. He connected to the Arduino via a COM serial connection and exposed variables in a debug interface that allowed tweaking of the sensitivity values. This allowed them to be placed in a range that was attuned to a natural gripping of the pad. Jamie's program then communicated this data via a TCP/IP connection to the game, overlaying a graph showing the current sensor input value in a vertical bar, and a graph showing the input history for the last X seconds. The game then used its logging system to log the sensor values in a database as a per-frame and per-second average. This was logged alongside other game data such as health, position etc and allowed visualisations showing the mapping areas where people were gripping the pad the hardest.
Being able to tweak the sensitivity of the data proved to be critical. It was much more manageable in this more reasonable range rather than spiking so drastically second to second. By this time Mike had set up Tableau ready to take the data and visualise it. The harder the player squeezed the pad larger circles would be drawn along with a deeper shade of red. Because we were getting second to second data from the sensor a happy bi-product emerged where we could see the player's path through the level. Of course what we were capturing from the player was very much open to interpretation as to exactly what emotion/s we were capturing by the player squeezing the pad. But intriguingly what we were getting through from the map overlays appeared to match up with where we expected the intense player stress to be; fire-fights, tricky track sections on racing levels. Not only that but we were getting granularity in the data, seeing a build up in stress levels and a come down from events. What we appeared to be getting was an emotional trail through the level. This was incredibly useful to see if you were aligned with your design requirements for the level regarding pacing and beats. Here is an example of one of the images we generated, click the links to see further hi-res examples:
- Image 1 - Dam Entry
- Image 2 - Mercenary Camp
- Image 3 - Dam Finale
- Image 4 - Refinery Escape
- Image 5 - Monaco Casino
- Image 6 - Istanbul Ruins
- Image 7 - Istanbul Driving
For me this was a fantastic conclusion from where I had been sitting on the couch a few months before. It was a great feeling taking a spark of an idea and running with it to fruition. Not only this but working together with the people that got wrapped up in the journey along the way made it immensely satisfying. Our industry is full of passionate, very clever people who love little experiments like this one. So if you've ever held back on an idea before, I encourage you to run with it next time and see where it takes you!
So you may be wondering what became of the project? Well I'm sure some of you may be aware of this technique popping up in other peoples list of biometrics techniques. Hell there may have been even before I did this experiment back in early 2010. I certainly couldn't find any at the time but on looking recently I've found examples like this presentation from early 2009.
Right there on slide 25 at the bottom of the page I noticed pressure sensor. So I think I was very likely beaten to the punch. Not only that but the technique certainly has its flaws too, people hold pads in different ways, certain groups of people might not even react to pressure by tensing up. As with all data gathering this would need to be combined with other biometric techniques to corroborate perceived trends.
I took my findings to someone who I thought may be interested in the project; Graham McAllister over at Vertical Slice. They are experts in measuring player experience and use biometrics extensively. He was interested to hear about the project and we remain in contact now. This is a good point to end this story on because it demonstrates my final point. I wouldn't say I've got anything materially out of this project; sadly the whole rig now sits in a plastic bag in my wardrobe! But what I did gain from it was huge when it came to relationships with people. This project brought people together and what is greater than that? I established new relationships, cemented current ones and learnt the power of positive energy and perseverance; people naturally gravitate to these things. It's funny how far an idea can take you if you follow it through and I look back on this mini-side-project with great fondness. I hope you enjoyed reading about it.