? VSYNC and WAIT ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Space-Restriction Challenge QSP Phase Ends on March 26!

VSYNC and WAIT

Contrary to popular belief, VSYNC and WAIT do not have the same functions in SmileBASIC. This is because of how they work. How they work can affect performances on different systems. How is exactly VSYNC different to WAIT, you ask? First, let’s talk about how the presence of Vertical-Sync in other media. Games, especially PC games, usually have the option to enable VSYNC. What this does is have the game wait for the monitor’s refresh rate, eliminating things like screen tears. This is exactly what happens on a 3DS when VSYNC is used. WAIT waits for a specific time given by SmileBASIC based on the command instead of the 3DS. This means that using WAIT would provide a similar experience among devices running SmileBASIC. However, since VSYNC uses the 3DS’s refresh rate, as I explained earlier, performance can be different among devices based on how the refresh rate is performing. Basically, my best advice that if you’re looking to make a simple, maybe text program, use WAIT as a refresh system, and when you want to make a bigger project that you want to have work as fast as your device can allow, use VSYNC. Do NOT use VSYNC for an intentional wait (for example, a pause before a title screen), as this is what WAIT is really for. Using VSYNC can randomize when things happen, and if you’re trying to make a game that does certain things at specific times, this can screw things up. Performance does not really vary that much between the two, so don’t interpret what I’m saying as that. But they do work differently, as I mentioned before.
Author
HTV04
Updated
Rating
2 votes
Categories
Keywords
  • vsync
  • wait
  • and
  • difference
0 Comment(s)