I disagree.Originally Posted by Mastadex
True, it could give you the same result, but that is not always the issue at hand. Did you know that every time you create a function that takes in more than 3 parameters, the function call is slower and takes more time, but if there are 3 or less parameters, it can be highly optimized? Often times in game development, there are SEVERAL variables from all across the game that need to be used in one function, and passing them in all in with pointers just simply isnt logical, reasonable, or efficient. Globals do the job.Originally Posted by Mastadex
True, that can be done as long as the variable is needed in that scope only.Originally Posted by Mastadex
Now, I am not trying to say: Use globals!! Globals rock!!! Use them freely!!!
I would never say such a thing as that, because it would be stupid to do such a thing, but I think advanced programmers should know that globals are okay sometimes, and not to be afraid of using them. They are not bad things at all. Beginners should not use them just because they need to learn good programming practice.