Image:
 Author: Xray Group: Default Filesize: 56.9 kB Date added: 2014-02-15 Rating: 5 Downloads: 509 Views: 443 Comments: 4 Ratings: 1 Times favored: 0 Made with: Algodoo v2.1.0 Tags:
|
This scene is only useful for those users who write Thyme script.
Ever since the two scripting properties, "postStep" and "update" were added to Algodoo, I never really understood the difference between them. So, I decided to run some benchmark tests to find out about their timing behavior. I learned that the rate at which script is executed in postStep is highly dependent on the simulation frequency (sim.frequency) value. The rate at which script is executed in update is fixed at the display frame rate of 60Hz.
Therefore, when the simulation frequency is set to 60Hz, the script in each property will execute at the same rate (within +/- 2 counts). When the simulation frequency is lower or higher than 60Hz, then the execution rate difference between the two will correspond to the difference between the simulation frequency and 60Hz.
This knowledge is important especially when writing script that is very dependent on the speed of execution.
Please comment with questions or corrections, or just tell me if you believe this is useful or not. |
Last edited at 2014/02/15 06:29:09 by Xray
Please log in to rate this scene
|