Training Stream - Multiplayer Mash-up - Nov 8th - Live from Epic HQ

WHAT
In this stream, we take a look at a few different local multiplayer setups (split screen vs. shared screen) and how you can support a couch co-op style of gameplay. We also take a look at the Steam Blueprint Networking project and modify it so it supports a VR playing host against connected third person playing clients.
**
WHEN**
Tuesday, November 8th @ 2:00PM ET Countdown]

WHERE

WHO
Wes Bunn - Senior Technical Writer

Feel free to ask any questions on the topic in the thread below, and remember, while we try to give attention to all inquiries, it’s not always possible to answer everyone’s questions as they come up. This is especially true for off-topic requests, as it’s rather likely that we don’t have the appropriate person around to answer. Thanks for understanding!

Edit: The YouTube archive is now available **here.

**Blueprint Implementing Local Multiplayer | Live Training | Unreal Engine - YouTube

Really really looking forward to this stream.

This is a very interesting topic. Looking forward to it!

I dont know much about game development but im soooooooo looking forward for this!!
I’m really happy Epic is taking part on making it real because I really miss couch co-op games.

Oooh, that’s something I really wanted to know (especially shared screen local MP).

@Shaddenfreude I have 2 questions for [MENTION=48]Wes Bunn[/MENTION]

  1. Is it possible to have 2 local players on a shared screen and play online at the same time? (kinda local/global MP combined)
  2. Is it possible to have split screen (2 screens) and 2 players share one of the split screens (4 player local MP with 2 of the players on one half of the screen and 2 other players on another half of the screen)

Great stream! Too bad I had to watch only fragments and without sound (at work :rolleyes: ).

Will it be available for offline view soon in the next few days ?

Hey all,

Here’s the link to the project files from today’s twitch stream.

https://forums.unrealengine.com/showthread.php?128209-Twitch-Steam-VR-Multiplayer-Project&p=620792#post620792

As noted in the post above, the reason the character wasn’t spawning correctly for clients is becuase I forgot to SET the IsHost? bool after running through that script. :frowning:

I fixed that and posted the project files at the link above.

Thanks,

-W

Hey Motorsep,

This should be doable, but I haven’t tried to set it up yet. We’ll try to work this into the Steam MP project in a future stream when I have a chance to try and set it up.

-W

One more comment to add…

I wanted to try and do a Local VR vs Non-VR gameplay (where one person is in VR and another is using the computer/keyboard/controller to play locally).

The ability to override the local mirror window (what is projected from the headset to the computer monitor/tv) is something that the VR team said would be possible in future engine updates.

That would allow you to override the mirrow window with any camera actor (it may be doable through C++, but I know we want to expose that to BP’s as well).

-W

Ah, so it wasn’t in this stream :frowning:

Do you have an idea when in the future, approximately (somewhere before 2016 ends or in the the first quarter of 2017, etc.), you will go over these setups ?

Thanks beforehand

I’d say the later to be safe, and if I can do it earlier that would be ideal. I’d need some time to dig into it and figure out the best way to set something like that up as I haven’t tried it yet.

Some of the split screen code isn’t exposed to Blueprints, I’m sure this is all possible via C++ but since I’m not a programmer I’d need to do some research on how to get it to work properly.

In the meantime, someone on the forums or AnswerHub might be able to answer this as well.

-W

That is ouch :confused: I am not a programmer either, so I try to stay away from any C++, even if it’s a copy/paste snippet.

Perhaps it’s something that Epic can expose to BP in one of the upcoming releases (4.15 - 4.16), if you already know what in particular needs to be exposed to BP for local MP with shared / split screen mix ?

Yeah, I will have to dig into this for more info.

I have managed to get splitscreen working through multiplayer, the only drawback I have is the Create Session node only limits the amount of connections per server. Meaning say you have a limit of 8 people and 7 clients are connected already, you can pass that limit if you have 2 local players. I have a create players function which happens once all local players have succesfully joined the session.

There’s alot of stuff like casting to the player character and playerstate which is stuff for me that I need for future stuff so ignore that. You can get the playerstate directly from the create playernode if you need it.

This solution does give each local player a proper playerstate but the same name for everyone. For that I did what most games do and created a new string variable and added a (#) behind the name to differentiate the players and use that variable for my widgets.

Controller assignment is a pain as always but that’s also for games without networking. What also sucks is the field of view not scaling with the viewport. But that’s an issue not unique to splitscreen. The same applies to widgets. If there’s splitscreen I have to scale down the hud for it to fit properly. What I have noticed too is pretty sure scenetexture nodes in materials always output player 1’s viewport.

For now I’m doing the fov and HUD resizing manually.

I do not know if this method causes any issues so use it with caution. Ideally there would be a plugin or a feature that exposes splitscreen settings to blueprints properly.

Also not how the sniper rifle’s screen is for both top and bottom left the same because it automatically uses player 1’s.

But for the time being it works. As you can see there’s 3 local players and 1 player(Cobby) connected to me. All of them can kill and get points etc.

All the nightmares I had about a year ago to make this working correctly, the memories are coming back :3

What you can do now is open two instances (either editor or packaged), connect eachother. Minimize VR player window, maximize spectator window, voila. Works for me, although I can’t imagine it working in a commercial product, still an experiment. Here’s the project with my setup.

Will have to take a look at that. Whenever you try to play a standalone game with two local players (not connected locally via lan), the HMD kicks in and is mirrored to the PC. I’ve tried creating players and assigning controllers and specifying pawn possession, however when stereo mode is turned on for the HMD it takes over the PC monitor view which is what the team said they want to be able to allow you to override with a different camera actor. Will update once that functionality is in.

-W

Hi Wes. first of all thanks for your amazing tutorials! They are very helpful. I have folowed this last video step by step and worked ok, but once I create a Host and it jumps into the Lobby, the menu on it (using VR) is not centered, a part is out of screen and also in a different resolution, so you can´t navigate the menu. When you roll over with the mouse where the buttons ares supposed to be located, the part of the button seen out of screen is higlighted. so I´m not sure what I´m doing wrong. Any ideas? Almost forgot! I can see the hands, their movements and grabbing releasing, but not the HMD @wesbunn

Thanks!

https://i.imgsafe.org/5c375eded1.jpg

https://i.imgsafe.org/5c379de756.jpg

https://i.imgsafe.org/5c37ed2781.jpg

https://i.imgsafe.org/5c3821c33d.jpg

Just Found that I had Stereo ON in the Lobby menu :rolleyes: so that problem is solved. But still can´t see the HMD.

@franktech
Don’t get me wrong, a 1vs1 Multiplayer Split-Screen is easy to make with Blueprints. I’m just sad I didn’t have this tutorial 1 year ago. To be fair, I had no previous experiences about Multiplayer in general. But if you watched the stream, you should already know everything you need <3.