Skip to content

zh-CN: update Games/Anatomy#23321

Merged
yin1999 merged 10 commits intomdn:mainfrom
PassionPenguin:game-anatomy
Nov 24, 2024
Merged

zh-CN: update Games/Anatomy#23321
yin1999 merged 10 commits intomdn:mainfrom
PassionPenguin:game-anatomy

Conversation

@PassionPenguin
Copy link
Contributor

minor improvements on missing styles and grammars

@PassionPenguin PassionPenguin requested a review from a team as a code owner August 31, 2024 11:55
@PassionPenguin PassionPenguin requested review from t7yang and removed request for a team August 31, 2024 11:55
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Aug 31, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Aug 31, 2024

Preview URLs

Flaws (12)

URL: /zh-CN/docs/Games/Anatomy
Title: 剖析游戏结构
Flaw count: 12

  • macros:
    • /zh-CN/docs/Games/Techniques/WebRTC_data_channels does not exist but fell back to /en-US/docs/Games/Techniques/WebRTC_data_channels
    • /zh-CN/docs/Games/Techniques/Audio_for_Web_Games does not exist but fell back to /en-US/docs/Games/Techniques/Audio_for_Web_Games
    • /zh-CN/docs/Games/Techniques/Tilemaps does not exist but fell back to /en-US/docs/Games/Techniques/Tilemaps
    • /zh-CN/docs/Games/Techniques/3D_on_the_web/Building_up_a_basic_demo_with_A-Frame does not exist but fell back to /en-US/docs/Games/Techniques/3D_on_the_web/Building_up_a_basic_demo_with_A-Frame
    • /zh-CN/docs/Games/Techniques/3D_on_the_web/Building_up_a_basic_demo_with_Babylon.js does not exist but fell back to /en-US/docs/Games/Techniques/3D_on_the_web/Building_up_a_basic_demo_with_Babylon.js
    • and 7 more flaws omitted
External URLs (2)

URL: /zh-CN/docs/Games/Anatomy
Title: 剖析游戏结构

(comment last updated: 2024-11-24 15:23:17)

Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请仔细校对一下,我看到有代码示例没有同步

Co-authored-by: A1lo <yin199909@aliyun.com>
@PassionPenguin PassionPenguin marked this pull request as draft September 4, 2024 02:32
@PassionPenguin
Copy link
Contributor Author

PassionPenguin commented Nov 23, 2024

请仔细校对一下,我看到有代码示例没有同步

欸?没找到欸?(不好意思……有个var没注意到)

@PassionPenguin PassionPenguin marked this pull request as ready for review November 23, 2024 02:52
@yin1999
Copy link
Member

yin1999 commented Nov 23, 2024

类似 35f4c34 的不止一处,请继续更正。

Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢贡献,但请始终注意贡献的质量,也不要迷信以前翻译的正确性(MDN 中文翻译的很多内容都来自曾经那个没有内容审核的 Wiki 时代)。这次我照旧对你的 PR 所涉及的文档进行全文的检查和更正。下次我可能就不会花那么多时间了(请重视贡献的过程)。

4. 睡眠(除非事件打断了浏览器的小睡),直到显示器准备好你的图像([VSync](https://www.techopedia.com/definition/92/vertical-sync-vsync))并重复。

你可以考虑开发实时应用程序,因为有时间做工作。所有上述步骤都必须在每 16 毫秒内进行一次,以保持 60 赫兹的显示效果。浏览器会尽可能早地调用你的代码,从而给它最大的计算时间。你的主线程通常会启动一些甚至不在主线程上的工作负载(如 WebGL 的中的光栅化或着色器)。在浏览器使用其主线程管理垃圾收集,其他任务或处理异步事件时,可以在 Web Worker 或 GPU 上执行长时间的计算。
你可以考虑开发实时应用程序,因为有时间做工作。所有上述步骤都必须在每 16 毫秒内进行一次,以保持 60Hz 的显示效果。浏览器会尽可能早地调用你的代码,从而给它最大的计算时间。你的主线程通常会启动一些甚至不在主线程上的工作负载(如 WebGL 的中的光栅化或着色器)。在浏览器使用其主线程管理垃圾收集,其他任务或处理异步事件时,可以在 Web Worker 或 GPU 上执行长时间的计算。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display 是显示器的意思

你可以考虑开发实时应用程序,因为有时间做工作。所有上述步骤都必须在每 16 毫秒内进行一次,以保持 60Hz 的显示效果。浏览器会尽可能早地调用你的代码,从而给它最大的计算时间。你的主线程通常会启动一些甚至不在主线程上的工作负载(如 WebGL 的中的光栅化或着色器)。在浏览器使用其主线程管理垃圾收集,其他任务或处理异步事件时,可以在 Web Worker 或 GPU 上执行长时间的计算。

当我们讨论预算时,许多网络浏览器都有一个称为高分辨率时间的工具。{{jsxref("Date")}} 对象不再是计时事件的识别方法,因为它非常不精确,可以由系统时钟进行修改。另一方面,高分辨率的时间计算自 `navigationStart`(当上一个文档被卸载时)的毫秒数。这个值以小数的精度返回,精确到千分之一毫秒。它被称为{{ domxref("DOMHighResTimeStamp") }},但是,无论出于什么目的和目的,都认为它是一个浮点数。
当我们讨论预算时,许多 Web 浏览器都有一个称为*高分辨率时间*的工具。{{jsxref("Date")}} 对象不再是计时事件的识别方法,因为它非常不精确,可以由系统时钟进行修改。另一方面,高分辨率的时间计算自 `navigationStart`(当上一个文档被卸载时)的毫秒数。这个值以小数的精度返回,精确到千分之一毫秒。它被称为{{ domxref("DOMHighResTimeStamp") }},但是,无论出于什么目的和目的,都认为它是一个浮点数。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


> [!NOTE]
> 系统(硬件或软件)不能达到微秒精度,可以提供毫秒精度的最小值然而,如果他们能够做到这一点,他们就应该提供 0.001 毫秒的准确性
> 系统(硬件或软件)不能达到微秒精度,可以提供毫秒精度作为一个最小的要求。不过,如果他们能够达到微妙的精度,那就应该提供这一精度
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

错别字,翻译还不够好

const tNow = window.performance.now();
```

回到主循环的主题。你将经常想知道何时调用主函数。因为这是常见的,`window.requestAnimationFrame()` 总是提供一个 `DOMHighResTimeStamp` 执行时回调函数作为参数。这将导致我们之前的主循环的另一个增强。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原翻译有语法错误


- 用户可以跳过渲染帧或根据其性能内插额外的帧。
- 你可以指望所有用户以相同的恒定频率更改打嗝的更新非美容变量
- 你可以指望所有用户以相同的固定频率更新非图形变量,而不会卡顿
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“非图形变量”这个翻译肯定是不对的。

- 强制性内插具有性能损失。

单独的更新和绘图方法可能如下面的示例。为了演示,该示例基于第三个项目符号,只是不使用 Web Workers 进行可读性(而且我们诚实地说可写性)。
单独的更新和绘图方法可能类似于下面的示例。为了演示,该示例基于第三个项目符号,只是不使用 Web Worker 进行可读性(而且我们诚实地说可写性)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

很奇怪的翻译:“使用 xxx 进行可读性”

@@ -267,13 +269,13 @@ var tNow = window.performance.now();
;(function(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

未同步

## 概要
## 总结

我知道上述的任何一种,或许没有适合你的游戏。正确的决定完全取决于你愿意(和不愿意)做出的权衡。主要关心的是切换到另一个选项。幸运的是,我没有任何经验,但我听说这是一个令人难以置信的游戏的 Whack-a-Mole。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“excruciating game”,不是“exciting game”

@yin1999 yin1999 merged commit d0d7afe into mdn:main Nov 24, 2024
@PassionPenguin
Copy link
Contributor Author

感谢贡献,但请始终注意贡献的质量,也不要迷信以前翻译的正确性(MDN 中文翻译的很多内容都来自曾经那个没有内容审核的 Wiki 时代)。这次我照旧对你的 PR 所涉及的文档进行全文的检查和更正。下次我可能就不会花那么多时间了(请重视贡献的过程)。

好的,辛苦了!以后会更认真全文给认真过几次!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

l10n-zh Issues related to Chinese content.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants