Hacker News new | ask | show | jobs
by kayoone 4825 days ago
im not an expert but arent UDP Socket connections more like an fire and forget scenario which doesnt create alot of waiting ? Id think that game servers have to compute heavier stuff per tick and have to process all the incoming packets anyway so that waiting for IO isnt really an issue ? It might make sense to have the game world updating and sending/recieving packets in different threads though, so is that were nodejs makes sense?
1 comments

The network stuff is, yeah. But presumably you want your minecraft world to be durable, which means hitting disk. And you don't want your network stuff blocked behind that.
ok makes sense but i wouldnt write every change to the disk anyway. The server state can well be kept inside memory and only be saved once in a while, but nevertheless doing that in a different thread would make sense.