Demo Tutorials
- Follow the installation instructions in Getting started with Runtime Compiled C Plus Plus. Use example SimpleTest to ensure the Pulse simulation is running.
- If possible, display Source Browser (Visual Studio, XCode, Eclipse or text editor) and Pulse side by side.
An introduction to Runtime-Compiled C++, this tutorial enables you to replicate the actions performed in the First Steps video.
Use Runtime-Compiled C++ to change the colour of objects whilst the Pulse simulation is running.
- In Pulse
- Click on the screen to start the simulation
=> Rotating red objects (blood cells) are displayed
- Click on the screen to start the simulation
- In Source Browser
- Open GameObject.cpp
- Search for keyword: [Tutorial01]
- Uncomment m_pRenMesh->SetColor( AUColor(1,1,1) );
(i.e. delete // at the start of the code line) - Save GameObject.cpp
=> In Pulse, the objects’ colour has changed to white.
Introducing Runtime-Compiled C++ crash protection, this tutorial enables you to replicate the actions performed the Crash Protection video. Due to an issue with GDB, this works best in Visual Studio, XCode, or a visual debugger which can use LLDB.
Experience how Runtime-Compiled C++ manages an unhandled exception.
- In Pulse
- Click on the screen to start the simulation
=> Rotating red objects (blood cells) are displayed
- Click on the screen to start the simulation
- In Source Browser
- Open GameObject.cpp
- Search for keyword: [Tutorial02]
- Break the code: replace m_pBehavior with NULL
- Save GameObject.cpp
=> In Source Browser, an unhandled exception message is displayed
=> Pulse is frozen
- In Source Browser
- Click Continue
=> In Pulse, the beacon icon shows an exclamation mark on a red background (small square in the bottom right-hand corner)
- Click Continue
- In Pulse
- Click the beacon icon
=> The Event Log window opens, stating that an exception has been caught - Close the Event Log
- Click the beacon icon
- In Source Browser
- Fix the code: replace NULL with m_pBehavior
- Save GameObject.cpp
=> Pulse resumes its original behavior: rotating blood cells are displayed
=> The beacon icon no longer shows an exclamation mark.
- If you're running 64bit Windows 7 with AVX support, you may find problems in general with seeing the stack in any 32bit program correctly, see this article and the follow up for more information. Running the 64bit version of the code appears to work well, and as of August 2013 this issue should be fixed
Runtime-Compiled C++ handles changes to Include Files. This tutorial enables you to replicate the actions performed the Include File Tracking video, with minor differences.
Set up Runtime-Compiled C++ to automatically handle include files. Change the behaviour of the objects (red cells) whilst the Pulse game is running.
- In Pulse
- Click on the button with a cog symbol, in the upper left-hand corner
- Click New Game
- In Source Browser
- Open BB_Individual_RBC.h
- Search for keyword: [Tutorial03]
- Uncomment SERIALIZE(visible_dangerous);
(i.e. delete // at the start of the code line) - Uncomment AUDynArray visible_dangerous;
(i.e. delete // at the start of the code line) - Save the file
- Open Behavior_RBC_Evade.cpp
- Search for keyword: [Tutorial03]
- Uncomment the class Behavior_RBC_Evade
(i.e. add // in front of /* Demo) - Save the file
- Open BehaviorTree_RBC.cpp
- Search for keyword: [Tutorial03]
- Uncomment the block else if...
(i.e. add // in front of /* Demo) - Uncomment the block m_Behavior_RBC_Evade...
(i.e. delete // at the start of the code line) - Uncomment the block ConstructorId... m_Behavior_RBC_Evade;
(i.e. delete // at the start of the code line) - Save the file
- Open Behavior_RBC_Base.h
- Search for keyword: [Tutorial03]
- Uncomment the two lines m_pPerception->GetPerceived... and m_pPerception->AddPerceived
(i.e. add // in front of /* Demo) - Save the file
=> In *Pulse, the red cells move away from the enemy (green).
(Click New Game again if the game ended)
- Open BB_Individual_RBC.h
- In Pulse
- Click the beacon icon (small square in the bottom right-hand corner)
=> The Event Log window opens - In the Event Log, scroll up
=> The cpp source files which include the modified headers were recompiled, and are therefore listed in the Event Log.
- Click the beacon icon (small square in the bottom right-hand corner)