I am writing a 2d multiplayer football game. There are two clients in the game. I send the clients information of which keys to press. For Example; VbKeyLeft,VbKeyUp etc. (I dont use server. Because, this method is very slow.Firstly i tried this method. I sent all the information to server and simulated the game. after i sent the coordinates to the clients. I gave up this method. )
My problem is that one of the clients works 50 fps and the other works 75 fps. Therefore, in the first computer the footballer moves 50*footballer_speed per second, in the second computer the footballer moves 75*footballer_speed per second.
I fix the fps to 50. But this doesnt work, because fps sometimes drops to 30~40 then up to 50 again. And at this moment, one of the footballers remains behind the other.
How can i solve this synchronisation problem between two players?
I hope i could tell my problem.
please help me.
PS: I use winsock.ocx, vb6, directx7, bltfast.