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


Groups > comp.misc > #2238

Re: TCP vs UDP for game development

From Paul Sture <nospam@sture.ch>
Newsgroups comp.misc
Subject Re: TCP vs UDP for game development
Date 2014-04-03 18:45 +0200
Organization PostgreSQL and SQLite
Message-ID <eqf01b-3e91.ln1@news.chingola.ch> (permalink)
References <20140403112552.7c3877f3.rsw@therandymon.com>

Show all headers | View raw


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."

Back to comp.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web