Hello folks. Many people here are aware that using finite state machine is a good way to handle switching between different stages in game like title screen, menu screen and so on.
I have used this idea few times successfully implementing this kind of functionality to my games, however I'm still not 100% sure how to solve one particular problem.
Till now my game projects used to be very simple, so I didn't have much information to send between different stages, but now I'm working on a game which is much more heavily depending on information transfer.
For example I have stage which is responsible for character creation and another one which is using that information from creator. This isn't the only thing I need to exchange, that's why I'm wondering, how should stages communicate in case I would have more complicated cases?
I was thinking about something similar in a way to a TCP socket. So I could safely exchange packets of important information from one stage to another, should I follow this idea?