12-28-2008, 07:59 AM
Global variables will allocate the same amount of memory as any other variable type.
In OOP, a global variable is a highly unmanaged piece of data that can be hard to keep track of especially as your program grows. It would be better to define member variables for each class that would use that data. Globals aren't BAD THINGS but you should reserve them for data that would best be global (a counter for debugging purposes, defined constants).
Tell me what an event system is. Is it just making customized content using events? Not really sure what you're trying to say in that post.
In OOP, a global variable is a highly unmanaged piece of data that can be hard to keep track of especially as your program grows. It would be better to define member variables for each class that would use that data. Globals aren't BAD THINGS but you should reserve them for data that would best be global (a counter for debugging purposes, defined constants).
Tell me what an event system is. Is it just making customized content using events? Not really sure what you're trying to say in that post.