Friday, May 13, 2011

Data-Driven Me Crazy

Well, as it turns out, three of the problems I mentioned in my previous post all shared the same root cause:  I was not handling the message correctly!  I designed my system so that all data packets have a type field that tells the queue processor how to handle them.  For the asteroids, I had forgotten to specify the message type as ASTEROID_INIT.  Without this identifier, the message was being handled like a TURN message that was owned by the host.  And THAT, my friends, is why Ship 1 was facing down the Z axis:  it was getting the asteroid's rotation values.

So now the only problem I have to solve before moving on to the lobby is to figure out why the game is throwing an exception when transitioning to the next screen.

On to the next challenge!

No comments:

Post a Comment