Network for a MMOFPS
Blitz3D Forums/Blitz3D Programming/Network for a MMOFPS
| ||
Im creating a little MMOFPS. Can anybody tell me what connction type I must use? UPD,TCP or a network library or something... ThaNxx. |
| ||
http://repeatuntil.free.fr/raknet/ |
| ||
UDP is slightly faster than TCP, but TCP loses less packets and has less corruption. |
| ||
Specifically, TCP doesn't lose any packets, and the packets are ordered. With UDP, packets may not arrive in the order they were sent and they may never arrive at all. So you need to write your own system to handle lost or unordered packets if you plan to use UDP. The current wisdom seems to be to use TCP for important data ( like selling an item ) and then UDP for less vital things ( like a regular position update. ) |
| ||
I'd recommend using a network library, based on UDP, that adds some TCP-like functionality. Check the toolbox and code-archive sections of this site linked in the menus on this page. There may be a Blitz compatible solution in there. Also check out the links below. http://www.gamedev.net/community/forums/showfaq.asp?forum_id=15 http://www.gamedev.net/reference/list.asp?categoryid=30 http://www.devmaster.net/articles/building-mmorpg/ http://www.devmaster.net/articles/mmorpg-postmortem/part1.php http://www.devmaster.net/articles/mmo-economy/part1.php |
| ||
Never use TCP for that. The server/client will wait for the package to be completed. In case of Blitz this means a blocking call. So your game will freeze until the package is complete. :D Regards - Xaron |