Stories
Slash Boxes
Comments

SoylentNews is people

posted by on Monday January 02 2017, @08:09PM   Printer-friendly
from the which-packet-is-right-for-you dept.

An introduction to networking for game programmers:

Hi, I'm Glenn Fiedler and welcome to the first article in my article series Networking for Game Programmers

In this article we start with the most basic aspect of network programming, sending and receiving data over the network. This is just the beginning – the simplest and most basic part of what network programmers do, but still it is quite intricate and non-obvious as to what the best course of action is. Take care because if you get this part wrong it will have terrible effects on your multiplayer game!

You have most likely heard of sockets, and are probably aware that there are two main types: TCP and UDP. When writing a network game, we first need to choose what type of socket to use. Do we use TCP sockets, UDP sockets or a mixture of both?

The choice you make depends entirely on what sort of game you want to network. So from this point on, and for the rest of this article series, I'm going to assume you want to network an action game. You know games like Halo, Battlefield 1942, Quake, Unreal, CounterStrke, Team Fortress and so on.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 5, Funny) by isostatic on Monday January 02 2017, @10:28PM

    by isostatic (365) on Monday January 02 2017, @10:28PM (#448671) Journal

    TCP:
    "Hi, I'd like to hear a TCP joke."
    "Hello, would you like to hear a TCP joke?"
    "Yes, I'd like to hear a TCP joke."
    "Ok, I'll tell you a TCP joke."
    "Ok, I will hear a TCP joke."
    "Are you ready to hear a TCP joke?"
    "Yes, I am ready to hear a TCP joke."
    "Ok, I am about to send the TCP joke. It will last 10 seconds, it has two characters, it does not have a setting, it ends with a punchline."
    "Ok, I am ready to get your TCP joke that will last 10 seconds, has two characters, does not have an explicit setting, and ends with a punchline."
    "I'm sorry, your connection has timed out. Hello, would you like to hear a TCP joke?"

    UDP:
    I'd tell you a UDP joke but you might not get it

    Starting Score:    1  point
    Moderation   +4  
       Informative=1, Funny=2, Underrated=1, Total=4
    Extra 'Funny' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 2) by archfeld on Tuesday January 03 2017, @03:31AM

    by archfeld (4650) <treboreel@live.com> on Tuesday January 03 2017, @03:31AM (#448758) Journal

    Not only ON-TOPIC, but funny as well...
    Who are you and where did you come from, and what have you done with our regularly scheduled troll ??

    arp arp arp arp

    --
    For the NSA : Explosives, guns, assassination, conspiracy, primers, detonators, initiators, main charge, nuclear charge
  • (Score: 2) by Osamabobama on Tuesday January 03 2017, @06:17PM

    by Osamabobama (5842) on Tuesday January 03 2017, @06:17PM (#449001)

    That was great! I was expecting a TCP joke (eventually), but then I was totally blindsided by a UDP joke.

    --
    Appended to the end of comments you post. Max: 120 chars.