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…
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:
ok ty
If other people want participate you can up this topic or pm me : )
At the higher level, I would give a few pointers (SyncViews already pointed out the obvious bugs that I saw too.):
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…