So I'm running into a bit of a roadblock with the way I'm currently keeping track of game metrics. By "metrics", I mean little bits of information that I can compose together to get useful information about my game. My primary application for this being so that I can detect certain events in the game and disperse achievements.
The way my current system works, I have metrics represented as a long value, where each bit represents a certain metric... for example, there's a flag for enemies, a flag for the player, a flag for a kill, a flag for each weapon, a flag for when a wave starts, etc, etc. I can then compose these into a single value to tell me things like "an enemy of this type was just killed by this weapon". My achievements controller looks at each metric posted in the last update and I have state machines that transition to the next state based on what metrics are posted.
The problem with this method is... I'm quickly running out of bits to use for my long value. I have plenty more weapons I want to add, so this hard limitation on the number of bits I can use as flags means it's probably time to find a better way to keep track of these.
Does anyone have a recommendation? Preferably one that would require the least amount of effort to refactor my current metrics and achievement systems to integrate?
EDIT: Is there a better term than "metric" to use? I haven't been able to find articles on this topic of game engine design because whenever I use the word "metric", all I find are articles about revenue-related analytical metrics.