Sign in to follow this  
parasolstars

Stupid mistake of the day

Recommended Posts

Was doing some simple physics simulation. Ie., plane is supposed to rotate smoothly from one orientation to another. But my simulation was never smooth; keeps on going straight to the destination orientation once a key is pressed. From extensive debugging, all numbers are correct. It wasn't till hours later I realized the problem: My radeon x1800 video card is too fast for a <50 triangles simulation running at 300 x 300 resolution. I was getting perhaps several thousand frames a second; of course can't see the frames between start and end orientation. Things now work fine once implementing speed control. Ahh, I want to kick myself.

Share this post


Link to post
Share on other sites
NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER etc. EVER use not time-based rendering. I hate it.

Share this post


Link to post
Share on other sites
There's nothing wrong with fixed-timestep physics simulations; you just need to be careful about when you run updates. (Hint: If your timestep is 10ms and your frames are taking 5ms each, you don't want to run one physics update every frame).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this