logoalt Hacker News

andaitoday at 3:51 AM1 replyview on HN

I was working on a multiplayer game a while ago, and one of the iterations of the netcode was "thin client" where clients just sent input, server simulated the game, and it dumped world state onto the pipe at 60hz. I didn't ship that version but I estimated a $3000 bandwidth bill with that approach!

I started looking into diffing the state, compression, etc... until I realized, wait a minute! My player movement is linear so I only need a packet for start and stop! And so I achieved near infinite efficiency improvement :)

I think the word is... a specialized solution can beat a general one.

Also, "remembering what the program actually needs to do, and just making it do that"... I de-pessimized the netcode: https://youtube.com/watch?v=pgoetgxecw8


Replies

purple-leafytoday at 4:45 AM

$3000 bill wow!!

Clever insight :) yes a specialised solution usually wins! Good effort

Did you end up publishing your game?