[Super-tux-devel] FPS debug
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2004-01-31 03:07:20
|
Hey, The game is producing differences in the gameplay between machines that can keep different FPS, it is even noticeable the difference in the gameplay between the GL and SDL backends. I hope this little patch can help in the debugging. Use the Q and S keys to decrease the FPS (with the --debug-mode parameter). Anyway, I've already tried to hack in the source to make Tux movements to obey to the differences in the FPS. The position of Tux is calculated by: pplayer->base.x= pplayer->base.x+ pplayer->base.xm * frame_ratio; pplayer->base.y = pplayer->base.y + pplayer->base.ym * frame_ratio; being x/y, the current position and xm/ym, the current velocity. frame_ratio is the result of get_frame_ratio(&pplayer->base); This is fine, but the velocity calculation is made by: pplayer->base.xm = pplayer->base.xm + WALK_SPEED; Shouldn't it be something like: pplayer->base.xm = pplayer->base.xm + WALK_SPEED * frame_ratio; ? Just wondering... Ricardo Cruz -- The first sign of maturity is the discovery that the volume knob also turns to the left. |