I agree you have to use timing code, but I don't agree that you can get perfectly smooth 2D using it.
You can get reasonably smooth 2D but you will see minor glitches enough to spoil that arcade smoothness. Timing code works perfectly for 3D as everything works with floating points and never really moves a whole number of pixels.
2D does though, so anything moving whole numbers (say the screen scrolling a 2 pixels a frame) will glitch in tweening. Barely noticable, but once you are used to true smoothness you will notice it.
This must be because the game logic has to be ready at the exact moment the monitor draws. Normally vwait pauses everything till it's ready so it will always draw at exactly the right moment.
In timing code the game logic is seperate from the drawing (though this is good practice, I agree). Chances are the logic fps is not going to divide perfectly into the number of display frames available, and about 1% of your frames will be slightly off.
Swedernik's code is about the best I've seen for 2D tweening. The game logic runs at 250fps so it's almost always ready when the frame refresh comes up.
If you run it on a 120hz display it's pretty much perfect, but of course this has the drawback of causing the GFX card twice as much work, not much use for a graphics intensive game.
I understand there's nothing can be done about it until drivers improve but I was in the mood for a rant.
You can get reasonably smooth 2D but you will see minor glitches enough to spoil that arcade smoothness. Timing code works perfectly for 3D as everything works with floating points and never really moves a whole number of pixels.
2D does though, so anything moving whole numbers (say the screen scrolling a 2 pixels a frame) will glitch in tweening. Barely noticable, but once you are used to true smoothness you will notice it.
This must be because the game logic has to be ready at the exact moment the monitor draws. Normally vwait pauses everything till it's ready so it will always draw at exactly the right moment.
In timing code the game logic is seperate from the drawing (though this is good practice, I agree). Chances are the logic fps is not going to divide perfectly into the number of display frames available, and about 1% of your frames will be slightly off.
Swedernik's code is about the best I've seen for 2D tweening. The game logic runs at 250fps so it's almost always ready when the frame refresh comes up.
If you run it on a 120hz display it's pretty much perfect, but of course this has the drawback of causing the GFX card twice as much work, not much use for a graphics intensive game.
I understand there's nothing can be done about it until drivers improve but I was in the mood for a rant.