Skip to content

[Feature suggestion] Make FPS actually dynamic #181

@Felix14-v2

Description

@Felix14-v2

Description

Over time, more and more laptops are equipped with a high refresh rate screen, 120Hz and higher, but this leads to high power consumption when running Minecraft on battery. Actually not all game scenarios require such a high FPS: you don't need to see 144 FPS of the world rendering when you are messing around in a chest, view achievements, or just stand still for any other reason.

Solution

Dynamic FPS can detect player movement speed (as well as other conditions) and adjust FPS to it. This would allow Minecraft to save large amount of computing power almost without affecting the game perception.

By default, FPS can be reduced to 60 and then boosted when certain conditions are met. For example (with base frequency of 144 Hz):

State FPS Condition
fast movement 144 xyz-coordinates are changing fastly* (e.g. when sprinting, falling or flying)
generic movement 120 xyz-coordinates are changing on average speed (walking)
slow movement 90 xyz-coordinates are changing slowly (e.g. sneaking)
fast camera movement 144 yaw/pitch are changing fastly*
average camera movement 120 yaw/pitch are changing moderately*
slow camera movement 90 yaw/pitch are changing slowly*
in danger 144 player is receiving damage
in combat 144 player is holding weapon
in inventory** 90 a UI is opened (inventories, chests, villagers, hoppers, droppers etc)
is active varies delay defore reducing FPS after detecting last important condition like in danger or in combat

* — sensitivity may be defined by user
** — can ignore is active condition

Displays on different devices have different refresh rate and support changing them, so a FPS preset system is also needed.

Additional

This feature will also require its own hotkey (to conveniently switch it if your scenario isn't listed above) and the option to disable it in multiplayer (because there's a lot of movement unrelated to player).
Theoretically it is possible to detect if a device has power supply connected, but in practice... Previous attempt to use this (Battery Status Info mod) was totally unsuccessful, so basic manual switching by hotkey would be simple and effective.
Also some conditions may support custom extensions in config file (or even API for mods) to allow modpack/datapack authors define modded inventories and weapons. In case of datapacks the problem is we can't add custom item ID and have to modify the existing ones with custom data. Before 1.20.5 datapack creators used custom NBT tags and CustomModelData for this, but since 1.20.5 it is enough to check the presence of minecraft:custom_data component.

Related

Yeah, Nvidia GeForce Experience and Intel control panel has similar options, but they both works as bad as you can imagine (and even worse if we talk about Intel, it's just murders your GPU trying to detect the motion). GeForce Experience is a garbage itself, so having standalone mod with this feature would be very helpful.

P.S.

Over time, more and more mods began to appear, trying to replace Dynamic FPS. However, your mod has always been one step ahead of others in terms of quality, performance and functionality, and such a feature would make the mod the absolute leader in its category :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions