Game Development Community

GhostIndexBitSize = 4 or should it = 9

by Welias D. Willie II · in Torque Game Engine · 10/12/2006 (11:01 pm) · 1 replies

When looking at netConnection.h

/// Some configuration values.
   enum GhostConstants
   {
      GhostIdBitSize = 12, // subtract 3 for GhostIndexBitSize
      MaxGhostCount = 1 << GhostIdBitSize, //4096,
      GhostLookupTableSize = 1 << GhostIdBitSize, //4096
      GhostIndexBitSize = 4 // number of bits GhostIdBitSize-3 fits into
   };

Just looking for comments or suggestions as to why in the current CVS of TGE GhostIndexBitSize = 4 here, instead of GhostIndexBitSize = 9 such as the comments state it should... "number of bits GhostIdBitSize-3 fits into" We read that as 12-3 = 9, not 4.

By the way, Dreamer - Not doubting you, just looking for additional comments. (never can be too certain)

Any ideas?

#1
10/13/2006 (12:27 am)
12 - 3 = 9, and it only takes four bits to hold the number 9. Therefore, GhostIndexBitSize is 4.