As everyone knows you're limited to 64 wonders, endgame objects, and feats.
These are stored in a uint64 ('64 bit' int, unsigned.)
While this is a crap design decision, and downright limiting for modding, it did allow them certain shortcuts in coding.
The essential data structure solution is easy... just use a bitvector, which is extensible, and functionality can be built in, to do whatever a uint64 can do, and can easily include serialization.
The trouble in paradise comes in the form of MP implementation.
E.G.
What this does is send a single "packet" with a code to indicate what its transmitting, then it splits (using a slightly obtuse method,) the uint64 into 2 uint32s.
The networking design included 5 optional data parameters, but this obviously limits us... to 160 bits of data. Still not enough... and in fact, the only thing that makes sense is making an extensible system for sending extended data such as this.
We have to design some form of protocol for dynamic encoding, and decoding, presumably with some extra control messages.
I have some thoughts and an overview of a solution... but I thought I'd open the discussion up.
So... thoughts?
These are stored in a uint64 ('64 bit' int, unsigned.)
While this is a crap design decision, and downright limiting for modding, it did allow them certain shortcuts in coding.
The essential data structure solution is easy... just use a bitvector, which is extensible, and functionality can be built in, to do whatever a uint64 can do, and can easily include serialization.
The trouble in paradise comes in the form of MP implementation.
E.G.
Code:
g_network.Enqueue(new NetInfo (NET_INFO_CODE_ACHIEVEMENTS, (uint32)(m_achievements & 0xffffffff), (uint32)(m_achievements >> 32)));
The networking design included 5 optional data parameters, but this obviously limits us... to 160 bits of data. Still not enough... and in fact, the only thing that makes sense is making an extensible system for sending extended data such as this.
We have to design some form of protocol for dynamic encoding, and decoding, presumably with some extra control messages.
I have some thoughts and an overview of a solution... but I thought I'd open the discussion up.
So... thoughts?
Comment