views:

474

answers:

4

I'm about to develop a simple 2D game something like chess, checkers, or reversi. There are only simple animations of the players pieces. No complicated math nor graphics therefore I'm wondering if it is better to go with P2P over a client/sever approach.

The game will be an iPhone/iPod Touch game (and later on run in a Web browser game using Cappuccino). Two iPhone players can play when near each other via bluetooth/bonjour. Or the game can be played against other remote iPhone players via the internet, iPhone to iPhone; (and later on - iPhone to Browser; or browser to browser).

The game starts off with two players, each having an agreed upon number of pieces to place on the board.

Both players are constantly connected because the game will have a countdown timer that is set to an agreed upon time limit of 10, 20, 30 seconds in which the active player (Player A) must make a move. If the Player A doesn't make a move before the timer counts down to zero the Player A will lose his turn and the opposing player (Player B) will become the active player. The timer count is displayed on each player's screen.

The game ends when the players run out of pieces, with the player having the most pieces on the board declared the winner.

Can I please get your thoughts on which is better for my game? P2P or client/server?

A: 

In my opinion if it is something where latency could be annoying in-game then go p2p, adding a server into the mix is just going to increase latency.

Unkwntech
Adding a server might not increase the latency 'too much', and might have advantages which make it worthwhile.
ChrisW
A: 

Because of the low bandwidth required per session, you could probably use a scaled server approach. I'm not familiar with iPhone development, but you can keep the application requirements on the client low with a Web standards approach. The servers can be balanced on the back end, and tied to a unique session with multiple clients connected to a session.

maxwellb
+3  A: 

To some extent, it depends on your desired feature set. For example: are you going to have "high scores" or "saved games"? Are you certain your players are going to be near enough to always play via bluetooth? If not -- how will you "connect" them to each other if they're just using the internet? Do you have server infrastructure in place now?

Also, it would be helpful to know if this is just an "experiment/toy" you're doing or something you intend to commercialize/release to the public.

At the end of the day, you can do it either way. The 'which is best' depends on your specifics.

DarkSquid
+2  A: 

I don't know much about iPhone development but I think it would be better to support both if possible.

For the "local" scenario P2P is the way to go. The players can easily discover each other and start a game without the hassle of setting a server and connecting to it.

On the other hand if you want the game to be playable over the internet, I think a client-server model is more suited. You can also host statistics on the server (high scores?) organize tournaments and more.

Stefan Cosma