Add game speed controls to the embedded game window#107273
Add game speed controls to the embedded game window#107273Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
|
Love this functionality! But the UX of this needs work – because if the user wants to slow down a lot to see a specific thing in slow motion and then resume normally, it needs a LOT of clicks with this interface. Perhaps a dropdown (probably), a small slider, or a small field where one can enter a percentage. |
|
Cool! Without the |
Do you think the speed reset button is needed? 2025-06-08.05-49-17.mp4 |
|
Arguably it would be great to be able to reset to 1.0x using a little reset button (like the one used to reset variables to their default in the inspector!), but we wouldn’t want the bar to grow or shrink in width. maybe there’s a clean solution to this? |
I have two solutions, the first is to reset the value by right-clicking on the menu button, the second is to add a button to reset it, when the value is one, the button is not hidden and only disabled. |
|
as right clicking is hidden, the button is probably a better idea? |
|
The current implementation changes several values directly. Instead, they should override those temporarily (and add up to those that have been changed in the game itself) and go back to their original values once done. |
|
Let me give you a example:
This is how it's done for the mouse mode behavior as well. |
The reason I wanted those buttons is to have keyboard shortcuts for them, but we can replace it with a toggle that enables the speed override instead. This means you could toggle between slow motion and full speed, or full speed and fast-forward. It would use remember the last selected speed to toggle back to every time you press the shortcut (on startup, it'd default to 2×). Emulators generally have a key you can press (or hold, like in Dolphin) to enable turbo mode. They sometimes have a separate slow motion key though (as well as frame advance). |
0732f18 to
dd5849c
Compare
I updated the code so that |
dd5849c to
6083546
Compare
They can also be changed by the user, so yes. |
6083546 to
b46b8c2
Compare
b46b8c2 to
addc7bc
Compare
addc7bc to
b233c0c
Compare
b233c0c to
9bb5cb0
Compare
2025-06-11.05-48-48.mp4There's a problem, don't I? |
|
Could you rebase it? It's still on Godot 4.5. |
1e5a271 to
79680c4
Compare
@YeldhamDev Done. |
|
Opening the editor spits this warning: |
79680c4 to
189404a
Compare
@YeldhamDev fixed. (I think) |
|
I can still reproduce it. |
189404a to
808b82b
Compare
@YeldhamDev now fixed |
YeldhamDev
left a comment
There was a problem hiding this comment.
Tested with my game that heavily relies on changing the game's speed, and everything seems to be working fine.
There was a problem hiding this comment.
The current implementation needs some changes. The logic for speed control is currently implemented in the GameView and since GameView not used in the Android Editor (we use native implementation there), so it won't be possible to support this feature on Android Editor.
This is also inconsistent with other debugger options because others are handled in GameViewDebugger.
We should move the core logic into the GameViewDebugger (keeping the UI related logic in GameView) and expose methods like set_speed_multiplier(value) and reset_speed(). This would allow to call these methods from the Android side.
808b82b to
92bdf15
Compare
|
@syntaxerror247 Done |
syntaxerror247
left a comment
There was a problem hiding this comment.
Looks good! Just make sure to address the nitpick I mentioned above.
92bdf15 to
60868ae
Compare
60868ae to
7ddce8a
Compare
|
Thanks! Congratulations on your first merged contribution! 🎉 |

closes godotengine/godot-proposals#12555
preview.mp4