Original Post
Hi, I''m writing a 2D arkanoid type game, and I''ve got most aspects working so far... I have correct collision between my ball and paddle, etc., but I''m having some timing issues...
Can someone please tell me where I can find a really good timing tutorial as it relates to game programming, because at the moment I''ve adapted code from here at gamedev to achieve framerate-independent movement... but it complicates collisions, etc. (because I don''t know exactly where the ball is going to be next frame). Also, I''m not sure on how often I should be doing collision and other logic checks, because if I just check at 60 times per second (which I can do), but with a framerate of 500, the ball seems to collide (and change direction) quite long before it hits the paddle...
I''m struggling to understand the importance of a tick (e.g my game runs at 60 ticks per second, but there''s nothing I can do that runs smoothly at 60 fps, all my logic and display routines are running at at least 140 fps on my machine, and over 100 on a friend''s). Are ticks still important for today''s games when games can run in the 100''s of fps?
Also, with the framerate independent movement code, a slight change in framerate causes the ball to lag a little, and I''d like to fix that too while i''m at it
Thanks in advance
$£¥
We scratch our eternal itch
A twentieth century bitch
We are grateful for
Our Iron Lung