? VSYNC versus WAIT ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

VSYNC versus WAIT

Hey. Stop. Use VSYNC instead of WAIT 1 for your loop. Here's why.

WAIT X

• Waits X/60 seconds

Is affected by any variance in loop execution time. This means that if you had to move 100 sprites individually, the loop would be slower than when you are handling 1 sprite. Also, New consoles run about 4x faster than their Old counterparts, meaning you would see a speed gap between the two.

VSYNC X

• Waits until the [next+(X-1)] screen refresh (happens 60 times every second)

Is not affected by variance in loop execution time until the execution time is longer than 1/60 second. VSYNC waits until a third party (3DS hardware) event, meaning that the loop's execution time does not affect the timing of VSYNC. The flaws of WAIT don't apply here. Use VSYNC to make your program run at a consistent 60fps.
Author
auceps
Updated
Rating
0 votes
Categories
Keywords
  • vsync
  • wait
2 Comment(s) snail_ snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements There are three pages about this auceps auceps now i just need to make it not the second worst