in french:Il n'est pas bon dans un jeu de limiter le nombre d'images par seconde.
Par exemple, une limite de 60 fps sur un écran 100Hz donne une animation moins fluide.
C'est pourquoi nous utilisons un deltaTime. Mais pour cela, le VSYNC avec la carte vidéo doit être activé.
Ca marche dans glfw avec glfwSwapInterval (1), mais pas dans glbasic apparemment.
Ce deuxième code fonctionne mieux, mais ce n'est pas encore parfait

(car je pense que le vsync n'est pas activé dans glbasic)
in english:It's not good in a game to limit the number of frames per second.
For example, a limit of 60 fps on a 100Hz monitor gives a less fluid animation.
That is why we use a deltatime. But for that, the VSYNC with the video card must be enabled.
That is works in glfw with glfwSwapInterval(1) but not in glbasic apparently.
This second code works better, but it's not perfect yet

(because i think the vsync is not enabled in glbasic)
WideScroller("Media/test.txt")
FUNCTION WideScroller: filename$
LOCAL text$[], a$, maxline, z, dz, dx, y, fx, fy
DIM text$[256]
GETFONTSIZE fx, fy
fy=fy+8
FOR i=0 TO 255
GETFILE filename$, i, a$
IF a$="NO_FILE" THEN RETURN
IF a$="NO_DATA" THEN GOTO skip
text$[i]=a$
maxline=maxline+1
NEXT
skip:
zt0=-maxline*fy
zt1=480
LIMITFPS -1
ctime = ftime = GETTIMERALL() * 0.001
fps1 = fps2 = 0
ltime = 0
WHILE KEY(57)=FALSE AND KEY(28)=FALSE
ctime=GETTIMERALL() * 0.001
dtime=ctime-ftime
ftime=ctime
fps2=fps2+1
IF ctime - ltime > 1
ltime = ctime;
fps1 = fps2;
fps2 = 0;
ENDIF
zt1=zt1-(50*dtime)
FOR z=0 TO maxline-1
dz=z*20+zt1
dx=(640-LEN(text$[z])*fx)/2
IF dz<480 AND dz>-20 THEN PRINT text$[z], dx, dz
NEXT
PRINT "FPS: "+INTEGER(fps1), 100, 100
SHOWSCREEN
IF zt1<=zt0 THEN zt1=480
WEND
ENDFUNCTION