简体   繁体   中英

What are the basics of networking for a 3D game in C++?

In a few weeks I'm thinking of helping a project finish a pretty major aspect of a C++ world with 3D characters: networking. I will help with the server's transfer of information from/to clients. I already know C++ well enough. I just need to know what specifically I should know to do this and resources from which I could find this information. Thanks :)

as RageD said, it's a big difference in networking between different types of games. A FPS server typically sends complete game state to all clients regularly (eg 60Hz) over UDP. Other game types can use TCP (tuned a bit like TCP_NODELAY and forcing immediate ACK packets) or reliable UDP (raknet lib or others). Network protocol can become really wide so you'll need to think how to make it easily extendable. I'd recommend you to start from here: http://www.gamedev.net/community/forums/showfaq.asp?forum_id=15

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM