0

i wanna to ask about the different http,TCP,UDP protocoll in network programing, what is the protocoll would you recommended when i want to create game,can you explain me? because i new to starting develop network programing with soket communication.thanks for helping

viyancs
  • 2,289
  • 4
  • 39
  • 71

2 Answers2

1

I think that depends on what kind of game you are making. For a game which require quick, continous updates UDP might be better, but I have always gone with TCP. If you are making some kind of turn based game where you don't send data often I'd use TCP.

This might also be helpful: UDP vs TCP, how much faster is it?

Community
  • 1
  • 1
Alle
  • 324
  • 4
  • 19
1

My friend, that depends on what is your desire. When u r sending continuous updates to all the users, u should use UDP. Because if an update is lost, that will certainly not the end of the universe. In a network based game, so many updates per second is to be transmitted, so if some r lost, nothing very harmful will happen.

On the other hand, if u use TCP, if a packet is lost, then the reliability of the protocol ensures that it will be sent again. But think about the overhead it will create across the network. If ur game user has comparatively low bandwidth, they will face serious trouble.

rr_ovi
  • 283
  • 4
  • 14
  • sometimes someone suggest me to use TCP because that is reliable transmission, but there are problem like your comment , when i using TCP for update game if the user is low bandwidth that will be seriuslly , but i think users who has been playing game tehy are must be see the requiretment of game, actually i'm using UDP protocol to voice , and using TCP like data for life human, health, ect, is important data.. – viyancs Apr 20 '12 at 02:24