As part of my bachelor project I decided to work with Near Field Communication. I had specifically played with the thought of NFC enabled games. I was primarily thinking about how NFC is to this day mostly used as a means of mobile payment and small data transfer, and I basically sought out to find other contexts in which NFC could be deemed useful, and thus my choice landed on games that uses NFC. I will use this page as a means of documentation of the process I went through creating this game. The following concept was created using an Arduino Mega with a NFC shield, 25 LED’s and wire, and wood for the game board. I bought the wood and the Arduino Mega myself, but everything is already available at DDLab.
The concept of the game is a rather simple one, a game board consisting of 5×5 tiles was created for the players. The game was created for 2 players. Each of the aforementioned tiles had an LED placed in them and the goal of the games was to not step on an illuminated field. In the middle of the game board an Arduino Mega with a NFC reader was placed that was used to illuminate or turn off these LEDs. Players would take turns marking these fields as illuminated, this was done from an Android application made for the specific purpose of this game.
I started out in september by starting to code the Android application, Java coding was not something I had done before, but luckily there’s so many amazing helpful ressources when it comes to coding Android. (open source, yay!)
I knew I needed an application that could turn on these 25 LEDs individually, and because of the time pressure I decided not to create anything fancy, I simply wound up creating and application that consisted of 25 toggle buttons, depending on the state of these buttons the application would either send out a 0 or a 1 (off or on state for the specific LED). Below you can see an image from the NFC application.
The simple Android application that was created.
I had initially planned a P2P way of communicating from the Android phone to the Arduino NFC shield, but because of the lack of documentation for the NFC Shield I had to improvise. The only way I could get the NFC shield to read NFC data from the phone was to process the information being received as an URL. The reason behind this is that the Android operating system pushes NCF data in the NDEF format, and the NFC Shield lacked documentation for this part, I did however manage to find an example for NDEF URLs, that could be appropriated to be used in this example. The downside of having to do it this way was that the players needed to use a NFC tag to write their game moves onto. So the communication would be from the phone where the player would devise his game move, and then write it onto a NFC tag which then needed to be placed on the NFC Arduino shield in order to be processed.
After creating the Android application I moved onto the NFC shield for the Arduino, as mentioned it was pretty difficult due to the lack of documentation for the shield. I will provide the source code asap.
I then moved on to creating the physical game board itself, I bought some wood, lent some wire, and 25 LEDs from DDLab and started working.
As can be seen above a lot of fiddling and soldering with the wires was required. But in the end I managed to get it working.
Here’s a short video of me testing the prototype on a smaller scale before construction of the game board.
As can be seen in the video above I am controlling the Arduino with messages (URLs as mentioned before) on the NFC tags. These tags are read by the Arduino and then processed in Max 6 which then controls the lighting as well, for the final board the Max patch looked like this:
Just before testing the prototype I shot another solo video testing the final prototype.
And after that the prototype was tested, users quickly picked up the rules of the game. What the videos below didn’t illustrate was that when a player had placed a NFC tag on top of the NFC shield a buzzer would sound and serve as feedback that the actions had been initiated, players then had 3 seconds, before the final buzzer that had a distinctive sound was played, upon hearing this sound players were not allowed to stand on an illuminated field. Furthermore, the players were only allowed to move once per move.:
Above a player can be seen devising a plan on the tablet. He then proceeded to place a NFC tag on the back of it to write his move onto it, and then placed it on the NFC Shield.
And here is the final video of the prototype in action.
This was a very rough update on my project. I shall expand on coding and provide source code as soon as I’m done with the next exam. Also more text will be in bound at some point in the future.
A small list of litterature that I used in my project.:
1. Geven et al., “Experiencing real-world interaction: results from a NFC user experience field trial”, 2007, Published in: MobileHCI ’07 Proceedings of the 9th international conference on Human computer interaction with mobile devices and services, Pages 234-237, ACM New York, NY, USA ©2007
2. Broll et al., “Improving the accessibility of NFC/RFID-based mobile interaction through learnability and guidance”, 2009, Published in: MobileHCI ’09 Proceedings of the 11th International Conference on Human-Computer Interaction with Mobile Devices and Services, Article No. 37, ACM New York, NY, USA ©2009
3. Hang et al., “Visual design of physical user interfaces for NFC-based mobile interaction”, 2010, Published in: DIS ’10 Proceedings of the 8th ACM Conference on Designing Interactive Systems, Pages 292-301, ACM New York, NY, USA ©2010
4. Broll et al., “Touch to play: mobile gaming with dynamic, NFC-based physical user interfaces”, 2010, published in: MobileHCI ’10 Proceedings of the 12th international conference on Human computer interaction with mobile devices and services, Pages 459-462, ACM New York, NY, USA ©2010
5. Sarmenta, Luis F. G., “Tangible and casual NFC-Enabled mobile games”, 2012, in
Proceedings of the 10th international conference on Pervasive Computing (Pervasive’12), Judy Kay, Paul Lukowicz, Hideyuki Tokuda, Patrick Olivier, and Antonio Krüger (Eds.). Springer-Verlag, Berlin, Heidelberg, 361-369. DOI=10.1007/978-3-642-31205-2_22