Live data from Hacker News

Is it just me or is networking really hard?

gafferongames.com

21–30 of 188 posts

Re: Is it just me or is networking really hard?

#21

I've written a series of articles about this topic: http://gabrielgambetta.com/fast_paced_multiplayer.html It's usually well received, perhaps because it builds the ideas from the ground up and does not include the words "What the fuck is wrong with you?" .

Glenn's articles are also well received and go in fact into much more detail, with code examples of various pieces of infrastructure. He's been writing them based on patreon donations for a while now: https://www.patreon.com/gafferongames

This one is just a frustrated vent at people who don't understand the difference between TCP/UDP, don't make the effort to learn about it, but feel the need to espouse about it.

--

As an aside: floodyberry, you've been hell-banned for a few years now. Might wanna mail the mods.

Re: Is it just me or is networking really hard?

#23

I've written a series of articles about this topic: http://gabrielgambetta.com/fast_paced_multiplayer.html It's usually well received, perhaps because it builds the ideas from the ground up and does not include the words "What the fuck is wrong with you?" .

To be fair, Gaffer's original articles are well written, thoughtful and informative too.

This is him ranting about the unfounded, negative and incorrect feedback he's been receiving about them from people who are willfully ignorant about networking. He could or should have replied with less attitude and more facts, though. I understood what and why he's saying what he is, but I didn't enjoy the negativity either.

Re: Is it just me or is networking really hard?

#24

I'm thinking to add online multiplayer to my game: http://store.steampowered.com/app/363670 ...so this was very interesting read. I investigated a little bit, and found that there are more protocols than just pure UDP, and now I can't decide which one to try. I narrowed it down to these three: * PCC http://modong.github.io/pcc-page/ * NORM http://www.nrl.navy.mil/itd/ncs/products/norm * ENet over UDP http://enet.besp…

Since your players don't seem to be affecting each other a lot, you might even be able to go with simple TCP. UDP is needed when latency matters a LOT, which is mainly when people fight one another.

Re: Is it just me or is networking really hard?

#25

I've written a series of articles about this topic: http://gabrielgambetta.com/fast_paced_multiplayer.html It's usually well received, perhaps because it builds the ideas from the ground up and does not include the words "What the fuck is wrong with you?" .

Glenn's articles are also well received and go in fact into much more detail, with code examples of various pieces of infrastructure. He's been writing them based on patreon donations for a while now: https://www.patreon.com/gafferongames This one is just a frustrated vent at people who don't understand the difference between TCP/UDP, don't make the effort to learn about it, but feel the need to espouse about it. --…

I don't get this guy at all. He opens with how hard networking is, then spends the entire article calling his readers stupid for not getting networking. Ok.

Re: Is it just me or is networking really hard?

#26

I'm thinking to add online multiplayer to my game: http://store.steampowered.com/app/363670 ...so this was very interesting read. I investigated a little bit, and found that there are more protocols than just pure UDP, and now I can't decide which one to try. I narrowed it down to these three: * PCC http://modong.github.io/pcc-page/ * NORM http://www.nrl.navy.mil/itd/ncs/products/norm * ENet over UDP http://enet.besp…

Since your players don't seem to be affecting each other a lot, you might even be able to go with simple TCP. UDP is needed when latency matters a LOT, which is mainly when people fight one another.

I believe World of Warcraft and some other MMORPGs use TCP, since latency isn't too big of a deal. Note that they do some things to compensate for this, however, like making players not collide with each other.

Re: Is it just me or is networking really hard?

#27
post #16

I've written a series of articles about this topic: http://gabrielgambetta.com/fast_paced_multiplayer.html It's usually well received, perhaps because it builds the ideas from the ground up and does not include the words "What the fuck is wrong with you?" .

Thanks very much for this, these are great articles. It seems one would need some way of synchronizing clocks (or measuring the lag between server and client). Do you know if there is a standard way of accomplishing this?

> Do you know if there is a standard way of accomplishing this?

Synchronizing clocks is one of the difficult problems in distributed computing.

Games tend to avoid doing proper synchronization of clocks by working in discrete time steps (frames). Because games run at 15-60 frames per second (a bit more for simulators), you can get away with synchronizing the clocks to +/- a few frames, ie. an accuracy of tens of milliseconds is good enough to provide a perception of real time.

In other words: game time is measured with an unsigned integer that tells how many time steps have elapsed since the game started.

Re: Is it just me or is networking really hard?

#28

I'm thinking to add online multiplayer to my game: http://store.steampowered.com/app/363670 ...so this was very interesting read. I investigated a little bit, and found that there are more protocols than just pure UDP, and now I can't decide which one to try. I narrowed it down to these three: * PCC http://modong.github.io/pcc-page/ * NORM http://www.nrl.navy.mil/itd/ncs/products/norm * ENet over UDP http://enet.besp…

I've worked with enet and I'm a big fan. It is definitely well suited for games. I'm not familiar with the other two.

A non-obvious feature of enet is that you can create two channels on a single connection then send permanent info (item 3 has been collected by player 2) reliably on one channel and send short term data (player 2's position is xyz) unreliably on the other channel.

The point is that the packets with a channel are ordered but different channels have separate timelines and retry queues. That means even if a reliable packet needs a lot of retries and takes long time getting through, it won't stall the packets on a different channel.

Re: Is it just me or is networking really hard?

#30

Earlier quoted context omitted.

Glenn's articles are also well received and go in fact into much more detail, with code examples of various pieces of infrastructure. He's been writing them based on patreon donations for a while now: https://www.patreon.com/gafferongames This one is just a frustrated vent at people who don't understand the difference between TCP/UDP, don't make the effort to learn about it, but feel the need to espouse about it. --…

I don't get this guy at all. He opens with how hard networking is, then spends the entire article calling his readers stupid for not getting networking. Ok.

Because he wrote an article on how to do networking but then gets people who clearly don't understand how networking works criticising and dismissing his article.
Post reply on HN