Ok, i've done a lot of reading, here and on google, about networking. I've even went and coded most of it in TCP, but there are a few problems and i have to rewrite it from scrratch so i need to start over the right way.
Ok, my game is a platformer, and as i was reading UDP was reccomened for this type of game. My only question is.... what data do i send/don't send?
Thats an over simplification. Is this an Internet or LAN game? Over LAN TCP is fine. Over Internet TCP *may* be fine too depending on your game. if this is a traditional twitch platformer then no matter which way you go you have major latency issues to overcome over the net,.
Should i send keypresses to the server and let the server handle it?
You *might* just get away with this on a LAN, maybe. Yould never get away with it on the net. In general for latency reasons you want to handle player response locally. If you need to do cheat-checking then Id run a parallel game on the server that "double checks" the results. (or let other players double check ech other is is more typical for a lock-step type game.
I believe Kev Glass just completed an internet lockstep based RPG that would have similar characteristics. He might be willing to share his techniques (or even some code) with you.
Then i read you want to send last position and velocity etc, incase of packet loss and out of order packets.
This is only for open loop asynchronous games. It sounds to me like youve got a lock-step design.
I'm not really sure how to keep the players synced on everyones screen,
You don't. Open loop games show only an approximation of the other players' actions.
and then what if keypresses dont make it? Then what? The biggest problem would be shooting....
Every game has *some* critical data. You either need to send this by TCP or effectively re-invent TCP on top of your UDP with redundancy and re-trasmit frames.