ScratchData LogoScratchData
Back to Unlocked's profile

High-accuracy movements

UNUnlocked•Created November 7, 2017
High-accuracy movements
4
4
103 views
View on Scratch

Instructions

Read the notes and credits. tl;dr: If you want highly accurate and highly precise actions in scratch, multiply any repeated action by the time delta since the last time the action occurred rather than just using a wait block.

Description

Both cats are trying to move at 10 steps per second. The top cat uses a forever loop where it waits 0.1 seconds, moves one step, and repeats. The bottom cat uses a time delta step speed. It loops as fast as it can, and moves by a number of steps equal to 10 times the amount of time that passed since the last step. After 15 seconds, a percentage error for each cat is calculated. As you can see, the timer cat's speed (bottom) is significantly more precise and accurate than the wait cat's speed (top).

Project Details

Project ID184630922
CreatedNovember 7, 2017
Last ModifiedApril 24, 2020
SharedNovember 7, 2017
Visibilityvisible
CommentsAllowed