info on world update loop |
m grrr |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
{{Note|<translate>This article is about the general FrooxEngine-wide concept. For the ProtoFlux node, see [[ProtoFlux:Update]]</translate>|information}} | {{Note|<translate><!--T:1--> This article is about the general FrooxEngine-wide concept. For the ProtoFlux node, see [[ProtoFlux:Update]]</translate>|information}} | ||
<translate> | <translate> | ||
In [[FrooxEngine]], an '''update''' refers to execution of the main engine loop. During an update, physics are calculated, synchronization packets are sent, permissions are re-evaluated, and many other events and checks are performed. An update comprises both engine events and the update loop in a [[world]]. Every user in a session has their own local update time, or the time that it takes to step through an update. This value can be received with the [[ProtoFlux: | <!--T:2--> | ||
In [[FrooxEngine]], an '''update''' refers to execution of the main engine loop. During an update, physics are calculated, synchronization packets are sent, permissions are re-evaluated, and many other events and checks are performed. An update comprises both engine events and the update loop in a [[world]]. Every user in a session has their own local update time, or the time that it takes to step through an update. This value can be received with the [[ProtoFlux:Delta Time|Delta Time]] ProtoFlux node. | |||
</translate> | </translate> | ||
<translate> | <translate> | ||
<!--T:3--> | |||
As of the time of writing, the time to perform an engine update is limited by the framerate of the Unity renderer. This may change with the implementation of inter-process communication and eventual switch to a new rendering engine. | As of the time of writing, the time to perform an engine update is limited by the framerate of the Unity renderer. This may change with the implementation of inter-process communication and eventual switch to a new rendering engine. | ||
</translate> | </translate> | ||
== <translate>World update loop</translate> == | == <translate><!--T:4--> World update loop</translate> == | ||
<translate> | <translate> | ||
<!--T:5--> | |||
Every [[world]] that is open will refresh as part of the update loop. If the client is focused on a world or if the host is a headless without autosleep, it will run a ''full update cycle''. Otherwise, it will run a ''partial update cycle''. | Every [[world]] that is open will refresh as part of the update loop. If the client is focused on a world or if the host is a headless without autosleep, it will run a ''full update cycle''. Otherwise, it will run a ''partial update cycle''. | ||
</translate> | </translate> | ||
<translate> | <translate> | ||
<!--T:6--> | |||
The general world update loop is sequential and runs as follows: | The general world update loop is sequential and runs as follows: | ||
</translate> | </translate> | ||
# <translate>Update [[stream]] values</translate> | # <translate><!--T:7--> Update [[stream]] values</translate> | ||
# <translate>Calculate physics</translate> | # <translate><!--T:8--> Calculate physics (only during a full update cycle)</translate> | ||
# <translate>Run world events</translate> | # <translate><!--T:9--> Run world events</translate> | ||
# <translate>Handle input</translate> | # <translate><!--T:10--> Handle input (only during a full update cycle)</translate> | ||
# <translate>Perform [[worker]] updates</translate> | # <translate><!--T:11--> Perform [[worker]] updates</translate> | ||
# <translate>Run most [[ProtoFlux]]</translate> | # <translate><!--T:12--> Run most [[ProtoFlux]]</translate> | ||
# <translate>Run worker change events</translate> | ## <translate><!--T:13--> Rebuild changed node graphs</translate> | ||
# <translate>Run destructions</translate> | ## <translate><!--T:14--> Run events</translate> | ||
# <translate>Run a 2nd round of ProtoFlux change events</translate> | ## <translate><!--T:15--> Run update events (only during a full update cycle)</translate> | ||
# <translate>Pose the user</translate> | ## <translate><!--T:16--> Process [[ContinuouslyChanging|continuous changes]]</translate> | ||
# <translate>Update audio system</translate> | ## <translate><!--T:17--> Run a 1st round of discrete change events</translate> | ||
# <translate>Update particle system</translate> | # <translate><!--T:18--> Run worker change events</translate> | ||
# <translate>Run connectors (e.g. Unity)</translate> | # <translate><!--T:19--> Run destructions</translate> | ||
# <translate>Validate permissions</translate> | # <translate><!--T:20--> Run a 2nd round of ProtoFlux discrete change events</translate> | ||
# <translate>Run synchronous actions</translate> | # <translate><!--T:21--> Pose the user</translate> | ||
# <translate><!--T:22--> Update audio system</translate> | |||
# <translate><!--T:23--> Update particle system</translate> | |||
# <translate><!--T:24--> Run connectors (e.g. Unity) (only during a full update cycle)</translate> | |||
# <translate><!--T:25--> Validate permissions</translate> | |||
# <translate><!--T:26--> Run synchronous actions</translate> |
Latest revision as of 23:36, 3 July 2025
In FrooxEngine, an update refers to execution of the main engine loop. During an update, physics are calculated, synchronization packets are sent, permissions are re-evaluated, and many other events and checks are performed. An update comprises both engine events and the update loop in a world. Every user in a session has their own local update time, or the time that it takes to step through an update. This value can be received with the Delta Time ProtoFlux node.
As of the time of writing, the time to perform an engine update is limited by the framerate of the Unity renderer. This may change with the implementation of inter-process communication and eventual switch to a new rendering engine.
World update loop
Every world that is open will refresh as part of the update loop. If the client is focused on a world or if the host is a headless without autosleep, it will run a full update cycle. Otherwise, it will run a partial update cycle.
The general world update loop is sequential and runs as follows:
- Update stream values
- Calculate physics (only during a full update cycle)
- Run world events
- Handle input (only during a full update cycle)
- Perform worker updates
- Run most ProtoFlux
- Rebuild changed node graphs
- Run events
- Run update events (only during a full update cycle)
- Process continuous changes
- Run a 1st round of discrete change events
- Run worker change events
- Run destructions
- Run a 2nd round of ProtoFlux discrete change events
- Pose the user
- Update audio system
- Update particle system
- Run connectors (e.g. Unity) (only during a full update cycle)
- Validate permissions
- Run synchronous actions