简体   繁体   English

C ++中3D游戏联网的基础知识是什么?

[英]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. 几周后,我正在考虑帮助一个项目使用3D角色完成C ++世界的一个相当重要的方面:网络。 I will help with the server's transfer of information from/to clients. 我将协助服务器与客户端之间的信息传输。 I already know C++ well enough. 我已经非常了解C ++。 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. 正如RageD所说,不同类型的游戏之间的网络连接差异很大。 A FPS server typically sends complete game state to all clients regularly (eg 60Hz) over UDP. FPS服务器通常会通过UDP定期(例如60Hz)向所有客户端发送完整的游戏状态。 Other game types can use TCP (tuned a bit like TCP_NODELAY and forcing immediate ACK packets) or reliable UDP (raknet lib or others). 其他游戏类型可以使用TCP(调整得有点像TCP_NODELAY并强制使用即时ACK数据包)或可靠的UDP(raknet lib或其他)。 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 我建议您从这里开始: http : //www.gamedev.net/community/forums/showfaq.asp?forum_id=15

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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