Restored from previous forum. Originally posted by iRoNiC.
I want to make a 50FPS FullScreen scrolling with a SpriteScreen.
But, the scrolling is very bad, i don't know why !!
I use the GetTickCount_() to check the time and to wait 20ms between two FlipBuffers()
But, i dont know why, it's so bad !!
;*****************************************
vitesse=8
InitSprite()
InitKeyboard()
OpenScreen(640,480,16,"Scroll")
CreateSprite(10,640+2*vitesse,480)
SetRefreshRate(85) ; ==> 85Hz Screen, if monitor can !!
limit = 1000/50 ; ==> Set to 50 FPS (20ms)
Repeat
timer = GetTickCount_() ; take time
ExamineKeyboard()
ClearScreen(0,0,0)
StartDrawing(SpriteOutput(10))
Plot (639+vitesse,Random(479),RGB(255,255,255))
StopDrawing()
UseBuffer(10)
ClipSprite(10,vitesse,0,640+vitesse,480)
DisplaySprite (10,0,0)
UseBuffer(-1)
DisplaySprite (10,0,0)
; wait 20ms
Repeat:Until GetTickCount_()>=timer+limit
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
;*****************************************
iRoNiC
Basic Coder
50FPS scrolling with 85Hz Screen Monitor
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by iRoNiC.
There's a probleme for me, and on some other computers.
I can use SetFrameRate(50) but i would like to know why the stars are *2 or *3 on the screen and why the scrolling is so bad !
I made this on other basic and work fine, not here !
Anyone can tell me why ?
iRoNiC (French Coder)
Basic Coder
There's a probleme for me, and on some other computers.
I can use SetFrameRate(50) but i would like to know why the stars are *2 or *3 on the screen and why the scrolling is so bad !
I made this on other basic and work fine, not here !
Anyone can tell me why ?
iRoNiC (French Coder)
Basic Coder