Where should I create a manager class : in GameMode or GameState?
I'm developing a multiplayer (over network) basket ball game , and I'm wondering where's the best place to keep references to a few manager classes I need to implement.
These managers will be in charge of managing the periods of the game
These managers have a double function : modify the gameplay ( running timers, updating the scores, the statistics of the players, etc...), and as such need to be run on the authoritative machine, and have accessors so that each client can display some informations on the HUDs ( like the remaining time for each period / possession ).
I guess that where I spawn these managers are of little importance, as they will all end in the world. But where I keep a reference to them is important.
What is the usual way of using such managers like this :
Any idea or recommandation?
This is a bit confusing to me. UE alread has these 'manager' classes set up for you. All you have to do is use them.
You are tying to make manager classes to do the following:
Modify Gameplay - This should be done in the GameMode class
Update Scores - This should be done in the GameState class
Player Statistics - This should be done in the PlayerState class
Now all of these classes are replicated automatically. Check this out: Link to GameMode Docs.. .you can see that you set these all up for the engine to manage internally... you just use them.
What you are trying to do is implement a system that already exists.
Look at the Gameplay Framework Docs to get a better understanding of this.
answered May 16 '14 at 12:58 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here