Eradication of bitfields
Posted: 29 Mar 2007, 20:28
The TASServer protocol is littered with 1 major inconsistency and annoyance, bitfields.
I have had issues with bitfields implementing cookiebot and AFLobby, and I remember hollowsoul saying they where a pain. There are lots of places where bitfields and seperated fields are used interchangeably.
An example is the way team colours are stored, they're stored as a single integer using AABBGGRR in reverse order rather than the conventional RRGGBBAA. And to update 1 piece of information you have to compile a range of data into a bitfield to be sent to the server rather than just what you want to change.
Also there are numerous limitations and bottlenecks imposed by these, for example, because of bitfields you cant have more than 8 sides in a race, because side 9/10 etc is unselectable, you cant pick sides 17-32 without changing the protocol because there arent enough bits allocated.
I have had issues with bitfields implementing cookiebot and AFLobby, and I remember hollowsoul saying they where a pain. There are lots of places where bitfields and seperated fields are used interchangeably.
An example is the way team colours are stored, they're stored as a single integer using AABBGGRR in reverse order rather than the conventional RRGGBBAA. And to update 1 piece of information you have to compile a range of data into a bitfield to be sent to the server rather than just what you want to change.
Also there are numerous limitations and bottlenecks imposed by these, for example, because of bitfields you cant have more than 8 sides in a race, because side 9/10 etc is unselectable, you cant pick sides 17-32 without changing the protocol because there arent enough bits allocated.