informa
2 MIN READ
Blogs

Researching local multiplayer technologies for mobile devices - Part 1

Our next game will feature local multiplayer, and in this blog post series I will talk about the technologies that can be used to implement such feature, their platform support, and their implementation in Cordova.

Originally posted on the cownado.com blog.


Our next game will feature local multiplayer, and in this blog post series I will talk about the technologies that can be used to implement such feature, their platform support, and their implementation in Cordova.

Let's start by saying that by local multiplayer I don't mean two people playing on the same tablet, but I mean two people playing on the same room, each with his own phone/tablet.

There are a handful of technologies available to achieve that, each with its own advantages and disadvantages:

Bluetooth

If you're a frequent reader of this blog, you already know that Bluetooth is a great option for local multiplayer games, at least on the Android platform.

It is very easy to set up and it also has Cordova bindings made by yours truly, but it also has its disadvantages:

  • While it's possible to use it on Windows Phone, the MSDN documentation is rather confusing, and to this date there is no Cordova implementation for Bluetooth on that platform.
  • You can't use Bluetooth RFCOMM directly on iOS (at least on a non jailbroken device).

This means that, for the moment, Bluetooth is great only for Android, and in the future maybe for Windows (Phone) too.

Wi-Fi

Wi-Fi might be a natural choice for implementing a local multiplayer game, its advantages are:

  • It is based on open standards, which means the game can be played with one player using his iPhone, and the other player using his Android or Windows phone.
  • It is faster and has a longer range than Bluetooth.

But, as no technology is perfect, it also has its own disadvantages:

  • A Wi-Fi hotspot is needed in order to be able to use it, which may be a problem if you want to play while traveling
  • It doesn't implement device discovery nativley, so methods like Bonjour or Zeroconf must be used, which complicates development.

What about Cordova bindings?

Well, you use standard TCP sockets, so cordova-plugin-chrome-apps-sockets-tcp and cordova-plugin-chrome-apps-sockets-tcpserver are available, while for Bonjour/Zeroconf there are a couple of implementations available, just search for them.

Bear in mind that none of the aforementioned plugins works on the Windows platform, so this is another (temporary?) disadvantage of this technology.

I haven't tried any of these Cordova plugins yet, so I don't know about their quality.

There are a couple more technologies available, and I will talk about them in the next blog posts, so stay tuned.

Latest Jobs

Manticore Games

San Mateo, California
8.23.22
Senior Software Engineer - Mobile

Sony PlayStation

San Diego, California
6.23.22
Sr. Online Programmer

The Walt Disney Company

Glendale, California
8.1.22
Associate Marketing Manager - Walt Disney Games

Insomniac Games

Burbank, California
8.26.22
Accessibility Design Researcher
More Jobs   

CONNECT WITH US

Explore the
Subscribe to
Follow us

Game Developer Job Board

Game Developer Newsletter

@gamedevdotcom

Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Browse
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more