> Click a Lag Cell to reproduce it NOTE: The lower the FPS, the shorter the difference between being with the Turbo Mode ON or OFF, therefore, Turbo Mode detection WILL NOT WORK in extreme low FPS cases!
CREDITS TO: eric_romansacrifice > I took the idea of creating a lag button from his project: > https://scratch.mit.edu/projects/11506643 In this project I'm attempting to create a FPS meter and a Turbo Mode detector without resetting the project's timer. This FPS meter has two components: > Estimated FPS: Which is based on how much time the project takes to refresh the screen, using the scratch timer to calculate it. > Last FPS meter which is based on a variable (FI) that is incremented by 1 whenever the screen is refreshed, this one instead of being based on the scratch timer (which is a little bit unreliable when Turbo Mode is ON) is based on the computer time (seconds). I found that when an instruction [ broadcast ** and wait ] is used in a script, that script will only continue when all usages of the emitted event have been executed AND, if a listener exists, the screen refreshes at least once! Knowing that, I've created an event called "Wait Screen Refresh" (emitted and received by the Stage) to measure the FPS. I've also created a Turbo Mode detector (TM?), based on the incremented variable (FI), which is more reliable than the Estimated FPS, since it uses the computer time. The (TM?) variable is updated to 1 (if the Turbo Mode is ON) or 0 (if the Turbo Mode is OFF) after a computer second There are 2 sprites in this project, "Cat" and "Lag Cell". While the Cat is constantly saying how much FPS you have at the moment, the Lag Cell clones itself when clicked and her job is to slow down the project. Have Fun :)