joojooga
04-06-2003, 12:52 PM
I've gotten into bitwise shift operations in my C/C++ studies now. It's really cool and I had an insight and I wondered if it was true..
Using bitwise shift operations you can pack a lot of data into numbers. You can use something like 1001 0001 0011 0101 or 0x9135 to represent all kinds of things by just making the bits mean something. Then you can use bit masks to "and" or "or" data from the original value.
So my question is, do you think Verant uses this in their packets to represent things like dragons, spawn points, colors etc? It seems to me like this would really save a lot of bandwidth because you're only pushing a number.
Seems to me that if they do this, understanding this concept would be paramount to writing some good decode stuff.
Using bitwise shift operations you can pack a lot of data into numbers. You can use something like 1001 0001 0011 0101 or 0x9135 to represent all kinds of things by just making the bits mean something. Then you can use bit masks to "and" or "or" data from the original value.
So my question is, do you think Verant uses this in their packets to represent things like dragons, spawn points, colors etc? It seems to me like this would really save a lot of bandwidth because you're only pushing a number.
Seems to me that if they do this, understanding this concept would be paramount to writing some good decode stuff.