Remix.run Logo
thunderfork an hour ago

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)

gafferongames an hour ago | parent [-]

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