Author Topic: how to sync stuff online??  (Read 2199 times)

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
how to sync stuff online??
« on: August 19, 2008, 05:52:01 am »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12011
    • View Profile
    • http://www.jpct.net
Re: how to sync stuff online??
« Reply #1 on: August 19, 2008, 10:06:19 pm »
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.

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: how to sync stuff online??
« Reply #2 on: August 20, 2008, 04:19:34 am »
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);
« Last Edit: August 20, 2008, 04:28:59 am by Disastorm »