   Platform action shooter, what's the best data to send?
  So I took Networking class which really helped me understand how to work with UDP and TCP and flow control and all the other stuff that goes along.I've also been reading articles like this to help write my low level network drivers for the game engine I'm making.http://gafferongames.com/networking-for-game-programmers/reliability-and-flow-control/I've read all the other network articles by that guy and wish he would update the series since it's been a while.  A lot of really good info there that cleared up my confusion of what the best way to do things would be.Also read this, a description of the Unreal network structure: http://unreal.epicgames.com/Network.htmBasically now I'm wondering what kind of data is best to send when creating a fast paced platform action game.  It'll be similar to Soldat where you are a dude running around and jumping with WASD controls and aim with the mouse.  I've been mostly reading articles like how FPSes do it like Counterstrike since I think a lot of that still applies even to my 2D game.I've seen games with awful netcode like Halo for PC which even at like 100 ping already feels very wrong.  Then there are all the other games like everything made by Valve, Call of Duty, and so forth, that manage to feel right even at high pings like 200.I'd like to know exactly how games like Quake 3, Counterstrike, and so forth send all their data.  I've read summaries but I'm always left wondering how that can actually work.So at the moment I'm thinking something like this would work and there are probably details that can be shaved off:Client sends the control state to the server.  It would be a 32 bit number or how ever many bits I need to represent all the control states.  Like bit 0 is whether or not the left key is pressed.  Between each packet sent to the server, it would queue up the control states and send the final mix of all the states.  The thing I'm confused about though is what if the player presses move left and move right all within like 10 milliseconds of each other.  This would queue up both the move left and move right command and although the client moved left and right, the server thinks the player pressed both buttons at once and not move at all or something.  Also there's the issue of sending the aiming direction.  That would require another int of some sort.  I'm not sure if I should send the current aiming direction at the time the packet is sent to the server, or if I should also queue up the aiming directions some how.  Or maybe send the current aiming direction and the rate of change of the aiming so the server can predict where the player will be aiming by the time the packet arrives.  Basically these would be the controls: Move Left, Move Right, Jump, Release Jump(it's own control state for when the player releases jump so it can make you jump higher the longer you hold jump), Crouch, Fire Weapon, Use Key, Switch to Weapon 1, Switch to Weapon 2... all up until Switch to Weapon 7.This is what the server would send back to each client for every player (It would only send relevant data back on stuff that is visible to the client not the entire level state, which is very easy in 2D since I just send stuff around the view):X,Y coordinates.  Velocity.  Control state including aiming direction. Current frame displayed for the various body part animations.(Arms firing the weapons will be animated separately from the legs moving).Then there are other things like projectiles being fired and items being collected and blown away by explosions and stuff.   