Multiplayer with Singleton

Since we keep creating singletons, for example on the get selected unit, we have to go through the instance of that class, does this mean that if we attempt to create a multiplayer game it will select everyones unit? :smile: I guess in this instance we would need to have a new instance object in getting the selected unit and its info, no?

2 Likes

I got multiplayer working, I find that everything was alot easier because its all singletons. You just need to figure out how to handle who calls the functions (which player) and you’ll be good to go.

2 Likes

Even in multiplayer you would just have one UnitActionSystem for example, you wouldn’t have one per player. You would just need extra logic to make sure the current player did not move other players characters, just like you cannot directly move an Enemy unit.

5 Likes

Noted! Thanks

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms