Godot Version
4
Question
So I have made a settings to reduce the resolution of the game with ai but when I test it on the web it runs at 50-60 fps at 100% resolution and at 10% resolution , I hoped to get doubled perfomance since the work is alot less but it went to 14fps. what could be the reason? I am a begginger and I dont understand much about godot engine I just know some basics btw
extends OptionButton
class_name ResolutionChanger
const SCALES: Array[float] = [
0.10,
0.25,
0.50,
0.75,
0.85,
1.00
]
func _ready() -> void:
print("==============================")
print("Resolution Debug Started")
print("==============================")
clear()
add_item("Potato Mode Minus (10% Render)")
add_item("Potato Mode (25% Render)")
add_item("Low Quality (50% Render)")
add_item("Medium Quality (75% Render)")
add_item("High Quality (85% Render)")
add_item("Max Quality (100% Render)")
select(5)
var root_viewport := get_tree().root
print("Viewport Size: ", root_viewport.size)
print("Current scaling_3d_scale: ", root_viewport.scaling_3d_scale)
print("Current FPS: ", Engine.get_frames_per_second())
item_selected.connect(_on_scale_selected)
print("==============================")
func _on_scale_selected(index: int) -> void:
var root_viewport := get_tree().root
root_viewport.scaling_3d_scale = SCALES[index]
print("Scale applied: ", root_viewport.scaling_3d_scale)
await get_tree().create_timer(2.0).timeout
print("FPS after 2 seconds: ", Engine.get_frames_per_second())
[Here is the video](https://drive.google.com/file/d/1g1XIpYRyerJDAxg-ndbUjWzvlxbte6kZ/view?usp=sharing)