How 2004 RuneScape squeezed a 3D MMO through a 56k modem
Jagex shipped a browser-based 3D world holding thousands of players per server over dial-up links that delivered roughly 5 KB/s down and less up. A decompiled 2004 RuneScape 2 client shows the trick was relentless byte-counting rather than clever compression. Three constraints defined the design: dial-up bandwidth, a Java applet sandbox that forbade raw sockets and UDP (so everything rode one in-order TCP connection), and a 600ms server tick that set latency granularity and made bytes, not milliseconds, the thing worth optimizing.
The one security measure in the stack is deliberately minimal. After an RSA login handshake, an ISAAC stream cipher encrypts only the single opcode byte at the head of each packet, using two keystreams seeded from a shared four-integer key (the server direction adds 50 to each word to avoid keystream reuse). Because the opcode dictates how the rest of a packet is parsed and where it ends, enciphering just that byte turns the unencrypted body into an unparseable wall of bytes for third-party tools — the cheapest possible defense against packet sniffers.
The walk packet illustrates the frugality. Instead of absolute coordinates for every tile, the client sends the start position as two shorts, then one signed byte per axis for each waypoint delta, halving per-step cost. It transmits only path corners rather than every tile, letting the server replay straight lines and validate them against its own collision map, plus a single byte for the Ctrl-key movement modifier. A single step north costs seven bytes total. The techniques trace back to RuneScape Classic and still underpin Old School RuneScape and RuneScape 3 today.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.