patrick wrote:so from what I understood you actually want to implement a state stack where you enter leave states embedded in other states.
I wouldn't over-engineer the state framework, a simple state stack seems sufficient for me. If you have too much states and sub-states you can also run into complicated threading issues (where different threads have different states in parallel).
you told that you want to have the state manager cope with all situations imaginable atm. What are these situations that you are talking about?
Thanks for the input so far. I may not have mentioned this, but I actually have no idea about this topic

About the over engineering part: That shouldn't be a problem because first of all I like doing it and second of all, it shouldn't take more than a couple of days to write the base class GameState. There will be no actual manager, so the hierarchy does that. We can then create the root node at runtime and add all the states.
About the threading: Yeah, that is a problem. Mainly because I really can't say I'm experienced with multithreading. And it is my future aim to have separate threads for certain parts like physics, rendering, etc. That especially allows for better control of the update cycles. Timing a tick in one thread was almost impossible, however yield() in combination with a precise timer should get us the required results.
My objection at the moment is to distribute the tick() through the hierarchy, so for instance the pseudo state "3D init" will have the render calls, "IO init" however won't tick anything at all because there is no need for a tick until the dedicated server has started.
About the stack: It will be a stack in the end, because I will not allow two states on the same level of the tree to be active simultaneously. The idea with the tree rather originates from the thought that it is self managed concerning state transitions.
About everything: I know it is all very vague. That's why I really appreciate input from others even though I'll probably try to disclaim it

And I guess it sure won't work in the first attempt anyway...