Soulseekqt tcp vs upd6/13/2023 ![]() When a packet is dropped, you have to retransmit from the dropped packet. The issue with anything TCP based (including websockets) is that the reliable retransmission aspects is a source of latency spikes. But depending on your specific needs you can use either one! I usually go with TCP because it’s simpler in my opinion and I move to UDP when TCP doesn’t suffice.Īny serious real time multiplayer game will need to use UDP. Which types of games benefit from which? Generally, UDP should be used for high-speed games that need to send information very quickly and TCP / WebSockets should be used in any game where sub-second precision isn’t very important or you need some reliability. This constant discussion ensures that your data gets to the recipient in full, but the extra chatter and potential resending takes extra time and bandwidth! The sender and receiver constantly ask each other whether they’ve received the data being sent and will resend it a few times if the information wasn’t properly received. TCP on the other hand is a connection-based protocol. This means that the recipient may be missing some (or all) of the information you’ve sent or that they’ve received parts of the information in an order that doesn’t make much sense. Because UDP is connectionless and “fire and forget”, you can send a lot of packets to a recipient very quickly but you can neither be sure that the recipient received them nor that they received them in the exact order you sent them. Since WebSockets is built on TCP with a bit of overhead during connection setup, this is more of a comparison between TCP and UDP.īetween TCP and UDP, UDP is lower latency as you mentioned, but that comes at the cost of reliability. Use UDP for high-speed games and TCP for everything else.Īs you mentioned, WebSockets and UDP are on different network layers. TL DR: UDP is fast but not very reliable and WebSockets (TCP) is reliable but not very fast. Feedback Friday Screenshot Saturday Soundtrack Sunday Marketing Monday WIP Wednesday Daily Discussion Quarterly Showcase Related communities 1 For questions, get in touch with mods, we're happy to help you. Free assets OK, be sure to specify license. If you need to use screenshots, that's ok so long as is illustrates your issues.ĭo not solicit employment. Use discord, /r/indiegames, /r/playmygame or /r/gamedevscreens.īe specific about your question. ![]() Feedback, praise, WIP, screenshots, kickstarters, blogs, memes, "play my game", twitch streams. ![]()
0 Comments
Leave a Reply. |