Original Post
Recently I started to fool around with online programming for games (or heck anything :P) and I'm just curious if I am going about packets the right way. So the example I will use will be an online game of pong. I can get it to work but it seems like there is a better way (I am too much of a perfectionist!) so I'd like some input. So let's say the up arrow and down arrow moves your paddle. Lets say one player presses the up arrow. I send a packet that does what you'd think it does: "Up" - Just for simplicity at this point I would send that. The server then goes throw a list of possible 'tags' the message can have and handles it accordingly. It will then send back a message to both clients telling it to update the position of one of the paddles. Truthfully I cannot think of any other type to do it (without a similar process) but having to tag each message and sending it to the server which has to search through code on how to handle it. I'm most likely just trying over-complicate this and if that's so, just tell me.