Game debugging tactic: Console Commands and Variables
The word console is overloaded, so today I’m talking about the command-line interface that some game engines implement.
It started back in 1996 when Quake 1 came out. You could press a special key (~) and some UI would slide down from the top of the screen. You could type commands similar to DOS.
When developing a game, it’s useful to have debug or development-only variables to tune and functions to call. Things like taking a screenshot or allowing you to walk through walls.
Previously, you would use special keyboard shortcuts to do this, but eventually you run out of keys.
Then came the virtual console implemented within the game. You could bind variables (referred to as CVars) and commands and then access them by typing.
All Quake, Unreal, and Source-heritage games have this feature. (Source originates from Quake.) Try pressing ~ in a game and see what shows up!