D
Daniel
Hey guys
Here is what i want to do. I have made a multiplayer game that needs to when
more than one player is ready start a countdown that the clients can see,
so players can still join in this time frame and then after the time elapses
the game starts.
I am trying to do it lie this, my server controls all handling of the game
logic, deciding who wins, who is next to play etc. For all the players to
have their timers showing the same times i have created the timer on the
server and this time is then serialised as part of the game object that is
sent to the clients.
The idea being the clients receive that object and they will then continue
to be running the timer their end with it having started at the server
theoretically making the timers go in sync.
My problem is first of all that System.Timers objects cannot be serialised.
My second problem is i think this may be flawed, if it takes longer for data
to reach one client his timer will start slightly late etc.
Anyone have any ideas how i can do this so all players see the same timer??
Thanks
Here is what i want to do. I have made a multiplayer game that needs to when
more than one player is ready start a countdown that the clients can see,
so players can still join in this time frame and then after the time elapses
the game starts.
I am trying to do it lie this, my server controls all handling of the game
logic, deciding who wins, who is next to play etc. For all the players to
have their timers showing the same times i have created the timer on the
server and this time is then serialised as part of the game object that is
sent to the clients.
The idea being the clients receive that object and they will then continue
to be running the timer their end with it having started at the server
theoretically making the timers go in sync.
My problem is first of all that System.Timers objects cannot be serialised.
My second problem is i think this may be flawed, if it takes longer for data
to reach one client his timer will start slightly late etc.
Anyone have any ideas how i can do this so all players see the same timer??
Thanks