How to create a multi-player game

I often get requests to turn some of the games into multi-player games: games where you can play with another person, instead of the computer players built into the games.

There are several ways to create a multiplayer mobile game.

people playing on iPhones

The simplest method is to have a game server – a computer in the cloud that manages that game.  Each person’s iPhone is connected to the game server.  So if it’s a 4 player game, your iPhone, and your friend’s three iPhones are all connected and part of the same game.

When you make a move, such as playing a card, the iPhone tells the game server that you  drew a card, and the game server tells the three other players that you drew a card, and the game server gives you the card.  The game server keeps track the cards in everyone’s hand, and after your move is over, it lets the player on the next iPhone make a move.  This is how the RS Games server works.

A cloud-based game server requires that the software developer program a game server in addition to the programming apps on the iPhone.  The server is the hard part; the apps on the iPhone are, relatively speaking, easier.

A more complex method is to not have a game server, but let all the iPhones cooperate with each other.  That’s how simple games on the iPhone work.  In a card game, once your iPhone is paired up with another iPhone to play a game, they talk back and forth with all game information, and what your latest move was.

For example, after you draw a card, the app bundles up the following information: all remaining cards in the deck, the discard pile, your hand and your opponent’s hand, and what your last move was.  It sends this bundle to your opponent’s iPhone, and tells your opponent to make a move.  Your iPhone waits until your opponent is done.  Once your opponent is done, his iPhone bundles up the newer version of all that information, and sends it back to your iPhone.

This is much harder than  a game server, since there’s no centralized referee to make sure everything proceeds fairly.  Not only is there a lot of information being sent back and forth, but the app must handle conditions such as one player ending the game, or making trying to play when it’s not his turn.  We created multiplayer versions Blindfold Wildcard, Blindfold Crazy Eights and Blindfold Bowling this way.

Apple provides several ways to send information between iPhones when not using a centralized game server, and we’ve experimented with all of them.  In general, not having a game server can make for a very frustrating gaming experience.

The third approach is to pass a single phone back and forth  between two people.  We do that in Blindfold Simon and a few other Blindfold games.  This is easier, since neither a centralized game server or other iPhones are involved.

If you would like to see the “pass-back-and-forth” method added to your favorite Blindfold Game, please contact us.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s