Experimenting with Bluetooth

One of the challenges writing games for the touch-table is handling hidden information. So far we have used two solutions: Physical blinds that rest above the sensor and block the view of the other players, and a touch-to-reveal system where the player blocks the view with their hand and touches the screen to reveal their cards.

Many of our users have smartphones, and I thought that it would make sense to let them use their smartphone for the display of the hidden information. In the past, have experimented with a web based system where the game is hosted on a webpage and played on browsers. This works, but when the game is written in C++ for the touch-table, the game has to send data to the web-server so that the clients can display it. This creates extra overhead and lag.

Instead, I thought it would work better to send the hidden information directly to the phones over bluetooth. So I set out to write a C++ server that would use bluetooth to broadcast data to Android clients. This ended up being more difficult than I expected, but I did get it to work and wanted to post what I have done.

Continue reading “Experimenting with Bluetooth”