Yep, seems like the "ticks" variable is set but not used at all.
Here's how to fix it;
Get rid of all traces of that ticks variable, and the oldtime one too.
Change all the movement variables to floating point (double or single).
then change the main loop to look like this;
DIM SHARED AS DOUBLE GADD,SPEED
SPEED=2
GADD=0
DIM SHARED AS DOUBLE OLD,NEW,DV
DO
OLD=TIMER:' Look at the internal timer
GADD=GADD+(DV*SPEED):' Delta movement factor
Clearscreen():' Clear The Screen.
stars()
SINE()
MESSAGE():' Do Scroller.
Ptc_Update @Buffer(0):' Update The Buffer.
NEW = (TIMER-OLD)+.001:' Get elapsed time
DV=NEW*75:' Scale it to something useful
LOOP UNTIL INKEY$ = CHR$(27)
Now you can use the variables GADD as a variable that increases over time (useful for sine waves etc) and also DV to add to scroll texts, stars etc..
What that will do is to see how long the last frame took to draw and calculate a movement factor based on that. It's what I use (rbz will tell you to use queryperformancecounter), it's not the most complicated or accurate way but it will work well.
One tip, make sure that you change movement variables to floating point.. If you use integers it won't work. Also when you come to draw things back to the screen buffer, convert the doubles to integers or the mantissa will give your computer indigestion.