yoklainterview sim

Game Development Nc Serialization Bandwidth Interview Questions

75 verified Game Development Nc Serialization Bandwidth interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Nc Serialization BandwidthDifficulty 1
A field only ever holds values in the range [0, 1000] (for example, an ammo counter). Using the bits-required rule (bits = floor(log2(max-min)) + 1), the field needs 10 bits. If it is instead stored in a fixed 16-bit (2-byte) integer, how many bits are wasted per field compared to the minimum?
  • a6 bits
  • b4 bits
  • c8 bits
  • d2 bits
Explanation:floor(log2(1000)) + 1 = 9 + 1 = 10 bits are the minimum needed. A 16-bit field wastes 16 - 10 = 6 bits every time this field is sent.
Nc Serialization BandwidthDifficulty 1
In one common bit-packing scheme, an object's compressed linear velocity normally costs 33 bits. Designers add a single leading 'at rest' flag bit: if the object is at rest, the flag is set to 1 and the 33-bit velocity is skipped entirely; if the object is moving, the flag is 0 and the 33 bits follow. Under this scheme, how many bits does a moving object's velocity field cost in total?
  • a33 bits
  • b66 bits
  • c34 bits
  • d32 bits
Explanation:A moving object pays the 1-bit flag plus the full 33-bit velocity: 1 + 33 = 34 bits. Only an at-rest object gets the cheap 1-bit encoding.
Nc Serialization BandwidthDifficulty 2
A bit-packer writes a 6-bit index followed by a 10-bit magnitude for each entry. On the receiving side, the reader mistakenly reads the first entry as a 6-bit index followed by an 8-bit magnitude. What happens to every field read after that point in the packet?
  • aOnly that entry's magnitude is slightly wrong
  • bEvery later field is misaligned by the missing 2 bits
  • cThe reader resyncs at the next byte boundary
  • dThe packet is discarded and re-requested
Explanation:Bit-level streams have no self-describing boundaries. Reading 2 bits fewer than were written leaves those 2 bits sitting at the front of what should be the next field, shifting every subsequent read out of alignment for the rest of the packet.
Nc Serialization BandwidthDifficulty 1
QUIC's variable-length integer encoding (RFC 9000 section 16) reserves the two most significant bits of the first byte to select the encoded length. Which set of byte lengths does this scheme support?
  • a1, 2, 3, or 4 bytes
  • b1, 2, 4, or 8 bytes
  • c2, 4, 8, or 16 bytes
  • d1, 3, 5, or 7 bytes
Explanation:RFC 9000 states the two most-significant bits select a length of 1, 2, 4, or 8 bytes, encoding 6-, 14-, 30-, or 62-bit values respectively.
Nc Serialization BandwidthDifficulty 2
Per RFC 9000's Table 4, a varint whose first byte has its two most-significant bits set to 00 (a single-byte encoding) can represent decimal values from 0 up to which maximum?
  • a63
  • b127
  • c255
  • d15
Explanation:The 00 prefix leaves 6 usable bits in that one byte, giving a range of 0-63, exactly as listed in RFC 9000's encoding table.
Nc Serialization BandwidthDifficulty 1
Why does QUIC's variable-length integer encoding spend fewer bytes on small values instead of always emitting a fixed 8 bytes for every integer field?
  • a8-byte fields cannot be sent over UDP
  • bIt lets receivers skip decryption
  • cMost integer values are small
  • dIt guarantees delivery order between fields
Explanation:The encoding trades a 2-bit length prefix for the ability to represent small, common values in as little as one byte, which lowers the average bytes-per-field across a typical stream of integers.

Test yourself against the 2850-question Game Development bank.

Start interview