Game Development Community

Race game synchronization

by Fabio Daniel "Sagaz" · in Technical Issues · 08/30/2005 (10:53 am) · 1 replies

Hi there!

We at Ludorama are developing a race car game, but we're having serious problems with the race start. Just like any FPS, the Race game Starter kit works in a way that any player can join a hosted game at any time. In our game we're needing to synch all players, so they all start the count and the race at the same time (just like other race games as NFS Porsche or NFS Underground). We're trying almost everything to make it possible, but in the most of cases or the race don't start, or the game crashes and goes back to Windows. Does anyone knows how to make all players wait for each other until the last one is ready, in order to make them start together? Thanks in advance.

#1
08/31/2005 (4:26 pm)
Fabio,

I have a racing game and here is how I do it. I have each player(client) send a message back using the 'CommandToServer()' when they are ready. The server waits until all the players/clients send this message and then starts the countdown. The server then sends a message to all the clients 'CommandToClient()' telling them to start the race. I had problems with this too especially with a mix of faster and slower computers. Hope this helps.

Brian