gamedev / java-game
Multiplayer Java Game
← Back to dev blogMy first multiplayer game, from 2018: a Java NIO server with a packet format I made up. In 2019 it stopped at the login screen; in 2026 it finally got a world to walk around and chat in. This is a browser port of the original Swing client, speaking the original protocol, with every packet printed under the game as it crosses the wire.
How to play
- Click LOGIN, type a username, press the Enter key, type a password, then click the Enter button. A name nobody has used becomes a new account.
- Walk with the arrow keys or WASD. Rock and water block you.
- Press Enter to chat, and Enter again to send.
- Open this page in a second tab and both players appear on each other's map. The original 2018 desktop client can join the same world too.
How to play on a phone
- Tap LOGIN and the keyboard opens. Type a username, tap Next, type a password and tap Go. A name nobody has used becomes a new account.
- Walk with the D-pad under the screen. Hold an arrow to keep walking, and slide your thumb to another arrow to turn without letting go.
- Tap the red CHAT button, type, and tap Send.
- Players on computers and phones share the same world.
The 2018 server only speaks TCP, which browsers can't. It runs as a thread inside the JBend live demo, behind a WebSocket bridge that relays the bytes unchanged. The whole history is in the development blog.