在 TD Flash 游戏中同步玩家的单位
我对“网络世界”有点陌生,我想要开发的是一款多人TD游戏,我关心如何同步玩家,我的意思是,有时地图上可能会到处都是单位。为了让所有玩家在任何时候都能看到相同的内容,这是一个必须考虑的问题吗?
我打算使用 RTMFP。
谢谢!
Im sort of new to the "net world", what I want to develop is a multiplayer TD game, and Im concerned about how to sync the players, I mean, its possible that at some times the map would be crowed with units everywhere.. is that an issue that has to be considered in order to make all players view the same at all times?.
Im planing to use RTMFP.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何让你的游戏具有确定性?它需要更少的带宽。让游戏循环以 10FPS 左右的速度运行,由计时器触发,然后在建造或升级塔时报告。延迟:可能每秒只处理一次,如果您在 15.33 秒内执行某些操作,请告诉其他玩家(以及您)在 17 秒内处理它。 Ping 不同步已解决!
What about making your game deterministic? It requires much less bandwidth. Have the game loop run at 10FPS or so triggered by timer, and then just report when you build or upgrade a tower. Latency: maybe only process it once per second, and if you do something on 15.33s tell the other player (and you too) to process it at exactly 17s. Ping desyncs solved!