π‘ How Computers Talk

The game you built now talks to a server, and so does your friend's copy. π‘ But that server might be in another city. So when you press a key, your move has to physically travel there and back.
How does a message cross the whole internet β and why does it sometimes arrive late (hello, lag)? Let's follow one.
The big idea: everything travels in packets
The internet doesn't send your message all in one smooth piece. It chops it into tiny packages called packets and fires them across, one after another β like passing notes hand-to-hand across a huge crowd.
Each packet has to travel, and travel takes time. The farther the other computer, the longer the trip. We measure that delay in milliseconds and call it ping (or latency). And sometimes a packet gets droppedon the way and never arrives β that's when games stutter and characters βteleportβ.
Your turn: feel the lag
Move your red hero on the left. Your position gets packed into a packet and sent down the wire to your friend on the right. Play with the distance and packet lossand watch the friend's view struggle to keep up.
The right hero is your friend's view of you β watch it lag behind!
π‘ The connection
Discovery missions
Try each one, tick it off, then peek at the secret.
π€Set Distance to βnearβ and move your hero. Does the friend keep up?
πNow slide Distance to βfar!β and move. What happens on the right?
πTurn Packet Loss up to 30β50% and keep moving. See the jumps?
π¦Watch a single packet travel the wire. What's inside it?
πThink: why do pro gamers pick servers close to them?
π You leveled up! You now know:
- π¦ Messages travel the internet as tiny packages called packets.
- π Distance costs time β that delay is called ping or latency.
- π Packets can get lost, which causes freezes and rubber-banding.
- π A closer server means lower ping and a smoother game.
- π Even your move in a game is just packets flying back and forth.
π¬ Behind the scenes β the final step!
You now know how a game knows where things are, how players share one world, and how messages fly across the internet. There's just one thing left: your game still only runs on your computer. How do you put it somewhere the whole world can reach it, day or night? Time to launch. π