Player Movement Over Network w/ GDX + Bullet + Kryonet?

I’m trying to find the best way to do player input in a multiplayer game… Specifically using bullet

The client and server both have dynamics worlds. Currently I have a system that breaks down bullet objects on the server and update’s its clients with the new locations every few seconds, then the clients adjust their physics objects and keeps simulating.

However I want to give players the ability to move with their keyboard and mouse but I’m not sure how to go about it.

  1. I could send a transform from the client’s dynamic world to the server and have the server broadcast to clients. This transform contains camera rotation, and translation. But this opens the game up to cheating, but I could have the servers police the players into not moving so fast but thats a bit complicated… Also the player could possibly go through the walls via hacking…

  2. From the client I could send an integer containing info on player input (mouse clicks, keyboard typed) then have the server update the physics object, then update the client’s body and broadcast it. This requires a lot more ping speed so I’m reluctant to do this too.

If anyone has programmed networked player movement before some info would be greatly appreciated!!

Do the 2nd thing plus client side prediction and interpolation towards the server state.

www.gabrielgambetta.com/fast_paced_multiplayer.html

It’ll never be perfect though, since physics+player is very unpredictable combo.
GWT means no UDP right? :clue: Ah GDX :smiley:

I dont know why I put GWT!! I meant GDX, my bad ;D

That gaffer article seems like it answers all my questions… Thanks!!