Sim-eth-es TCP or UDP?

Couldn’t really find definitive information, so a quick question - does Sim-eth-es use TCP or UDP ?

And it’s only one port right (and multiple channels) ?

As far as I know, it uses TCP for all entity component updates. But for applying the players view directions which is sent continuously UDP is used.

1 Like

Tcp is guaranteed to get delivered. Udp is not, and is used for movements and what not that get sent like a machine gun.

1 Like

That would explain the difference I see between entity updates and updates to the player… I’ve wondered for a long time why that was. Great.

But it’s on the same port then (both TCP and UDP) ?

Ah. Good to know.

Yeah, should be!

I think it is the same port in pauls example code, but it does not have to be. In my implementation if memory serves, i just have another overload on the connectionState constructor for int tcpPort, int udpPort but i cant really see a reason why you would want seperate ports. There’s no benefit i can think of.

Ill also leave this here because knowledge is power.

As others have stated, it uses both.

SimEthereal, the library, is using UDP and a custom protocol on top of that to present reliable object state transfers. Its protocol is better than TCP because it knows it can throw away old state, etc… It’s optimized for object syncing, only sends changes, keeps data grouped into frames, etc…

Most of the rest uses TCP unless otherwise stated. For example, in the RPC mechanism there is a way to call a method as unreliable and asynchronous… this would use UDP. I don’t know if Sim-eth-es uses that annotation or not. Pretty sure not.

And yes, the UDP port is configurable in your code. The SimEthereal library just uses whatever you’ve setup in your Spider Monkey network connection… and there you can give a different port to both.

1 Like

Ahah… cool. Yeah, the move information is blasted once per frame and so it’s ok to drop one from time to time since the entire movement state is sent every time.