SMS Economics

I was thinking of making a Windows Mobile multiplayer game using SMS.  One of the considerations is that not all of those playing will have an unlimited SMS plan so one must be thoughtful in minimizing the amount of SMS traffic that is generated by the game.

Let us assume for a moment that the 160 character limit is more than sufficient for transmitting all of the status information that needs to be known for the people playing in the game (I’t may not be, but I will address this later on. But ignore the message’s capacity for now).  One non-centralize method of ensuring that every one knows every one elses status is to have all the devices communicate with each other.  The number of messages needed to do this is dependent on the number of players.  Games ranging from 1 player to 5 players would require the following number of messages (note that the arrows represent a message being sent).

Number of Players Number of Messages Nodes and Arcs
1 0
2 2
3 6
4 12
5 20

The number of messages is increasing at a rather alarming rate. For n number of playeyers the number of messages needed can be calculated from the following equation.

Presently in the United States the price of a text message is 0.20 USD to 0.30 USD dependong on ones carrier.  I will use the midway point of 0.25 USD for calculating total cost.  Games written in this manner can quickly cost some one a significant amount of money.  When we calculate the total cost of these messages we must take into account that both the sender and the receiver of a message are charged.  So a message is collectivly costing the parties 0.50 USD.
Number of Players Cost of all messages
1 0.00 USD
2 1.00 USD
3 3.00 USD
4 6.00 USD
5 10.00 USD
6 15.00 USD
7 21.00 USD

At such an astronomical rate of cost growth the number of people allowed in a game will quickly become cost prohibitive. For a turned base game these would be the collective cost of each turn. A better model is needed.  Let’s consider a centralized model in which one player is designated the leader and all other players only communicate with the leader.  The leader will collect information from all players, accumulate it, then broadcast it to all players.

Number of Players Number of Messages Cost
1 0 0.00 USD
2 2 1.00 USD
3 6 3.00 USD
4 8 4.00 USD
5 10 5.00 USD
6 12 6.00 USD
7 14 7.00 USD

This organization looks deceptively better. The rate of growth for the messages is 2n and the total cost of the messages is n.Now if you consider the cost distribution you will see something unfair.  The leader takes on a large chunk of the cst.  50% of the cost to be exact.  Each one of the other players will only have a cost of 1.00 USD per turn.  Who would want to be leader under such an imbalanced Better balance may be achievable with a rotating leader assignment.

If the game being written for the phone is a turned based and thus the players are not taking their turns simultaneously then an even more economic SMS graph can be created.  Organize the players in a circuit.  Player one sends a message to player to, player to on to the next player, and continue this pathway until all players have received a message.  At the end of this pathway send a message back to player one. The cost per turn is finally capped!

Number of Players Messages Cost
1 0 0.00 USD
2 1 1.00 USD
3 1 1.00 USD
4 1 1.00 USD
5 1 1.00 USD
6 1 1.00 USD
7 1 1.00 USD

Notice that across all three models the communication in two player games is exactly the same.  For that reason I will suspend the idea of supporting more than two players (I may revisit it later).

I earlier mentioned that we are assuming that any data transmitted would fit in one message.  If we find that 2 or 3 messages are required to transmit a chunk of data then our message count and cost will increase linearly.  Being the last significant and the less complex part of the calculation I find it easier to leave that out until the end.

Next time around I will consider how much it cost to have a game with players that have no unlimited data plan.

 

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s