🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

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…

9,132 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…
  • 6,202 views

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

    8,181 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…
  • 6,322 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…

    4,452 views

    SSH cannot forward UDP packets. You must be seeing something else happening.

    5,287 views

    I build a game development studio in JavaScript and wrote my own language, C-Lesh, as a scripting language. At first I had no idea how a scripting language can communicate with a base language like JavaScript but then I looked into memory mapped I/O. So basically, the game engine is written in Java…

    6,585 views

    Yeah, symmetric NAT is a pain, and, according to many experts, actually breaks protocols like UDP. (It kind of depends on how you squit when you read the specification.)

    Generally, people will fall back to a central server that forwards traffic in these cases.

    6,350 views
    Advertisement
    Advertisement