Game Timing ..

BlitzMax Forums/BlitzMax Programming/Game Timing ..

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I don't know how you managed it in the past,
but I always take the time the program needs to run the main loop and save it in a variable (everytime the mainloop is passed).
Then I divide this number with the time it takes on my computer and save this in the variable "speed".
Now you can multiplicate any routine where it is needed with this speed.
For exampe: xpos = xpos + (1*speed)

If you don't understand this way of programming it because of my bad English send me an e-mail to
Lukasha@...