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

Thursday, February 9, 2012

Where we are

     My computer had a hardware malfunction last week, as in, my onboard sound died. I had to order a sound card in order to have any sound again. So while waiting for that, and on top of school work, the past week has been hard to get any game work done. However, I have started  up again, going through the code and making the code more readable and organized with comments, etc. So far, everything looks much more professional and readable, which is a good thing.
     Now it's time to fix that bug that I mentioned last time. Eric and I narrowed it down to a very specific test case, and so we at least no what triggers the bug. That said, it's very confusing because in the code that triggers the bug right now, does a very simple task and "shouldn't" effect anything else. In the world of programming though, that means nothing, so I'm going to tear that code apart until I find this bug.
      After that, it will be sending player movement back and forth, just so we can see each other and feel that we are moving forward. I'm motivated to find this bug, because it is super annoying and frustrating. But, after I find it and get everything working, it's only up from here.

Dave