Announcement

Collapse
No announcement yet.

Training Stream - Blueprint Multiplayer Shootout Game - March 10th, 2015

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    Originally posted by AlanNoon View Post
    Hey all,
    We're aware there's a handful of issues with this project. We're investigating shortly.
    Thank you for response

    Comment


      #77
      Hi,

      I have a question about using Game Instance class for storing current game state variable.

      Seems like we have only one global game state for all players. In my understanding, each player could be in different state at the same time. One would be still in MainMenu, the other in ServerList or already Playing. Shouldnt it be stored per player, in ie. Player State class rather then GameInstance?

      Also all widgets(and OSS events) are associated with PlayerController0, why? My initial thought is to create widgets in PlayerController class and associate widgets with Self, so each player can have its own widgets.

      Could one of the developer who created this demo explain why he went this way ? I do admit it all works as expected, I just dont understand how.
      Greatly appreciated.

      Last edited by tas; 10-11-2015, 06:37 PM.

      Comment


        #78
        Hi tas,

        Originally posted by tas View Post
        Shouldnt it be stored per player, in ie. Player State class rather then GameInstance?
        The state managed by the GameInstance is only relevant to the local player - other players are only connected to the game while actually in the gameplay map. In the menu screens, the local game process is only aware of the one player currently navigating the menu. Now, if you had a game that supported splitscreen or similar functionality with multiple local players, and these players could navigate the UI independently of each other, then yes, you'd want to store some state per player.

        Originally posted by tas View Post
        Also all widgets(and OSS events) are associated with PlayerController0, why? My initial thought is to create widgets in PlayerController class and associate widgets with Self, so each player can have its own widgets.
        Admittedly, using the PlayerController at index 0 here is probably not best practice in general. As above, it works in this case because while the player is in the menus, he's the only one connected to the game.

        The reason I say it's not best practice in general is for two reasons. One, servers will create an instance of a PlayerController for each client that connects. On listen servers, there's a good chance index 0 will refer to the local player's controller in practice, but that should not be relied upon. On clients, this works in practice because only the PlayerControllers for the local players are replicated to them. The second reason is related - for games that support splitscreen or similar functionality, there will be multiple PlayerControllers that each represent one of the local players, and in this case, you may want to associate widgets with particular local players. If the widgets are created in the PlayerController class, remember that the server creates a controller for each client that connects - so consider adding logic to prevent creating widgets for non-local players.

        Comment


          #79
          Thanks for explanation Ryan, now its way more clear. I misunderstood few things about GameInstance.

          Few more questions:

          1. When I Create Session, can I do it on any client or only on server (with help of Has Authority node) ?
          2. Is Shootout designed only for Listen Server or for Dedicated as well ? If only one of them, what makes it not suitable for both of them.
          3. What is ServerTravel/ClientTravel for ? According to docs, ServerTravel moves all Clients and Server to new map. Is it possible to each Client change map independently, and if they choose to go to the same map, they will be able to see each other ?
          4. Do you guys have any more Multiplayer example games coming up? Learning from Epic's examples is the best way to go.

          thanks
          Last edited by tas; 10-19-2015, 02:54 PM. Reason: rephrased question 3

          Comment

          Working...
          X