Couple basic game network programming questions
Is it ok to mix UDP and TCP in a game? For instance i'd like important things like messages, new players entering the area, admin commands, etc. to come in on TCP, and less important things like player updates coming in on UDP. The TCP traffic will be a lot less frequent than the UDP traffic. Seems like i've heard it's a bad idea to mix the two, but i'm wondering if that's still true if the TCP traffic would be pretty rare? My game is a space game, along the lines of Subspace, a live action arcade sort of game where it's fairly important you have a good idea of what other players are doing, what would be the best method to use to have smooth ships and bullets flying around? Dead reckoning? The Targetting method I found in the tutorials section here? Or something else? This will be on a "many clients one server" model. Should my network code on the client be in it's own thread, or will it be ok running in the main programs thread?
I've heard bad things about mixing UDP and TCP, because mixing the two causes jitter on the line which results in bad performance.
If I were you, i'd just use a reliable UDP API like RakNet.
If I were you, i'd just use a reliable UDP API like RakNet.
FTA, my 2D futuristic action MMORPG
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement