使用或不使用垂直同步
我正在决定是否在我一直使用 OpenGL 开发的新游戏中使用垂直同步。目标是为用户提供最佳的游戏体验,并在性能和质量之间取得良好的平衡。该游戏设计为可以在较旧的(Intel/上网本)计算机和较新的(NVidia/i7 台式机)计算机上运行。然而,我知道垂直同步的目的是防止撕裂;即使垂直同步关闭,我也从未能够重现这个撕裂问题。提供最佳体验;垂直同步应该打开还是关闭?
I'm deciding on whether or not to use VSync for a new game that I've been developing using OpenGL. The goal is to provide the user with the best gaming experience, and to have a good balance between performance and quality. This game is designed to run on both older (Intel/Netbook) computers and newer (NVidia/i7 desktop) computers. I am aware that the purpose of VSync is to prevent tearing, however; I have never been able to reproduce this tearing issue even with VSync turned off. To provide the best experience; should VSync be turned on, or off?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
关于这个问题,可以说的有很多。让我算一下:
time += 16.7ms
John Carmack 一直在寻求一种“以 60Hz 垂直同步,但如果我错过了截止日期则不同步”的模式我认为就是这个原因。所以最根本的答案是没有完美的答案。这实际上取决于什么对你的游戏更重要。您需要考虑的事项:您想要达到的帧速率、输入延迟的影响程度、游戏中有多少移动量,这些都是需要考虑的问题。
There are many things that can be said about this issue. Let me count the way:
time += 16.7ms
John Carmack has been asking for a mode that does "vsync at 60Hz, but don't sync if I missed the deadline" for what I assume would be this reason.So the bottom line answer is that there is no perfect answer. It really depends on what matters more for your game. Things you need to look at: which framerate you want to achieve, how much input latency matters, how much movement is there in the game, is power going to be a concern.
为了获得最佳用户体验,请在菜单中放置一个选项来打开/关闭垂直同步。这样用户就可以决定。您可能无法重现撕裂,但这在某些系统上绝对是一个真正的问题。
至于默认设置应该是什么,我不确定,我认为这是你的选择。我更喜欢默认关闭垂直同步,因为启用它会稍微降低性能,而且大多数人不会意识到撕裂或不关心它,但默认情况下启用它也有充分的理由。
For the best user experience, place an option in your menu to turn VSync on/off. This way the user can decide. You might not be able to reproduce tearing, but it's definitely a real issue on some systems.
As for what should be the default setting, I'm not sure, I think it's your choice. I prefer to have vertical sync off by default because it reduces performance a bit when enabled and most people don't recognize the tearing or don't care about it, but there are good reasons to enable it by default, too.
我相信垂直同步的默认值应该是打开的(基于我所有的游戏,而不是编程经验:))。仅仅因为您没有看到它,并不意味着您不应该遵循好的
实践。
正如schanaader提到的,通常游戏会离开垂直同步作为视频设置菜单中某处的配置选项。对于那些不知道 vsync 含义的人来说,默认值仍应为“打开”,如果用户足够了解,他们可以选择对其进行调整以查看有何不同
I believe the default for VSync should be on (based on all my gaming, not programming experience :) ). Just because you don't see it, doesn't mean you shouldn't follow a good
practice.
And as schanaader mentioned, typically games would leave vsync as a configuration option somewhere in the video settings menu. Default should still be "on" for those that don't know what vsync means, and if the user is knowledgeable enough, they have the option of tweaking it to see what the difference is