I've done a little game network coding before, but primarily with TCP for games without real-time needs. I am working on a 2D Java game with networked multiplayer. For learning, I want to do this myself, without an existing network API.
How do I efficiently represent the game state sent to clients from a server? There is the most obvious but probably least efficient way, which would be to create some sort of game state context object with each player's location, animation state, etc., and send that out to each player every update. That doesn't seem terribly difficult to implement, but would probably be too large to achieve anything close to real-time interaction (of course my experience with this is limited so I may be incorrect).
Is there a solid way any of you have used before to only transmit changes in state, and is there even a large enough disparity in performance that it is worth the extra work?