Skip to content

Networked Multiplayer

You'll put a turn-based game online so two people in different cities can play in their browsers, with a server that enforces the rules, a join code and a rejoin after a dropped connection.

About

Playing on one screen is easy. Playing across the internet means a server that holds the truth, clients that only send what they'd like to do, and a plan for the moment someone's wifi drops mid-game. Take a game you've already built (a classic from Board Game Gone Digital is the natural one) and put it online. Stay turn-based, because real-time netcode with prediction, interpolation and rollback is its own season. A small WebSocket server in Node, Go or Python on a free host, or a service like Colyseus, does the plumbing. Online play means other people's data, so collect nothing you don't need, and don't give strangers a way to send each other free text unless you're prepared to moderate it. Plan on a season of evenings, and expect half of it to go on the ten percent of connections that misbehave.

At a glance

Per requirement
50 XP
Completion bonus
600 XP
Requirements
7
Takes
A season
Skill level
Advanced (years of practice)
Cost
Free
Supplies
Nothing special
Where
At home
Other people
With other people
Locked for now
Earn two more Rare badges in Game Dev to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Design the message protocol before you write a line of networking code. List every message a client can send (join, move, resign, rejoin) and every message the server can send back (state, error, game over). Keep moves small and keep the full game state on the server only. Take a photo or screenshot of the protocol list. Photo
  2. 2
    Run an authoritative server that validates every move and broadcasts the result. The client sends a move, the server checks it against the rules, and either rejects it or sends the new state to both players. Then try to cheat: send an illegal move by hand from the browser console and show the server refusing it. Record the refusal and a legal move landing in both windows. Video
  3. 3
    Add a lobby with a six-character join code and a second player joining from another device. Codes beat accounts for a hobby game, since nobody has to sign up. Record a game created on one device and joined from another on a different network, such as a phone on mobile data. Video
  4. 4
    Handle a disconnect and a rejoin without losing the game. Give each player a token stored in the browser, keep the game alive on the server for at least ten minutes after a drop, and put the player back at the right turn on reconnect. This is where most hobby online games fall over. Record a page refresh mid-game with the board coming back. Video
  5. 5
    Deploy it to a public host with HTTPS and a rate limit. Fly.io, Railway, Render and a cheap VPS all work, and a free tier is enough for a hobby game. Rate limit joins and moves per connection so one script can't flood the server. Take a screenshot of the live URL and the server log showing two players in one game. Photo
  6. 6
    Get twenty complete online games played by people who aren't you. Post it once in a community for the game, and run a tournament night if you have to. Take a screenshot of the server's completed-game count or log with player details hidden. Photo
  7. 7
    Write a post on what broke and how you'd approach real-time play next. Cover the disconnect cases you didn't expect, the host's cold start, and the latency you measured between two cities. Take a screenshot of the post and include the link. Photo