Hi!
I'm very new to networking and am still trying to understand basic stuff but my question is how do games handle sending all types of data? For example sending movement data or animation data or other stuff. How do they package their data so its easy for for the server to decide what kind of data it is?
The only thing I can come up with is making an enum and having the different types of data In there and just prefixing the network packets with that. Meaning packets look like this = Enum.Datatype.Input + Input.W.
So I'm just trying to find out how I don't have to write a bunch of if statements on my server for all the data that's coming in.
Hope the question makes sense and thank you for any help!