Advice needed on some OO design decisions (long)

Started by
9 comments, last by swiftcoder 18 years, 7 months ago
Quote:Original post by evolutional
True, but embedding state change logic into the states themselves is likely to be a bad idea (TM).


Now that I think about it more, definitely; for instance, when the InGameState, that was launched by the MenuState, needs to return to the MenuState, without destroying itself? Messy at best.

Quote:I think this would be a good area for me to look at next; we want a system that can switch between states without the need for a monolithic controller and/or embedded state change logic. An interesting task!


Not easy, monolithic is usually neede to keep track of global resources, i.e. stuff like the renderer and the scene manager that don't need to be destroyed and recreated between app states.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement