Flagged: A History of SCI Game Flags

KQ4 and LSL2, the first-ever SCI games, did not have many of the luxuries that later games did.

For starters, there were no special procedures to handle event flags. All events were flagged using global variables directly. This way is obviously inefficient and a waste of heap space.

To address this issue, PQ2 introduced the Bset, Bclr, and Btst procedures, which use a global array in which each variable could have 16 flags. That saves a lot of heap space!
Of course, the downside of global variables is that the original programmers could not declare them as arrays with square brackets. This required them to take an educated guess as to how many flags they would need for their games, and note the beginning and end points for the gameFlags array. (SCICompanion has no such limitation.)

Also noteworthy is a procedure or method that not only gives puzzle points, but sets a flag so that the points for that puzzle are only given once. Its name and implementation vary, but the basic idea is the same.

SCI1.1 introduced the Flags class, replacing the deprecated Avoider class around August 1992. The idea was to have all event flags be stored in an object that only requires one global variable to serve as its pointer. To the best of my knowledge, the only games that used this were PQ4, Torin's Passage, and LSL7.