Making it just slower will not solve the problem that it runs slow on one machine and fast on another... you need to make game calculations framerateindependant... or is it just too fast?
Making it just slower will not solve the problem that it runs slow on one machine and fast on another... you need to make game calculations framerateindependant... or is it just too fast?
<a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>
I have made it frame rate independant but my calculations might be a bit too fast. I did test it on a very fast machine and it seemed fine as well as on a slow machine...but then again I might think it's fine as it is and someone else might think it's not.
I wanted it fast i.e. the player's left and right movement so that bombs from above can be dodged...
This is how the player will move:
Where OneMSec: Single = 100/1000;Code:dxtimer1.Interval:= 1000 div 100; NewTime := TimeGetTime; UpdateSpeed := (NewTime - OldTime) * OneMSec; OldTime := NewTime;
and
I can make all objects in my game slower by changing the value of OneMSec to maybe 70/1000 :-)Code:if (isLeft in form1.DXInput1.States) and(x>5) then X := X - (10 * UpdateSpeed);
Wake up from the dream and live your life to the full
Bookmarks