Hehe Alistair helped me with this.
This is what I did..
Using the timer that comes with Omega (dunno if its out for public yet though) at http://www.blueworldtech.com/ds/ , and before I was using DXTimer .. so either will do.. make sure their interval is set to 0 (yes zero)
[pascal]
const
OneMSec: Real = 1/1000;
PixelSpeed: real = (5/Tiles.W); //Speed of player (in tiles)
[/pascal]
then you declare
[pascal]
OldTime: real;
[/pascal]
in your global variables
then in your timer to get the speed of the object you do
[pascal]
NewTime:=TimeGetTime;
Speed:=(NewTime-OldTime)*OneMSec;
Speed:=Speed*Tiles.W*PixelSpeed;
OldTime:=NewTime;
[/pascal]
Bookmarks