Advertisement

Couple basic game network programming questions

Started by May 14, 2005 03:13 PM
3 comments, last by GameDev.net 19 years, 9 months ago
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.
FTA, my 2D futuristic action MMORPG
Advertisement
Just curious, where did you find the tutorial on the targetting method?
The Targetting tutorial is found here:

http://www.gamedev.net/reference/articles/article1370.asp


This topic is closed to new replies.

Advertisement