3 ms·
I would say that it is. I think that the idea of having each state be its own class is very natural, and that it helps organize the code very effectively. My
by diegomacario 7y ago
I would say that it is.
I think that the idea of having each state be its own class is very natural, and that it helps organize the code very effectively.
My failure was in how I made those classes share many components that they shouldn't be sharing, thinking that this would make things more efficient without any proof to support that.
So even though my code uses global variables implicitly, I still think the pattern I used for game state management makes it more organized than an implementation where everything is global.
I hope this answer your question :-)