-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add wait_idle_frames() #675
Comments
There was another issue, that I can't remember now, that made it seem like I usually just used |
+1 I don't know all the details, but that's what it looks like. This change would be great in my opinion. It shouldn't break compatibility since people currently have to use higher numbers of frames. |
I've been thinking about this and for the sake of backwards compatibility I think the following should be done:
|
Deprecation of the wait_frames is a smart idea! You can preserve full compatibility and slowly depreciate this func. You can consider staying with "frames" instead of "ticks", because "frames" are more intuitive and people know GUT's naming convention already. So I suggest:
Idle and Physics keywords are very verbose/explicite. They are also used in Godot's nomenclature to explain differences between these two processes: https://docs.godotengine.org/en/4.3/tutorials/scripting/idle_and_physics_processing.html What do you think? |
Versions
What versions of Godot do you want to use this feature in?
4.3+
The Feature
wait_idle_frames()
Currently
wait_frame()
is implemented top of a physics process, which is less or more related to IDLE frames handled in_process()
. Physics frame ticks are also dependent on project settings (physics/common/physics_ticks_per_second
,physics/common/max_physics_steps_per_frame
and probablyphysics/common/physics_jitter_fix
).As a result, to wait for IDLE frame you don't know how much physics frames you must wait, so you're sticking with a
wait_seconds()
, slowing down your tests and praying that one IDLE frame will take less than one second.The proposal is about adding awaiter for exact idle frames. When I want wait for a two IDLE frames, I should call:
await wait_idle_frames(2)
.Possible implementation
Thank you.
TBH: if not really needed, it would be better to implement awaiters on
_process
than_physics_process
.The text was updated successfully, but these errors were encountered: