Hi,
Instead of putting things into a timer, you could place the code into a game loop. After you load things up you'd want to enter the game loop
thats what you pretty much follow for a game loop, you just keep doing things over and over until its done, and forgive me if some of the syntax is wrong, I cut it out from C++ and tried to convert most of it, not sure if I did the loops right.Code:sub GameLoop() dim RUNNING as boolean RUNNING = true ' when it equals false, the game is over do RUNNING = Input() ' get user input, I have it so if they press escape the game quits Blt() ' draw stuff onto the screen Wait(TimeBetween frames) ' here you can determine how much time you want the system to wait, its somewhat like a timer while(RUNNING) Cleanup() ' cleanup phase if you use DirectDraw ' then you can quit the game now or play again end sub Private Declare Function GetTickCount& Lib "kernel32" () function Wait(int Time) dim tb as long, tn as long tb=GetTickCount() do tn = GetTickCount() while(abs(tn-tb)<Time) end function
Hope that helps




Reply With Quote