Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议添加原作者对双缓冲模式的额外说明 #51

Open
a1518915457 opened this issue Apr 29, 2023 · 1 comment
Open

建议添加原作者对双缓冲模式的额外说明 #51

a1518915457 opened this issue Apr 29, 2023 · 1 comment

Comments

@a1518915457
Copy link

在双缓冲模式趣味喜剧的例子中,
作者以“在单独的一帧中,初始给哈利的一巴掌传给了所有的喜剧演员。”开始,
然后说如果打乱舞台中角色的排序会导致更新的最终结果“一个角色对被扇作出反应可能是在被扇的同一帧或者下一帧, 这完全取决于两个角色在舞台上是如何排序的”,
最后说双缓冲模式可以解决问题“无论外部的代码如何调用,所有的角色在一帧内同时更新。”。
这里存在歧义,让读者以为使用双缓冲模式后就能实现最初的效果。(非翻译造成的)
实际结果是,每更新一帧只有一个角色被扇巴掌,表现不再受角色排序影响了。

将原作者在 munificent/game-programming-patterns#251 (comment) 里的说明加入注释,能帮助大家理解。

@wumohai
Copy link

wumohai commented Apr 29, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants