Consistent Timing

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Consistent Timing

Postby jhw22 » Mon Aug 11, 2008 4:21 pm

Hi Folks!

I've been given a racing game to maintain. It's written in C-Script, uses the the old Newton Physics Engine plug-in, and was created with 3D GameStudio version 6.60.

The idea is that a player completes an event, his or her score is stored on the server and compared to everyone else's. This works fine, except when played on different classes of hardware. I'm seeing an average difference of several seconds between the older box I develop on and a fancy new Alienware machine I've just started testing with.

The players' times are based on how many ticks have passed since the race began, not on any frame count. It appears that it just takes the slower machine longer to travel the length of the track. I'd hoped that the physics engine would have kept track of the distance traversed over time instead of per frame, so the timing would be fairly accurate.

Does anyone have any idea of what I might do to keep the game fair for players on different classes of hardware? Perhaps there's some calibration that could be done?

Thanks,
jhw22
jhw22
 
Posts: 2
Joined: Mon Aug 11, 2008 4:15 pm

Re: Consistent Timing

Postby Aphex » Tue Aug 12, 2008 8:56 am

IIRC the old Newton clamps the update time to max 1/60 of a second. Maybe the slower machine timesteps are getting clamped?
Aphex
 
Posts: 144
Joined: Fri Jun 18, 2004 6:08 am
Location: UK

Re: Consistent Timing

Postby jhw22 » Fri Sep 05, 2008 2:56 pm

Thanks! Looks like that was the problem. I ended up limiting the frame rate of the 3D engine - that seemed to do the trick.
jhw22
 
Posts: 2
Joined: Mon Aug 11, 2008 4:15 pm


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 7 guests