how to sync stuff online??

Started by Disastorm, August 19, 2008, 05:52:01 AM

Previous topic - Next topic

Disastorm

Hi i'm making a program for fun, this engine is awesome.  How can I sync two players together online?
Right now I have it so the client sends the other client the keypresses every 50 ms to simulate as if they were playing locally, but that still resulted in quite a bit desync so then i made it so they send that and also the translation matrix every 100 ms which now has no position desync, but when i try to send the rotation matrix so theres no rotation desync , it works but for some reason the other players model looks 2d instead of 3d (very strange.. it becomes flat..), while your model still looks 3d.  How can i get around this, or possibly is there a better method other than sending the matrices?

EgonOlsen

Sounds strange. How are you transfering/setting the rotation matrix extacly (a small code snippet would help). I'm doing something similar in my game. If done right, it works quite well.

Disastorm

#2
thnx i fixed it, i had a typo in my code.
i had:
                        matrix.set(2, 0, nine);
                        matrix.set(2, 3, ten);
                        matrix.set(2, 3, eleven);
                        matrix.set(2, 3, twelve);
                       
instead of
                        matrix.set(2, 0, nine);
                        matrix.set(2, 1, ten);
                        matrix.set(2, 2, eleven);
                        matrix.set(2, 3, twelve);