Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have been looking around for information about this topic but not found what i need.

Here is the scenario, i am planning a card based game (cocos2d) where the idea is that up to four players should be able to play.

One player will hand out the cards to all four and then they play. Next round the next player should do this and so on..

On the screen i would like the actual player to see his/her own cards as well as the others cards that they have played out meaning that each player should see the others active cards.

I would like to ask the following:

  1. How would be the best way of implementing this from a communication point of view?
  2. Would this go via game center?

A reference to information is appreciated.

Cheers

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Peer-2-Peer has advantages (scalability, no server cost), but several disadvantages:

  • you need lots of communication with more than 2 players
  • cheating
  • handling of dropping players
  • master election (dealing cards, decisions etc)

iScat from Mobilebits for example uses an authorative (client/server) based approach.

  • Photon
  • free for up to 100 CCUs (concurrent users)
  • support iOS, Android, HTML5, Flash, ...

You can easily combine this central matchmaking with gamecenter as well.

share|improve this answer
add comment

I always suggest to try to stay peer-to-peer in communications. This generally avoids bottlenecks and single-point-of-failures, in other words it scales.

In you case i would set up an Reliable UDP connection and use a reactor to unify network and gui events.

Obviously this does not resolve the problem with Service advertising beyond the local network, in this case an index server can not be avoided.

I am aware that this is only an arhitectural indication; I can't help you more to the point because of my lack of experience with cocos2d but I hope this can help anyway

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.