如何设计低带宽的第一人称射击游戏?
我想创建一款 FPS 游戏,但需要管理服务器上的带宽。我需要设计哪些东西才能做到这一点?
例如我应该使用 TCP 还是 UDP?
我需要发送哪些数据?我应该以某种方式压缩它吗? 我想我需要位置、航向、俯仰、开枪布尔值。
我错过了其他考虑因素吗? 任何帮助表示赞赏。
I would like to create an FPS game but need to manage bandwidth on servers. What things do I need to design in to do this?
For example should I use TCP or UDP?
What data do I need to send and should I compress it somehow?
I'm thinking I need position, heading, pitch, firing gun boolean.
Other considerations I've missed?
Any help is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
那不是真的。怎么说呢,所有的实时动作游戏都使用UDP。你无法知道,因为你没有编写这些游戏,只有这些游戏的网络程序员知道它们在使用什么。
我个人知道,那两款实时网络射击游戏(其中一款是mmo)肯定使用TCP网络。它保存并且更好处理。最后。如果您编写 UDP 来制作游戏,则必须编写 80% 的 TCP 协议来保存数据包传输。所以,UDP 在今天是不可接受的。
此致。
Thats not true. How you can say, that all all real-time action games using UDP. You can't know, because you don't have write these games and only the networkprogrammer of these games knows, what they are using.
I personally know, that 2 realtime network shooter (one of them are mmo) definitly use TCP network. Its save and better to handle. And at last. If you program UDP to make a game, you must code 80% of the protocols TCP to make your packettransfer save. So, UDP is unacceptable today.
Best Regards.
我可以引导您访问我找到的关于该主题的最佳在线资源吗?
游戏程序员网络
我强烈建议您在考虑之前先创建一个 2D 网络游戏制作 3D 的。一旦您阅读了费德勒的文章,您就会更好地了解如何实现这一目标。
一些一般注意事项:
玩得开心!
May I direct you to the best online resource I've found on this subject?
Networking for Game Programmers
I highly recommend creating a 2D networked game before you even think about making a 3D one. Once you've read Fiedler's articles, you'll have a much better idea of how to accomplish this.
Some general notes:
Have fun!