03-03-2009, 11:58 PM
Tony Wrote:Oh shit. For some reason I was thinking the packets would look all crambed together..
Then I remembered they look like 2 3 45 32 or something.
[edit] Wait now I'm confused.. so basically doing byte arrays, we receive all the data as bytes
then we change them accordingly when we receive them?
The data is stored in an array of bytes.
The packet sends the entire array. When the server recieves the array, it reads the start of the array to find out how long the packet is, then it takes the data you put into the array, out of the array, piece by piece. 'AddIntegerToBuffer' lets you place an 'Integer' variable into the byte array. 'GetIntegerFromBuffer' reads the integer you put in.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?