Game Development Community

Game Clock / Timer

by Tim Heldna · in Torque Game Engine · 02/22/2006 (9:06 am) · 2 replies

Reaching out for a little assistance with this one...

I want a game timer display that gets synced for all players across a network!

I know there's a game timer in game.cs which you can set a time limit on for ending the round. As far as I know this is synced for all players on a network. Unfortunately this timer isn't displayed in the gui anywhere.

I know 1.4 has a new clock gui which (I think) goes off the game timer yet this gui doesn't update when a new player joins.

All I want to do is set a 10 minute time limit for the round, display this time limit as a gui component on each players computer and have it all in sync for every player regardless of when they join.

Can someone nudge me in the right direction?

#1
02/22/2006 (9:31 am)
@Tim, in common\server\clientConnection.cs there is a function called syncClock, which calls clientCmdSyncClock in client\script\client.cs. in the starter.fps the client function is blank. I searched for the function and you can find a good example of it being used in the same manner as you want in the demo directory. Look in demo\server\script.fps.cs for GameConnection::onClientEnterGame, and demo\client\scripts\client.cs for clientCmdSyncClock. That should take care of your needs.
#2
02/22/2006 (9:42 am)
Thanks Mick!!!