A case study of a microsite for Battlefield Bad Company 2.
Learn how I used Arduino, Flash, Smart Fox Server, and Influxis (Flash Media Server) to create the site.
The reason why I’ve not been updating much recently: http://bit.ly/tcbfc2 (the campaign has finished! thanks for all the support!)
The microsite was a campaign for the Singapore launch of the highly anticipated sequel: Battlefield Bad Company 2, an FPS developed by DICE and published by EA games.
As BF2 features destructable environments – and tanks. We came up with the idea of letting players do exactly that – in real life. What users were able to do was that they could connect to a real model tank in the physical world and battle 3 other players in a prebuilt environment.
A camera was mounted on each of the tank so that the connected player can “see through” the turret of the tank. Players control the tank with the keyboard and then engage other players in battle with other tanks on a diorama that was installed at a cineplex in Singapore.
To be able to control the tank, my tech lead stripped bare the insides of the RC tank that we got from our supplier, VSTank, and put in his own customised and improvised version of the Arduino + XBee shield + Xbee components. Customised batteries were ordered and modded to power the Arduino which then passes the commands received through the XBee to the tank motors.
Each tank has a defined server which is actually a Netbook. To enable the sending of Serial data via the USB COM ports, serproxy was used along with the excellent SmartFoxServer. As there was no stable wifi-connection in the cineplex, the netbooks were connected using M1′s Mobile Broadband service (a 3G HSDPA network).
Due to the slow speeds of the mobile broadband, we had to sacrifice some video quality to achieve minimum control lag for the players who are connecting to the tanks from all over the world. The other problem we had was the streaming of the video feeds. As Singapore does not have any web hosting companies that offer Flash Media Servers, we turned to Influxis. This was perhaps the smoothest part of the entire project. The Influxis support was amazingly helpful, and the free tools and control panel that comes with every account was easy to use and set up. I am thinking of writing a tutorial for broadcasting a live feed to the world using Influxis soon!
As we were looking at a few alternatives at the time, the other service I tried was UStream, a free web streaming service that does exactly what I wanted. The problem though was that there was almost a 4 second delay between the feed I was broadcasting and the one that I was receiving. This was impossible to use for our game as we needed almost zero lag to let players control the tank efficiently. After signing up for the cheapest available plan (US$6/month) to do a test, we decided to go with Influxis as the 4 second delay was brought down to 0.5 seconds!
Next, a queue system was built so that only 4 players were able to connect to each one of the tanks.
The entire project was completed within 2 weeks and it generated thousands of hits from all over the world. I’m pretty sure that what we did was an industry first. It was tough but the process was fun and I learnt alot along the way.
Some pictures of the diorama, tanks, and Arduino:

The Arduino

Prototyping

Tank Version 1.0

The XBee Shield

The insides of the tank

Mounted XBees for minimum interference

All 4 Tanks ready to roll!
That’s all for now. I’m just sharing what I learnt during this project with everyone. Hope everyone had fun reading it and watching the videos!






Leave Your Response