Download

Improve the none splitscreen

Hi,
It’s awesome that we can have network multiplayer with a single click but it’s a nightmare to make it local. So, at least please make the none-split screen worth the function but making other players share the camera. It’s so much headache for a designer (<=Mr “No-Code”) to focus on designing the game/level if they need to solve tones of issues including sharing local camera between players.

Many thanks
Raed

You can disable split screen in project settings as well as choose diffrent types of splitscreens

I already said “make the none-split screen worth the function” I didn’t talk about enable/disable. I am saying it’s useless to disable it. Try it and see what happens with other players! They run in and out first player viewport. What’s the point?

What exactly are you wanting? A camera that zooms in and out to contain the other players? This can be easily programmed and shouldn’t be an automatic function for a variety of reasons.

Edit: I know you mentioned you were not a programmer, but you do have blueprints at your disposal. They are very powerful, and any level editor/designer needs to have a firm understanding of their function.

@Raed: Maybe you should calm down a little and not get so aggressive on the forums. What exactly is the problem you are experiencing? Try to provide some more information. Maybe provide screenshots of what you are actually trying to say is wrong.

As The Britain pointed out … it is relatively easy to program but if you provide more information maybe we can understand better what is your problem.

Just firing off a rant like this at Epic and then getting aggressive with another forum member is not really going to help you.

Just my opinion … use it … don’t … it matters not.

Aggressive?? It’s a strong word mate. I didn’t even try to be aggressive and I apologies to all the respected members if I came across aggressive.
Basically, what annoys me most, is the fact I can’t code. I can’t find BP tutorial about either. The split screen works great, but when you disable it it becomes useless. Why? because disabling a split screen means nothing for a single player. And for a MP the other players will run out of the viewport, effectively means a single player mode. As The Britain said, ideally the camera will zoom in and out, move left and right to contain all the players (2-4) at all times. I can’t find an example for 4 players but for 2 the video bellow shows exactly what would I expect when I disable splitscreen. Hope now it’s clear (and not aggressive lol). If you guys think it’s easy to do that in BP please make a video tutorial about it to help any UE4 users looking for similar thing. It will means a lot for me to actually learn it the right way from someone who knows rather than spending weeks trying to make it works and fail over and over and over again (I tried it for weeks hence my frustration)

@Raed: Sorry … my post came off a bit curt … apologies for that.

That sounds like the disable split screen feaure works as you would expect: Instead of two camera views you only get one. The video you posted shows only one camera view so switching split screen to ‘off’ would get you what you want. I think there is absolutely no way the engine could know how exactly you want the camera to behave without you telling the engine how. I cannot offer you a detailed tutorial right now but can quickly explain how I would implement something like the camera in the video:

  • I would remove the camera components from the playable characters.
  • Create an empty actor an set the actor location to the center point between both characters on each tick in the event graph.
  • Attach a camera arm component to the centered actor.
  • Attach a camera component to the camera arm.
  • Update the length of the camera arm in the ‘Tick’ event of the actor based on the distance between the two player characters. (You can use Lerp nodes to smooth the camera position changes.)

You might have to play around with the camera arm length to get a nice result but the overall method should work. If you have trouble implementing that you can write me a pm and I will try to come up with a more detailed tutorial.

Now that’s a very helpful answer. MANY MANY thanks Praseodyl. I will give it a try now and see what I can get.
I wasn’t looking for just a single camera. I see in your instruction you know what I need but disabling the split screen is not giving that result.
Again, really appreciate your help

It’s worth remembering that if you want gameplay functionality, you’ll have to code it. Kind of how Game Dev works :stuck_out_tongue:

But yeah, Praseodyl’s approach should be fine. It’s what we used for Eclipse, based on a similar idea.

I am doing a prototype at the moment. Once we get green light programmers will be hired.
This approach works fine but the main problem still remains. Players can leave the frame at any time. I need them to be locked inside the camera. If you look at the video after certain amount of distance between players the camera stops moving and the players can’t move outside the camera. Any suggestions?

Many thanks

IT’S WORKING NOW HAHAHA… the players are all in the frame. The only problem now they can run all over the world and the camera keeps zooming out. I can’t stop them from running to far from each others!

Hi Raed Abbas,

You should be able to use a clamp node to clamp the max distance between players. Specifically, try using a Clamp Vector Size to determine the max range players can be from one another.

Hi Adam,
Not sure how to use ClampVectorSize and the documentation/google not giving me any useful results.

Thank you

The clamp vector size node makes sure that your input vector’s lengths stays within certain bounds; defined by the ‘min’ ‘max’ inputs. Assuming that you put in a vector of length 20 and your values for ‘max’ is 10, your output vector will have the length 10 while conserving its direction.
A usefull way of utilizing that for your problem would be to compute the difference vectors of both player characters’ locations on each Tick and then put it into the clamp node. The ‘min’ value should be zero and the ‘max’ value should be whatever maximum distance you wish to allow for your players. You can then use the output vector to set the locations of your player characters.
How to do that depends on certain side conditions: Do you want player one to drag player two with him when player one tries to run out of bounds and player two stands still? Or do you simply want to stop any further movement that would increase the distance? There is now ‘right’ answer to that question. You would have to decide what you want for your game.

So, All that will be in the character BP?
They shouldn’t move any further if the distance is more than say 300.

In principle yes. But you could do it also in the camera actor blueprint. That way you would have to do it only once and set the character positions from there. If you do it in the character blueprints you would have to do it twice. Or you communicate the data from one character to the other but that would require you to make two different character blueprints: One to do the computations and the other one to receive them.
If you do the computation in the camera actor the character blueprints could be the same.

a screen shot of this calculations would make it much easier. Really sorry but the more you guys explain the more confused I get lol

I made a small example script to illustrate what I am talking about. I am sure there are hundreds of other ways to do that and this one is most certainly not the best one but it should keep your characters within bounds.
This would be part of the event graph of your camera actor.


I have not tested the script and it might be necessary flip the two character references in the top left corner if the characters start switching positions on each frame.
Also the ‘divide by two’ node can obviously be merged with the clamp node but I hope doing it this way makes the ‘why’ a little bit clearer.

OMG!!! that’s awesome. This made my day… I’m sitting her with tears in my eyes hahaha
THANK YOU THANK YOU!!!
Praseodyl, please PM me your name, I will credit you in my prototype.
This works great and at least the players are in the frame. I was hoping to stop players from running any further but beggar can’t be chooser. This works just fine.
Really many thanks for all your help.