Advertisement

Half-frames to get more fps?

Started by February 03, 2000 01:01 PM
0 comments, last by Hans 24 years, 10 months ago
Typically an object movement is done like this: x_position+=x_speed_vector_component; y_position+=y_speed_vector_component; z_position+=z_speed_vector_component; z_speed_vector_component+=gravity; But now I only get for example, 60 fps maximum. However, in quake I can get 200 fps or even more. Should I always multiply those movement-things with some frame-multiplier? x_position+=x_speed_vector_component*frame_length; y_position+=y_speed_vector_component*frame_length; z_position+=z_speed_vector_component*frame_length; z_speed_vector_component+=gravity*frame_length; But doesn''t this affect in movement (f.e. gravity adding is now done more often/rarely) -Hans
Hmmm!

I'm not sure I understood your question right but...

What I would do is get the time to render/make AI/pathfinding etc and multiply this to the movement (units) per second.

Like:

float time2MakeAllThingsHappen;

x_position += time2MakeAllThingsHappen * Xunitsperseconds;
y_position += time2MakeAllThingsHappen * Yunitsperseconds;

Hope that helped.

The dictionary is the only place where success comes before work.

Edited by - errand on 2/3/00 1:08:53 PM

Edited by - errand on 2/3/00 1:12:18 PM
Death is lifes way saying your fired.

This topic is closed to new replies.

Advertisement