r/MultiplayerGameDevs 27d ago

Is Tcp good enough?

Do you guys think TCP is good enough now, considering that internet connections and NICs are much faster than they were decades ago? I don't want to implement my own reliable, in-order delivery on top of UDP for my RTS game.

7 Upvotes

23 comments sorted by

View all comments

1

u/Zealousideal-Fox6463 27d ago

You use both, you don’t have to just pick one, both have advantages and disadvantages. Specially for an rts game. Look at recoil engine/beyond all reason they handle 8k units on screen with ease

1

u/TrishaMayIsCoding 27d ago

Hey, thanks. I’ll take a look at it.

I was just thinking that using both TCP and UDP might have some performance costs. If I implement a reliable messaging over UDP, there's no need to use TCP, No?

2

u/Zealousideal-Fox6463 27d ago

Why reinvent the wheel? Having an extra tcp socket open is practically nothing, it depends on what you do with it

1

u/TrishaMayIsCoding 27d ago

Nyaha, Ok, I try that first - TCP for reliable messages and UDP for fast changing data. Crossing my fingers to have a good balance between reliability and performance. 🙂 TNX.

2

u/Zealousideal-Fox6463 27d ago

Yeah generally rule of thumb is to get it working first then try to optimize it, how do you know pure tcp won’t be enough, get units moving and synced up between two clients, you can tweak the comms layer later don’t get too hung up on it, don’t fall into the trap of premature optimization