GMS 2.3+ Converting TCP game to UDP

I finished creating a multiplayer project that works fully (I got a friend on Discord to test from another state) The only problem is I didn't know you can't just switch from TCP to UDP like that, (even though I kinda know how differently they work.) Real-time gameplay STINKS, but the chat at least works really well. I already made another post looking for non real-time games, except I don't really want to do one of those.

If anyone knows what I have to remove/edit to change, I can kind of figure it out myself, just need some important info on what to do. (And if there is a way in GMS, use TCP for chat and UDP for gameplay, but that is most likely overcomplicated or GMS can't do it.)
 

rytan451

Member
I believe you'll have to use different ports. If you use two sockets, you should be able to make the gameplay transmit over UDP. Of course, then you'll have to handle UDP being inherently unreliable (you can receive the same datagram twice, or no times, and two datagrams can be received out of order).
 
I believe you'll have to use different ports. If you use two sockets, you should be able to make the gameplay transmit over UDP. Of course, then you'll have to handle UDP being inherently unreliable (you can receive the same datagram twice, or no times, and two datagrams can be received out of order).
yeah, only reason I would use UDP is for gameplay, as TCP is laggy as hell
 
Top