After we got our idea, we were looking on which technology could ensure a reliable measurement of distances between moving objects. We looked at AM radios first to transmit a signal and measure its strength, but there were no reliable sources that could prove that this is actually working. Another problem was the large range that needed to be provided, because the playing field should contain several floors of the building. Since we already made positive experiences with the XBees in the Communicate-project, we decided to get additional five XBee Pros to meet the range requirements.
When trying to set up the software for the boxes, the Xbee-Arduino Library caused us big problems, since it was not not made intuitively and also not documented at all, so it took hours to figure out how certain functions work. Our plan to send AT commands to change the ID and Destination of the Xbees via an ATMega328 chip didn’t work at all, because the library caused very confusing casts between decimal, hexadecimal and character values, so it was not reliable to work with.
As a solution we put a second Xbee inside this box and control it with an output pin of the AVR.
To provide the real-time updated webpage, we were thinking of using an Arduino Ethernet Shield first, but then we found a cheaper solution:
The Xbee is not connected to an Arduino, but to a PC running Processing. Processing analyzes the values of the Xbee and writes HTML files into a Dropbox that syncs them to be online. The webpages refresh themselves every second.
For our game, we first built the basic functionality and then added features that would be nice to have like a noticable signal when you get caught.
Actually, we wanted to have vibrations motors inside the boxes that the players wear, but we couldn’t get them running somehow, although we used a mosfet to provide enough power, so we just put an additional blinking LED inside that signalizes that the player has been deactivated. The purpose of the motor was to give a noticable feedback, but this is also ensured by the LED, since it is in the field of view of the player all the time.