← Back to the map
Lesson 11

πŸ“‘ How Computers Talk

How Computers Talk illustration

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.

1

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”.

2

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.

Move your hero:

The right hero is your friend's view of you β€” watch it lag behind!

πŸ“‘ The connection

ping (trip time): 335 ms
round trip: 670 ms
packets sent: 0
packets lost: 0
3

Discovery missions

Try each one, tick it off, then peek at the secret.

0/5
  • 🀝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:

🎬 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. πŸš€

πŸš€Next stop Β· Lesson 12Putting Your Game Online β†’Deployment! Take the game off your computer and give it an address the whole world can visit.
← Back to the map