n2liquid's sandbox

Archive for the ‘Network Protocols’ Category

Recently I’ve been playing Ragnarok Online and figured I could exploit a property of pseudo-random number generators (PRNG) to synchronize some real-time information in online games without relying on “just-in-time” network packets (that is, without having to broadcast the information everytime, the moment it changes).

The idea is straightforward: send out PRNG seeds to network peers and let them use that to figure when, what or how special events (like when an attack was a critical blow or how much damage one caused) happen. This results in instant feedback for the player (making latency look lower) while reducing network traffic, which may effectively reduce latency for packets that really need to be delivered in real-time (such as non-deterministic state changes).

If cleverly implemented, the trick could be used in very large proportions, such as synchronizing the actions of monsters across many clients while they’re not engaged in battle: the server just sends out idle monster information to the clients, a controlling seed and the iteration counter; as long as they’re not affected by non-deterministic factors (like interacting with a player), the server does not need to send any other synchronization packet whatsoever, and every client has an accurate image of the game world. That’s zero packets and absolute synchronization, an almost utopic scenario!

Of course, you still have to synchronize the generators in some cases, but a lot of different information that would otherwise call for a network packet can be extracted from them.

As mentioned, this doesn’t work for all real-time datum, but it does for a handful, and I’m confident small protocol optimizations can account for massive improvements in some online games like, well… massively multiplayer online games.

I’m not sure any game uses this, but I’d be impressed if none did. If you know of any, I’d be interested in hearing about it.

Advertisements

Cute bouncing pixels

un.ma.i!

Twitter (technical)

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Twitter (personal)

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Get messaged when I post something new!
Just enter your e-mail and hit Follow:

Join 171 other followers

%d bloggers like this: