BUG? TNLTest Connection reset
by Jochen St · in Torque Game Engine · 03/10/2008 (6:44 am) · 0 replies
Hi,
I wrote a networked app which recently hit the 1024 ghost boundary for a single connection. The TNL doc states that the max number of ghost can easily be raised by manipulating the GhostConstants enum in tnlGhostConnection:
My tnlGhostConnection.h now looks like this:
enum GhostConstants {
GhostIdBitSize = 16 , ///< Size, in bits, of the integer used to transmit ghost IDs
GhostLookupTableSizeShift = 16, ///< The size of the hash table used to lookup source NetObjects by remote ghost ID is 1 << GhostLookupTableSizeShift.
MaxGhostCount = (1 << GhostIdBitSize), ///< Maximum number of ghosts that can be active at any one time.
GhostCountBitSize = GhostIdBitSize + 1, ///< Size of the field needed to transmit the total number of ghosts.
GhostLookupTableSize = (1 << GhostLookupTableSizeShift), ///< Size of the hash table used to lookup source NetObjects by remote ghost ID.
GhostLookupTableMask = (GhostLookupTableSize - 1), ///< Hashing mask for table lookups.
};
But whenever the ghost count exceeds 1024 the client terminates its connection to server, just to immediately reconnect, drop the line again and forth.
I suspect that this might be abug in the TNL because TNLTest.exe which comes with the TNL lets me reproduces the error if I increase the number of players in the game from 15 to over 1024 in the TestGame constructor, i.e. in line 578:
for(TNL::S32 i = 0; i < 1500; i ++)
{
Player *aiPlayer = new Player(Player::PlayerTypeAI);
aiPlayer->addToGame(this);
}
Did anyone encounter the same problem?
Cheers,
Jochen
I wrote a networked app which recently hit the 1024 ghost boundary for a single connection. The TNL doc states that the max number of ghost can easily be raised by manipulating the GhostConstants enum in tnlGhostConnection:
My tnlGhostConnection.h now looks like this:
enum GhostConstants {
GhostIdBitSize = 16 , ///< Size, in bits, of the integer used to transmit ghost IDs
GhostLookupTableSizeShift = 16, ///< The size of the hash table used to lookup source NetObjects by remote ghost ID is 1 << GhostLookupTableSizeShift.
MaxGhostCount = (1 << GhostIdBitSize), ///< Maximum number of ghosts that can be active at any one time.
GhostCountBitSize = GhostIdBitSize + 1, ///< Size of the field needed to transmit the total number of ghosts.
GhostLookupTableSize = (1 << GhostLookupTableSizeShift), ///< Size of the hash table used to lookup source NetObjects by remote ghost ID.
GhostLookupTableMask = (GhostLookupTableSize - 1), ///< Hashing mask for table lookups.
};
But whenever the ghost count exceeds 1024 the client terminates its connection to server, just to immediately reconnect, drop the line again and forth.
I suspect that this might be abug in the TNL because TNLTest.exe which comes with the TNL lets me reproduces the error if I increase the number of players in the game from 15 to over 1024 in the TestGame constructor, i.e. in line 578:
for(TNL::S32 i = 0; i < 1500; i ++)
{
Player *aiPlayer = new Player(Player::PlayerTypeAI);
aiPlayer->addToGame(this);
}
Did anyone encounter the same problem?
Cheers,
Jochen