Advertisement

Latest socket Activity

@cebugdev2 You should carefully read the manual page for recv() and recvfrom()

Specifically, these functions will read whatever is available from the socket, up to the given size, and immediately return if there is any data to return. This means that they may return less than you asked for, or up to…

11,088 views
Advertisement

First: Do you actually have < 16 millisecond round-trip ping between client A, server, and client B? They need to all be in the same city, probably on the same ISP, for that to work out. If not, then how do you deal with messages coming “later”?

There are three main options:

  • The player that initi…
  • 7,346 views

    ok ty
    If other people want participate you can up this topic or pm me : )

    9,651 views

    At the higher level, I would give a few pointers (SyncViews already pointed out the obvious bugs that I saw too.):

  • You do not need to marshhal to text. TCP is not like email. Using binary values is perfectly fine, and often preferrable. The easiest way to marshal is to have a “type, size, data” pac…
  • 7,325 views

    The easiest way to get started is probably to make one player be the host for the other player.

    That “hosting” player will likely have a significant “ping” advantage, as in the local gameplay will be smoother than the remote gameplay, but this will let you work with the first kind of challenges, suc…

    5,133 views
    Advertisement
    Advertisement