You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 17, 2026. It is now read-only.
在双缓冲模式趣味喜剧的例子中,
作者以“在单独的一帧中,初始给哈利的一巴掌传给了所有的喜剧演员。”开始,
然后说如果打乱舞台中角色的排序会导致更新的最终结果“一个角色对被扇作出反应可能是在被扇的同一帧或者下一帧, 这完全取决于两个角色在舞台上是如何排序的”,
最后说双缓冲模式可以解决问题“无论外部的代码如何调用,所有的角色在一帧内同时更新。”。
这里存在歧义,让读者以为使用双缓冲模式后就能实现最初的效果。(非翻译造成的)
实际结果是,每更新一帧只有一个角色被扇巴掌,表现不再受角色排序影响了。
将原作者在 munificent/game-programming-patterns#251 (comment) 里的说明加入注释,能帮助大家理解。