Multiplayer game with Bluetooth joysticks
A totem running a 3D game where passing mobile phones became joysticks over Bluetooth. 2009, no SDK, no budget.
This is still the project I created. The one to tell my kid about.
What it was
While working at a marketing company, we came up with the idea of building a totem running a complete (simple, but complete) 3D game on a computer. Anyone walking past with Bluetooth enabled on their phone would receive an app that let them control the game.
With a team of myself and a graphic designer, we built two games for the proof of concept.
The Pac-Man clone
Because of copyright I can’t show the Pac-Man clone outside the company, but I can talk about it. It was a three-piece game:
- A joystick-like app for the phone, written in J2ME and delivered by a Bluetooth server
- A Bluetooth server responsible for (i) sending the J2ME app to the phone and (ii) controlling and orchestrating the multiplayer side
- The game itself
We wrote the Bluetooth server in plain C. It kept the Bluetooth dongle in scanning mode and, whenever someone with Bluetooth enabled came into range, asked whether they wanted to receive the app. If they said yes, the J2ME app was downloaded and fired up. On starting, it looked for multiplayer slots: the player could be one of the ghosts, or Pac-Man.
If they were Pac-Man, the app worked simply as a remote joystick. But if they were a ghost, and there was at least one ghost controlled by the game, that’s where it got interesting: the machine-controlled ghost had a strategy that evolved based on how the human Pac-Man played, and it sent feedback to the human player’s app along the lines of “go left here, if you do that we’ll corner Pac-Man”.
I always had a liking for AI, but this is when I decided to actually pursue my master’s on autonomous agents. The rest of the game was pretty standard for the time: C++, Ogre and SDL did the work. We had no access to any advanced 3D SDK, because there was no budget.
Desert challenge
With the Pac-Man experience sold, they asked us for a new one (with no copyright issues) to present to the company owners. We used the same technology and built a dragster race, where the player had to shift gears at the right moment to win.
Challenges
Where to begin? Have you ever tried to build a 3D game from scratch? Add a Bluetooth server and a J2ME application at a time when there was no real standard — each manufacturer implemented J2ME differently, sometimes differing between handsets of the same brand.
I still believe games are a form of art. To create a complete game is to create art in its purest form: you have to think about story, art, music, direction, technology, timeline, and the list goes on. Games are, without question, one of the most complex kinds of software there is, for the architect, the developer and the artist alike.