Local and Online Multiplayer?
How would I go about implementing both local and online multiplayer? I have a game that has up until this point been local multiplayer, and I have been looking into adding online multiplayer, but I'm stumped as to how to implement online multiplayer while keeping local multiplayer as an option. The best I can see is that I essentially may have to build two separate games, because when using a build with Networking, half my events are split between server/client, but when running local, I need all my events to be running on the single instance of the game.
TL:DR. How do I implement a game to have both local and online multiplayer? Do I build two separate games, or is there a setting that "disables" networking?
asked Nov 30 '16 at 03:29 AM in Using UE4
You do not need to build two separate modes, if you do not want to. Implementing local multiplayer generally comes down to using the function "Create Player". See https://www.youtube.com/watch?v=ZOc9fV6Sap4 for an introduction. https://docs.unrealengine.com/latest/INT/BlueprintAPI/Game/CreatePlayer/index.html
As far as I know, you can run CreatePlayer on the server without problems, it will have the same behaviour as when run in a "local" game. So you can simply run a server (without any client) as a local game and allow additional local players. This will make testing a lot easier, because you do not need to test two different modes.
answered Dec 03 '16 at 06:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here