The live visual debugging capabilities of the Navigation Lab are crucial to ensuring the success of your integration, and your usage of Gameware Navigation in general.
For example: [code from Tutorial_FirstIntegration.cpp]
bool MyGameWorld::Initialize() { ... const KyUInt32 databaseCount = 1; m_world = *KY_NEW Kaim::World(databaseCount); // Visual debugging is disabled in Shipping builds. Even though the symbols and functions are available, they do nothing. // Guarding this code is not necessary, but is recommended in order to prevent useless computations. #ifndef KY_BUILD_SHIPPING // Create a configuration object for the visual debugging server Kaim::VisualDebugServerConfig visualDebugServerConfig; // Set up its class members const KyUInt32 serverPort = Kaim::VisualDebugServerConfig::DefaultServerPort(); visualDebugServerConfig.UseNavigationLab(serverPort); visualDebugServerConfig.SetWaitOnStart( Kaim::VisualDebugServerConfig::DoNotWaitOnStart ); // Activate visual debugging KyResult startResult = m_world->StartVisualDebug(visualDebugServerConfig); if (KY_FAILED(startResult)) { return false; } #endif ... } ... void MyGameWorld::Update(float deltaTimeInSeconds) { m_world->GetVisualDebugServer()->NewFrame(m_gameFrameIdx); ++m_gameFrameIdx; ... } ... void MyGameWorld::Destroy() { ... m_world->StopVisualDebug(); m_world = KY_NULL; }
To test that the visual debugging system is working:
In the dialog box that appears, enter the IP address of the host running your game (or localhost if the Navigation Lab is running on the same computer as your game). Enter the same port number you configured for the visual debugging system in your game code. Finally, click Connect in the dialog to set up the connection.
If the Navigation Lab connects successfully to the game: