Hacker News new | ask | show | jobs
by gafferongames 28 days ago
> Something that this article doesn't mention that's going to be a big constraint: each of your clients parsing 20mbps of updates is going to have a performance impact on those clients.

I can assure you that parsing 20 megabits per-second worth of packets on a client is not a significant CPU cost.

2 comments

Do you think its just parsing and throwing it away?
> Do you think its just parsing and throwing it away?

No. Why would anybody think this?

I'm not talking hypothetically btw. Everything I'm talking here about I have already implemented to production quality. So when I say something like, "so and so is not a big CPU problem when you code it right", I really mean it, because I have actually implemented it and found this to be true.

20 megabits per-second is 2.5 megabytes per second.

Do you really think PCs have difficulty processing 2.5 megabytes of data per-second in 2026?

Taking 2.5 megabytes per second of compressed new state information, uncompressing it, and applying it (across the "thousands and thousands of networked entities", etc, that keep being talked about) to the game state? All the memory thrash that implies, along with the knock-on effects (animation updates, yadda yadda)?

Yeah, that has a performance cost.

Will this impact a big-money gaming rig? Probably not? Will it run good on the Steam Deck? Probably not.

Generally, in a game loop, all this stuff is going to be single-threaded and blocking, right? It's mutating the game state, that's the classic why-games-suck-at-thriving-on-many-small-cores problem. So your performance capacity ends up being tighter than you might think relative to other "ingest data" tasks.

Let's say your game's networking runs at 30 ticks a second, and you've done a great job in uncoupling rendering from the game loop, so you're lucky enough to not have to worry about that. You still only have 30ms, on a single thread, to handle networking (likely no special kernel-skipping stuff on clients!), unpack, apply and propagate your changes, and also do your local game loop stuff. If you miss that interval once, the game starts to fall behind and feel bad to play.

Now, you could say "lower the tick rate", but then you'd need less data, too, and your game gets less responsive (fine for some games, not for others)

> Will this impact a big-money gaming rig? Probably not? Will it run good on the Steam Deck? Probably not.

Runs fine on steam deck. Runs fine old on 10 year old PC. It's really not that expensive, if you code it correctly (which means data oriented programming, programming in a cache aware way and going wide for everything to distribute load when possible).

But this is how modern games are coded anyway. See ECS/DOTS for Unity and so on. Based on similar techniques we've been using for a decade+ on game consoles.

> Generally, in a game loop, all this stuff is going to be single-threaded and blocking, right?

No. Once you go above 100 players you usually to go wide for pretty much everything across multiple threads, even on the client. But obviously on the server, you go really wide.