Avoiding Global Variables in games, how?
What are some of your recommendations to avoid global variables in games?
Obviously its not a good idea to have a global variable for your enemies, and your items, and your maps and whatever else. But obviously many functions from many classes are going to be tinkering with these values.
So what are some of the methods you use, to avoid using global variables, but allow each class that needs access to a certain value, have access to that value?
Some people suggest wrapping the program up in a "global class" perse, but I don't quite understand what they mean. Anyone know about that?
And what other methods do you use?