Java Network Game Programming

Game Developer Magazine · 1997

Java Network Game Programming cover

Info

2026 preface. I wrote this for Game Developer Magazine in August 1997. It walks through building a two-player networked Connect Four game in Java: TCP sockets, a hand-rolled wire protocol, the whole client-server applet stack. Every concrete technology in the article is now dead. Browser Java applets were deprecated in 2017 and removed entirely from modern browsers. Sun is gone. The custom socket protocol I designed for NetConnect4 is the kind of thing nobody would hand-roll today; they’d reach for WebSockets and a JSON envelope and move on.

The thesis underneath the technology choices aged better than the technology did. The article was making the case that the browser would become a viable host for networked multiplayer games, even if it required a different category of game than the shrink-wrapped retail market cared about. That part turned out to be correct on a scale I didn’t predict. Modern browsers now run real-time multiplayer Connect Four (and a lot more) over a completely different stack. The one paragraph that aged worst is the opening line, where I write that Java’s current performance rules it out for graphically intensive games. The thing I didn’t see coming was that browsers themselves would get fast enough that the host language stopped being the bottleneck at all.

The full original article is on gamedeveloper.com, linked below.

Building a two-player networked Connect Four game in Java, with a complete walkthrough of socket programming, client-server architecture, and the underlying Internet protocols. Originally published in Game Developer Magazine, August 1997.

Read the full article on gamedeveloper.com

← Back to vault articles