I'm new to all this stuff so was wondering if I'm doing things correctly in my main loop
Function main_loop ()
While Not keyhit(1)
Update_Game_Timers()
Get_Player_input()
Check_Sprite_to_Screen_Collision()
Check_Sprite_to_Sprite_Collision()
WaitTimer(screentimer) ; timer runs at 60Hz
Draw_Screen()
Draw_Sprites()
Wend
End Function
As you can see from the above code I have a screentimer set at 60, so the screen is redrawn at 60Hz. Is this the best way to attain smooth graphics or am I using an incorrect method ?
Function main_loop ()
While Not keyhit(1)
Update_Game_Timers()
Get_Player_input()
Check_Sprite_to_Screen_Collision()
Check_Sprite_to_Sprite_Collision()
WaitTimer(screentimer) ; timer runs at 60Hz
Draw_Screen()
Draw_Sprites()
Wend
End Function
As you can see from the above code I have a screentimer set at 60, so the screen is redrawn at 60Hz. Is this the best way to attain smooth graphics or am I using an incorrect method ?