Advertisement

I could really use some help here...

Started by August 13, 2000 07:58 AM
2 comments, last by Mike 24 years, 4 months ago
I cannot figure out how in the world to make the movement smooth. I''m simply locking the frame rate to 30 fps. Please take a glance at the shource code (get it here) and let me know what the problem might be. Please not that a friend and I put this together in only one day and we don''t really know what we are doing. thakns, Mike
I''m not much of an expert but I looked at your code. I''ve never seen anybody delay the loop like that so I don''t know if that works or not. Typically what I do is take the time that has passed since the last frame and use that as a multiplier against how far to move the objects.
A simple example would be something to the effect of:
ObjPos = ObjPos + (ObjRate * TimeElapsed);

Hope this helps... Balrin
Advertisement
Yeah, Barlin''s right, don''t lock the frame rate.
The animation looses it''s smoothness when locking the frame rate.



The road to success is always under construction
Goblineye EntertainmentThe road to success is always under construction
After soome work I found out that for some reason my ClearBuffer functions absolutely kills my frame rate. I don''t know why but it does.

I''ve never locked the frame rate before either, but a friend and I wanted to get a running game done (starting from nothing) in just one night. Locking the frame rate was the fastested and easiest way to ensure that the performance would be the same accross all machines.

Thanks for the help

This topic is closed to new replies.

Advertisement