The AI Recorder is the recording utility for the AI Debug Recorder system and is responsible for logging all inputs, decisions and other useful data in real-time while the game is being played out.
At the end of the game session, the recorder serializes all the gathered data for future processing. This utility lives within the AI Systems.
There are several ways to start and/or stop a recording:
Regardless of which method is used to perform a recording, all recordings are saved within the Recordings folder located in the root game directory. The file name of the recording is formatted as such:
MapName_Build(A) Date(B) Time(C).rcd
If you create a manual recording, you can pass in an optional file name to be used for the outputted recording file. If none is specified, the above format is used.
The recording is comprised of many streams which are responsible for chronologically logging a specific type of input.
There are already several streams for certain data which is being recorded:
To record info for any of these events, use the IAIRecordable interface (which all AI Objects inherit from, and is used to link to the Recorder itself). It is also possible to add a new stream to the recording if needed.
All of the streams listed above are already handled by the AI System in various places, with the exception of the Bookmark stream. This is a special stream which is intended to be used by the Game to mark areas of interest for easy debugging later.
For example, a game project may connect a keyboard input to log event data on the Bookmark stream whenever the button is pressed, and inform the QA team to push the button whenever they see odd behavior from the AI.