This guide goes well with these (in order):
- Understand Your Public IP
- TCP vs UDP
- How to Set Up Port Forwarding
TCP vs UDP (And Why Games Use UDP)
When setting up port forwarding, you'll often see:
If you don't know the difference, here's the fast exaplanation.
TCP: Reliable but Slower
TCP stands for
Transmission Control Protocol.
It is:
- Connection-based
- Reliable
- Ordered
- Error-checked
Before sending data, TCP does a handshake.
In other words:
- "Are you there?"
* "Yes."
- "Okay, sending data."
If a packet is lost:
- It gets re-sent
- Packets arrive in order; 1-2-3-4-5
This makes TCP perfect for:
- Websites (HTTP/HTTPS)
- File downloads
- Email
- Remote desktop
Accuracy matters more than speed.
UDP: Fast but Unreliable
UDP stands for
User Datagram Protocol.
It is:
- Connectionless
- No handshake
- No guaranteed delivery
- No automatic re-sending
UDP just sends:
"Here. Take it."
If a packet is lost? - It's gone - No retry.
So Why Do Games Use UDP?
Because in games:
- Speed matters more than perfection
- Late data is worse than lost data
Imagine this situation:
- Your character moves left
- The packet gets delayed
- TCP resends it
- It arrives 300ms late
You character would "teleport" to the left after the delay - That would feel terrible.
With UDP:
- If one movement packet is lost
- The next one updates your position instantly
No waiting, no backlog, just current state.
Real-Time Traffic Needs Low Latency
Games send constant updates like:
- Player position
- Rotation
- Shooting events
- Physics updates
These happen many times per second. Waiting for confirmation would:
- Increase latency
- Increase jitter
- Feel laggy
UDP keeps gameplay responsive.
Does That Mean UDP Is “Worse”?
No. It's just designed differently. For a different purpose.
TCP is great for things that need reliability. UDP is great for things that need speed.
| Feature |
TCP |
UDP |
| Reliable delivery |
Yes |
No |
| Ordered packets |
Yes |
No |
| Low latency |
Moderate |
Very low |
| Used by games |
Sometimes |
Very often |
Important: Some Games Use Both
Many modern games use:
- UDP for gameplay traffic
- TCP for login, chat, downloads, updates
If you are forwarding ports and unsure which to forward:
- Check the game documentation
- Or forward both (if required)
Speedy Summary
- TCP = Reliable, ordered, slower
- UDP = Fast, minimal overhead, no guarantees
- Games prefer low latency over perfect delivery
If you're hosting a game server, it will usually require
UDP ports to be forwarded.
Comments (0)
No comments yet. Be the first to comment!
Leave a Comment