Tuesday, February 14, 2012

A little update (but very exciting)

Client getting current round time from server
     After fixing the timeout bug, I went on to create the sendSnapshot portion of the server. It essentially takes a "snapshot" of the world on the server and sends that to all of the currently connected clients. Right now, every tick it takes a snapshot of the whole world and sends it. However, in the future, I am going to try and stay true to that Valve paper and add delta compression to the data being sent. I would need to keep track of where each client is and only send the data that has changed since the last tick and not everything, all the time.
     The screenshot on the right shows proof that the sendSnapshot code is actually working. The round time is sent during each snapshot and the client is correctly receiving it. Hopefully now that I have the correct structure down, adding other data to the game to send back and forth won't be that hard. I don't foresee it being much of an issue. The issue is figuring out what exactly to do with the data once it gets to the client.
     Coding a game isn't an easy task; finding and remembering all of the little things that can sometimes slip your mind. For instance, I have to remember that if the server clears out before a round is over, then I have to not allow the next round to start. That means I have to check for players existence each round. That isn't very hard, but I just have to remember it, and it's one of those things that can seem to just slip out of your mind.
     Now if I could only find another C++ programmer . . .

-Dave

No comments:

Post a Comment