cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
6.83k stars 1.77k forks source link

[Feature Request] The game needs to adapt to the device high refresh rate #17408

Open zhefengzhang opened 1 month ago

zhefengzhang commented 1 month ago

Use Case

Current mainstream mobile devices support setting screen refresh rates higher than 60 HZ, but currently, the CocosCreator engine sets the game frame rate at a fixed 60 FPS and does not automatically adapt to the device's high refresh rate mode to adjust the game frame rate.

目前的主流移动设备都支持设置高于 60 HZ 的屏幕刷新率,但是目前 CocosCreator 引擎设置的游戏帧率是固定的 60 FPS,不会自动适应设备的高刷新率模式调整游戏帧率。

image

Problem Description

Since the animation effects and behaviors such as node displacement and rotation in the game may be created using a fixed FPS (such as 60 FPS), if the user sets the screen refresh rate to 120 HZ on their device, when they return to the game, the game's frame rate will not automatically change to 120 FPS (issues: it might be 60 FPS or 65 FPS), and it will not automatically adjust the animation frame rate in the game. This will cause animations with lower frame rates to appear choppy in high refresh rate modes.

We hope that the game's maximum frame rate can automatically adapt to the device's maximum refresh rate, and that there can be relevant events triggered, allowing the game to automatically modify the frame rate of animations or physics systems.

因为游戏中的动画效果以及节点位移、旋转等行为可能都是使用固定的 FPS 制作的(比如 60 FPS),如果用户在设备中设置为 120 HZ 屏幕刷新率,那么回到游戏中时,游戏的帧率无法自动变成 120 FPS(issues: 可能会是 60 FPS 或 65 FPS),并且不会自动修改游戏中的动画帧率,这就会导致低帧率的动画在高刷新率模式下显得卡顿。

我们期望能够让游戏最高帧率能够自动适应设备的最高刷新率,并且能有相关的事件传递出来,让游戏可以自动修改动画或者物理系统的帧率。

Proposed Solution

No response

How it works

No response

Alternatives Considered

--

Additional Information

No response

smallmain commented 1 month ago

very important.