Advertisement

Multiplayer racing results problem

Started by June 20, 2006 06:47 PM
0 comments, last by GameDev.net 18 years, 8 months ago
I'm developing multiplayer mode to a racing game, and I've run into a problem with the results of the race. The results system works the way that when a player finishes the race, the game sends a message with the race time to all the other network players. When testing the multiplayer mode with my friend over the Internet, I've noticed that when I cross the finish line relatively close behind my friend, the results are not right. I should be second, but for some reason, I'm first! My friend's race time has been 500-700 ms longer than mine, and he has a lot faster computer than I have. I think the race time error is caused by the timing inaccuracies (time measured on two computers) but I don't know what to do to them. I'm using timeGetTime for timing, and timeBeginPeriod-timeEndPeriod pair is used with a value of 1. The frame rate is limited to 60 fps. I should also mention that I've been the host, and I haven't tested the other way (my friend being the host). What would be the best solution to this problem?

This topic is closed to new replies.

Advertisement