One thing I've learned from game programming is how not-bad mutable globals are, handled with discipline. They simplify the code. The knee-jerk reaction elsewhere is often "globals bad, novice." The alternative is a state object with unrelated fields passed all over the place.