crazy2be/buildshoot — pull request #36 by crazy2be (2013-03-25 02:06:45+00:00)
Title: Server cleanup

I rewrote/restructured a bunch of the server to prepare for doing simulations on the server.

Things included in this diff:
- Player has been renamed to Client- once we have simulation on the server, we will want to deal with Players in said simulation. Clients better describe what they are anyway.
- The message processing layer on the server-side has been totally redone. The old solution had no static typing at all, and was basically just a bunch of type assertions all over the place (standard in JavaScript, but we can do better in go!).
- As part of the changes to message handling, all message fields have been changed to uppercase, and many of the internal structs have also been changed to uppercase. This looks kinda ugly now (doing .X, ,Y, ,Z), but I'm sure we'll get used to it. It makes the code much cleaner (no need to manually convert to JSON or have struct tags).
- We should probably change the messages JavaScript sends to go in order to reflect this convention, but I haven't done it yet.

Those two changes account for the majority of the diff.

Oh, and I added client-side hitboxes and shot detection, but it's not really useful until we have it on the server (which is why all this cleanup happened).

I'm sending this pull request now, because this accounts for the most major changes to the server which will affect chat, and the changes are reasonable stable, so why not (+reduce our branch count by one!)

Sorry for the messy diff. A lot happened, some of these changes are from last week. I'll try to keep the diffs smaller and cleaner in the future.

Comments/concerns/suggestions?