This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:tutorials:clocks:clock [2020/08/31 08:31 (5 years ago)] – ↷ Links adapted because of a move operation 207.46.13.245 | en:tutorials:clocks:clock [2024/04/20 14:22 (12 months ago)] (current) – Add priority level descriptions hcarty | ||
---|---|---|---|
Line 86: | Line 86: | ||
As we didn't store our first created clock ((on purpose, so as to show how to retrieve it)), we need to get it back! | As we didn't store our first created clock ((on purpose, so as to show how to retrieve it)), we need to get it back! | ||
- | <code c> | + | <code c> |
Specifying '' | Specifying '' | ||
Line 120: | Line 120: | ||
This can be used in the exact same way to slow down monsters while the player will still move as the same pace, for example. | This can be used in the exact same way to slow down monsters while the player will still move as the same pace, for example. | ||
There are other clock modifiers type but they' | There are other clock modifiers type but they' | ||
+ | |||
+ | ===== Priority ===== | ||
+ | |||
+ | When setting up clock callbacks in orx, we need to specify a priority for the callback. This priority value specifies when a callback will occur during the execution within a given frame. | ||
+ | |||
+ | - Render all viewports/ | ||
+ | - Update inputs (physical polling w/ priority = HIGHER, input module w/ priority = HIGH) | ||
+ | - (Scroll only) Game Update (if no Scroll, that's where one should likely put their logic as well, ie. priority = NORMAL) | ||
+ | - Update all objects and linked structures (anim, sound, FX, etc., priority = LOW) | ||
+ | - Update the physics simulation (priority = LOWER) | ||
+ | - End the render frame, ask for presentation (priority = LOWEST) | ||
===== Resources ===== | ===== Resources ===== | ||
Line 127: | Line 138: | ||
Config file: [[https:// | Config file: [[https:// | ||
- | Video: | + | Video by acksys: {{youtube>l9GuYhbtPzw}} |