Hacker News new | ask | show | jobs
by Kiro 1434 days ago
I've always wondered how for example private WoW servers work. Do they replicate the whole backend based on observations of how the actual game works and the network requests being made? How is that even possible without knowing all the quirks and other indirect behaviors you have no visibility of? E.g. when the server game loop ticks a thousand things happen that are not transmitted to the clients.
2 comments

Yes, they reimplement the backend. Yes, this does require a lot of experimentation. Yes, they sometimes get details wrong. Or sometimes they just change it, because they feel like it (e.g. accelerated xp, or just for paying customers)
A lot of games, particularly the "massively multiplayer" ones, don't actually do much on the server. The clients are authoritative for their characters, running the simulation, and the server just relays the serialized state to other clients. They rely on anti-piracy software (kernel DRM modules) to avoid cheating. In that situation replacing the server is easy.

For games where the server is doing the work and clients are just thin frontends which don't even know all the rules, it is basically impossible.

I'd argue writing a headless server is easier than writing a video game client app, but maybe that's only because I'm traditionally a backend server dev.
If your headless server does complex physics and AI processing and needs to be optimized to handle many clients in real-time, possibly taking full advantage of multiple cores or distributing segments of the world between machines, it is hundreds of time more difficult than a Unity client that moves some animated models around.

Some servers are complex, I don't know why you'd paint with such broad strokes as "headless server = easy". Even if your background is completely web development, surely you've been exposed to more than CRUD.