Skip to content
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

Documentation - update order #3475

Closed
huhund opened this issue May 1, 2020 · 5 comments
Closed

Documentation - update order #3475

huhund opened this issue May 1, 2020 · 5 comments

Comments

@huhund
Copy link

huhund commented May 1, 2020

Describe the problem or limitation you are having in your project:

The update order of engine features such as input, animation, physics and collision response is unknown.

  • It is important to know the order the engine executes to avoid hunting bugs that are expected behaviour depending on the update order
  • Developers need to know the update order to minimise frame lags in the input->logic->render cycle
  • The order of _integrate_forces() and _physics_process() works differently between 2D and 3D physics.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

Documenting the order of updates and callbacks, e.g. like this:
https://docs.unity3d.com/Manual/ExecutionOrder.html

@KoBeWi KoBeWi transferred this issue from godotengine/godot-proposals May 1, 2020
@Calinou
Copy link
Member

Calinou commented May 1, 2020

Related to godotengine/godot#37702.

@Calinou
Copy link
Member

Calinou commented Jul 13, 2020

@madmiraal @aaronfranke Any pointers on this? (I don't expect anyone to know the execution order by heart, but help would be appreciated.)

@madmiraal
Copy link
Contributor

The Main::iteration() loop function is here:
https://github.com/godotengine/godot/blob/db1eb909fe1e6067743892d7544160a1a40b9e43/main/main.cpp#L2116-L2270
Documenting what happens here will get you 80% of the way there.

@YellowOnion
Copy link

Is there any information on how say _process is run in a threaded system?

lets say I wanted to submit work to a thread, and then return that work from said thread in the same frame, how could I do that without blocking _process (which I assume would be bad as it would block all other _process's from submitting work) do I have to incur a single frame delay (read previous work, submit new work, exit function)?

it seems to be that using stuff like _input to submit work (asap) and then using (physics)process just to "read" from a thread?

it would be nice to know how to better manage expensive operations off the "scene graph".

@Calinou
Copy link
Member

Calinou commented Feb 3, 2022

Closing in favor of #5492, which has more information about the issue at hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants