{"name":"Simulation vs Render Time Scope","title":"Simulation vs Render Time Scope","type":"topic","url":"https://community.bistudio.com/wiki/Simulation_vs_Render_Time_Scope","revid":341449,"updated":"2023-05-29T12:46:10Z","aliases":[],"markdown":"Arma 2: Operation Arrowhead v1.60 Take On Helicopters v1.00 Arma 3 v1.00\n\n### Definitions\n\n#### Simulation Time Scope\n\n**Simulation Time Scope** is working with the **calculated** position of objects.\n\n- It is updated on a lower frequency than the **rendered** position in order to save performance. [*citation needed*]\n- Refresh frequency is lowered the further the object is from the camera. [*citation needed*]\n\n#### Render Time Scope\n\n**Render Time Scope** is working with the **visual** position of objects, which is rendered (*estimated*) separately from the calculated one.\n\n- It is updated on a very high frequency (presumably on each frame). [*citation needed*]\n- The object's position is interpolated depending on its speed and movement direction.\n- Due to interpolation, the position might not be accurate but it is updated frequently, resulting in a smooth motion.\n- Usually, render time scope scripting commands should be used when something is visible to the player, such as UI or on-model precision.\n\n### Simulation vs Render\n\nFor performance concerns, **Simulation** and **Render** cycles are separated **since Arma 2: Operation Arrowhead v1.60**.\nThis means that any object has now \"two\" positions: the computed one (simulation), and the visual one (render).\n\n- For visual (e.g HUD-related) operations, use the render time scope scripting commands (e.g getPosATLVisual)\n- \"Normal\" commands (e.g getPosATL) are to be used if the position is not updated frequently and the effect is not visible to players.\n\n<youtube height=\"338\" width=\"600\"> 6xUw0K292sw\n</youtube>\n\n[Video Showcase](https://www.youtube.com/watch?v=6xUw0K292sw)\n\n### Before Simulation and Render Separation\n\nFrom Operation Flashpoint to Arma 2: Operation Arrowhead v1.59, the **simulation** first updated the world's state (units position) *then* the visual **rendering** was done.\nSequencing these operations worked fine only in non-intensive scenarios; as soon as the CPU reached its limits, the simulation frequency was lowered in order to maintain acceptable FPS, resulting in units visually \"jumping\".\n\n### See Also\n\n- [Experimental betas - Interpolating the future](https://www.bohemia.net/blog/experimental-betas-interpolating-the-future) blog article\n- [Sniperwolf572 forum post](https://forums.bohemia.net/forums/topic/151099-scripting-discussion-dev-branch/?page=21&tab=comments#comment-2720342) explanation\n- [Grumpy Old Man](https://forums.bohemia.net/profile/832107-grumpy-old-man/)'s [Video Showcase](https://www.youtube.com/watch?v=6xUw0K292sw)","sections":[{"heading":null,"level":1,"markdown":"Arma 2: Operation Arrowhead v1.60 Take On Helicopters v1.00 Arma 3 v1.00"},{"heading":"Definitions","level":3,"markdown":""},{"heading":"Simulation Time Scope","level":4,"markdown":"**Simulation Time Scope** is working with the **calculated** position of objects.\n\n- It is updated on a lower frequency than the **rendered** position in order to save performance. [*citation needed*]\n- Refresh frequency is lowered the further the object is from the camera. [*citation needed*]"},{"heading":"Render Time Scope","level":4,"markdown":"**Render Time Scope** is working with the **visual** position of objects, which is rendered (*estimated*) separately from the calculated one.\n\n- It is updated on a very high frequency (presumably on each frame). [*citation needed*]\n- The object's position is interpolated depending on its speed and movement direction.\n- Due to interpolation, the position might not be accurate but it is updated frequently, resulting in a smooth motion.\n- Usually, render time scope scripting commands should be used when something is visible to the player, such as UI or on-model precision."},{"heading":"Simulation vs Render","level":3,"markdown":"For performance concerns, **Simulation** and **Render** cycles are separated **since Arma 2: Operation Arrowhead v1.60**.\nThis means that any object has now \"two\" positions: the computed one (simulation), and the visual one (render).\n\n- For visual (e.g HUD-related) operations, use the render time scope scripting commands (e.g getPosATLVisual)\n- \"Normal\" commands (e.g getPosATL) are to be used if the position is not updated frequently and the effect is not visible to players.\n\n<youtube height=\"338\" width=\"600\"> 6xUw0K292sw\n</youtube>\n\n[Video Showcase](https://www.youtube.com/watch?v=6xUw0K292sw)"},{"heading":"Before Simulation and Render Separation","level":3,"markdown":"From Operation Flashpoint to Arma 2: Operation Arrowhead v1.59, the **simulation** first updated the world's state (units position) *then* the visual **rendering** was done.\nSequencing these operations worked fine only in non-intensive scenarios; as soon as the CPU reached its limits, the simulation frequency was lowered in order to maintain acceptable FPS, resulting in units visually \"jumping\"."},{"heading":"See Also","level":3,"markdown":"- [Experimental betas - Interpolating the future](https://www.bohemia.net/blog/experimental-betas-interpolating-the-future) blog article\n- [Sniperwolf572 forum post](https://forums.bohemia.net/forums/topic/151099-scripting-discussion-dev-branch/?page=21&tab=comments#comment-2720342) explanation\n- [Grumpy Old Man](https://forums.bohemia.net/profile/832107-grumpy-old-man/)'s [Video Showcase](https://www.youtube.com/watch?v=6xUw0K292sw)"}],"categories":["Introduced with Arma 2: Operation Arrowhead version 1.60","Scripting Topics"],"groups":["Scripting"]}