godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.93k stars 3.21k forks source link

Processing diagram (game loop) #9305

Open berarma opened 6 months ago

berarma commented 6 months ago

I needed to know the order things happen inside the Godot engine to better write code for it. I don't think there's something similar in the documentation. There are some pages which can give a grasp but not the whole picture:

I don't know of any more. Since they're scattered I might have missed some.

I've made a very simple diagram by looking at the code, mostly copying from it. I'd be willing to improve it and adding it to the documentation, but I don't know where or how. For now, I want to make sure it's correct and add a bit more info.

Please, add corrections, criticism and any useful info in the comments. Thanks.

If it already existed then I'll feel dumb but don't worry, it didn't take too long.


Processing diagram for Godot 4.3

The scene tree object is an instance of MainLoop. In the default configuration it's an SceneTree object, thus MainLoop could be replaced by SceneTree.

berarma commented 6 months ago

Related: #9204.

berarma commented 6 months ago

Additional information: #5492