Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.misc > #2233 > unrolled thread

TCP vs UDP for game development

Started byRS Wood <rsw@therandymon.com>
First post2014-04-03 11:25 +0000
Last post2014-04-03 16:33 -0400
Articles 4 — 4 participants

Back to article view | Back to comp.misc


Contents

  TCP vs UDP for game development RS Wood <rsw@therandymon.com> - 2014-04-03 11:25 +0000
    Re: TCP vs UDP for game development Paul Sture <nospam@sture.ch> - 2014-04-03 18:45 +0200
    Re: TCP vs UDP for game development "Julio Di Egidio" <julio@diegidio.name> - 2014-04-03 20:06 +0100
      Re: TCP vs UDP for game development despen@verizon.net (Dan.Espen) - 2014-04-03 16:33 -0400

#2233 — TCP vs UDP for game development

FromRS Wood <rsw@therandymon.com>
Date2014-04-03 11:25 +0000
SubjectTCP vs UDP for game development
Message-ID<20140403112552.7c3877f3.rsw@therandymon.com>
A good article, regardless if you're not a game developer, discussing
of merits of UDP and TCP.

http://1024monkeys.wordpress.com/2014/04/01/game-servers-udp-vs-tcp/

//-- clip
WHY UDP IS “HARD”
UDP is both easier and more difficult than TCP.

For example, UDP is packet based – which is something you’ll actually
have to roll yourself for TCP. You also use a single socket for
communication – unlike TCP which require a socket for each connected
client. These things are mostly good stuff.

However, for most situations you actually need some concept of a
connection, some rudimentary ordering and often also reliability.
Neither of those are offered by UDP “out of the box”, while you get it
for free with TCP.

This is while people often recommend TCP. With TCP you can get started
and don’t worry too much about those things – not until you start
having 500+ simultaneous connections anyway.

So yes, UDP doesn’t offer the whole kit, but as we’ll see, that’s
exactly why it’s so great. In a way, TCP is to UDP what something like
Hibernate is to writing your queries by hand in SQL.

//-- clip

-- 
RS Wood <rsw@therandymon.com>

[toc] | [next] | [standalone]


#2238

FromPaul Sture <nospam@sture.ch>
Date2014-04-03 18:45 +0200
Message-ID<eqf01b-3e91.ln1@news.chingola.ch>
In reply to#2233
On 2014-04-03, RS Wood <rsw@therandymon.com> wrote:
> A good article, regardless if you're not a game developer, discussing
> of merits of UDP and TCP.
>
> http://1024monkeys.wordpress.com/2014/04/01/game-servers-udp-vs-tcp/
>
> //-- clip
> WHY UDP IS “HARD”
> UDP is both easier and more difficult than TCP.
>
> For example, UDP is packet based – which is something you’ll actually
> have to roll yourself for TCP. You also use a single socket for
> communication – unlike TCP which require a socket for each connected
> client. These things are mostly good stuff.
>
> However, for most situations you actually need some concept of a
> connection, some rudimentary ordering and often also reliability.
> Neither of those are offered by UDP “out of the box”, while you get it
> for free with TCP.
>
> This is while people often recommend TCP. With TCP you can get started
> and don’t worry too much about those things – not until you start
> having 500+ simultaneous connections anyway.
>
> So yes, UDP doesn’t offer the whole kit, but as we’ll see, that’s
> exactly why it’s so great. In a way, TCP is to UDP what something like
> Hibernate is to writing your queries by hand in SQL.
>
> //-- clip

Wh nds TCP whn y'v gt UDP. S y lse a fw pckts hr nd thr. Wh crs?

The point is, if what you are aiming for is high performance, you need
to go the extra mile or two in development effort, and testing.  Never
forget the testing.

-- 
Paul Sture

"In that case," said Napoleon, "let us wait twenty minutes; when the enemy
is making a false movement we must take good care not to interrupt him."

[toc] | [prev] | [next] | [standalone]


#2239

From"Julio Di Egidio" <julio@diegidio.name>
Date2014-04-03 20:06 +0100
Message-ID<lhkbfd$t44$1@dont-email.me>
In reply to#2233
"RS Wood" <rsw@therandymon.com> wrote in message 
news:20140403112552.7c3877f3.rsw@therandymon.com...
> A good article, regardless if you're not a game developer, discussing
> of merits of UDP and TCP.
>
> http://1024monkeys.wordpress.com/2014/04/01/game-servers-udp-vs-tcp/
>
> //-- clip
> WHY UDP IS “HARD”
> UDP is both easier and more difficult than TCP.
>
> For example, UDP is packet based – which is something you’ll actually
> have to roll yourself for TCP. You also use a single socket for
> communication – unlike TCP which require a socket for each connected
> client. These things are mostly good stuff.
>
> However, for most situations you actually need some concept of a
> connection, some rudimentary ordering and often also reliability.
> Neither of those are offered by UDP “out of the box”, while you get it
> for free with TCP.
>
> This is while people often recommend TCP. With TCP you can get started
> and don’t worry too much about those things – not until you start
> having 500+ simultaneous connections anyway.
>
> So yes, UDP doesn’t offer the whole kit, but as we’ll see, that’s
> exactly why it’s so great. In a way, TCP is to UDP what something like
> Hibernate is to writing your queries by hand in SQL.
>
> //-- clip

At least what you quote is as sloppy and in fact misguided as it can be.

I haven't bothered to read the full article, there is no point.

Julio
 

[toc] | [prev] | [next] | [standalone]


#2241

Fromdespen@verizon.net (Dan.Espen)
Date2014-04-03 16:33 -0400
Message-ID<icmwg2nofx.fsf@home.home>
In reply to#2239
"Julio Di Egidio" <julio@diegidio.name> writes:

> "RS Wood" <rsw@therandymon.com> wrote in message
> news:20140403112552.7c3877f3.rsw@therandymon.com...
>> A good article, regardless if you're not a game developer, discussing
>> of merits of UDP and TCP.
>>
>> http://1024monkeys.wordpress.com/2014/04/01/game-servers-udp-vs-tcp/
>>
>> //-- clip
>> WHY UDP IS “HARD”
>> UDP is both easier and more difficult than TCP.
>>
>> For example, UDP is packet based – which is something you’ll actually
>> have to roll yourself for TCP. You also use a single socket for
>> communication – unlike TCP which require a socket for each connected
>> client. These things are mostly good stuff.
>>
>> However, for most situations you actually need some concept of a
>> connection, some rudimentary ordering and often also reliability.
>> Neither of those are offered by UDP “out of the box”, while you get it
>> for free with TCP.
>>
>> This is while people often recommend TCP. With TCP you can get started
>> and don’t worry too much about those things – not until you start
>> having 500+ simultaneous connections anyway.
>>
>> So yes, UDP doesn’t offer the whole kit, but as we’ll see, that’s
>> exactly why it’s so great. In a way, TCP is to UDP what something like
>> Hibernate is to writing your queries by hand in SQL.
>>
>> //-- clip
>
> At least what you quote is as sloppy and in fact misguided as it can be.
>
> I haven't bothered to read the full article, there is no point.

I liked the article.
Thanks RSW!

-- 
Dan Espen

[toc] | [prev] | [standalone]


Back to top | Article view | comp.misc


csiph-web