You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The manual section on Application lifecycle - The update loop is missing certain steps, and the order of operations appears to be described incorrectly in the page text.
Each script and gui_script implements init, final, update, fixed_update (only in script), on_message, and on_input. Each function posts a message to "#" in order to see when the message is dispatched and handled. I didn't implement fixed_update for gui_script, since I suspect that's not supposed to be supported (see #8524).
This is the order of operations I see, with Defold version 1.6.3:
Interestingly, even though I load, init and enable the collectionproxy during init, no input will be passed on to the proxy on the first frame. It seems like a bug to me, but I don't know. Either way, it's unlikely to ever really matter.
Manual inaccuracies:
The message dispatch between on_input and update is not shown in the graphic or mentioned under Input.
The Input and Update description makes it sound like the sequence should be main on_input, proxy on_input, main update, proxy update. As seen above, this is not the case, and instead all the proxy functions are called in one go after main's on_input.
The Update description also suggests that script update, script fixed_update, and gui_script update will all be called before a message dispatch. This is not the case as seen above.
Unmentioned in the manual:
Extension lifecycle functions, extension event dispatch, and extension callbacks.
I haven't looked at when these are received/called:
On a side note, to make the three images on the page easier to edit, and make their content show up in searches, perhaps they could be replaced with text. It would be fairly easy to recreate the same 3-column layout with markup tables (if that's desired). If you want to keep the iconography, and you are able to display emojis, you can use emojis such as ✉️ and 🏭.
The text was updated successfully, but these errors were encountered:
The manual section on Application lifecycle - The update loop is missing certain steps, and the order of operations appears to be described incorrectly in the page text.
The following description is based on this repro case project: https://github.com/redoak/defold-message-dispatch-order
I have this simple structure in the project.
Each script and gui_script implements
init
,final
,update
,fixed_update
(only in script),on_message
, andon_input
. Each function posts a message to"#"
in order to see when the message is dispatched and handled. I didn't implementfixed_update
for gui_script, since I suspect that's not supposed to be supported (see #8524).This is the order of operations I see, with Defold version 1.6.3:
Interestingly, even though I load, init and enable the collectionproxy during init, no input will be passed on to the proxy on the first frame. It seems like a bug to me, but I don't know. Either way, it's unlikely to ever really matter.
Manual inaccuracies:
on_input
andupdate
is not shown in the graphic or mentioned under Input.on_input
, proxyon_input
, mainupdate
, proxyupdate
. As seen above, this is not the case, and instead all the proxy functions are called in one go after main'son_input
.update
, scriptfixed_update
, and gui_scriptupdate
will all be called before a message dispatch. This is not the case as seen above.Unmentioned in the manual:
I haven't looked at when these are received/called:
On a side note, to make the three images on the page easier to edit, and make their content show up in searches, perhaps they could be replaced with text. It would be fairly easy to recreate the same 3-column layout with markup tables (if that's desired). If you want to keep the iconography, and you are able to display emojis, you can use emojis such as ✉️ and 🏭.
The text was updated successfully, but these errors were encountered: