Should I be changing controllers/game modes? If so

I’ve been trying to figure out if I should be changing controllers and game mode whenever I open a new level.
The way its currently setup is: A menu level with its own MenuGameMode and MenuController. You type in some information and create a new game. A new level opens and it uses
ComputerGameMode and ComputerController. Now I have a problem where the MenuController contains variables with information I want to transfer to the ComputerController, and I can’t seem to figure out how to do that, so I’m starting to think the whole idea of changing controllers is not the play.
What do you guys think? How would I go about this?

Thank you.

1 Like

I don’t know why you want to keep changing game modes and controllers, but I guess you can always pass variables to the game instance.

2 Likes

Well that pretty much tells me that I shouldn’t. Guess I still lack the understanding of it.
Thank you very much for your answer.

Well, there may be a very good reason, I don’t know. But in the normal course of events, why bother? :slight_smile:

I -think- ( without experiment ), that even if you do have the same controller, and possibly game mode, they be reloaded anyway on level start.

1 Like

I don’t know why you want to keep changing game modes and controllers, but I guess you can always pass variables to the game instance.

1 Like

Don’t forget you can also add components to game mode and controller classes. I’m not saying it’s necessary but it might help you with whatever modularity you are attempting to achieve.

1 Like

Thanks for the comment. What I was trying to achieve was a gamemode/controller that handled the game menu and another gamemode/controller that dealt with the game it self. Thought to my self it being a good idea. Problem was feeding variables from the menu to the game. I did fix it with game instance. I however am still not sure if its good pratice. It feels cleaner, which is what i was going for

1 Like