How can I merge multiple clients in one port?

I want to create a prototype level where when people join the dedicated server, their screen goes into splitscreen and they can see the other person. The specific example would be this: Screencheat - Multiple Players - YouTube

My aims:

  • When one person is in the server, that player has the whole screen to themselves.

  • When another person joins, the screen splits in half, player two is controlling the bottom screen and player one is controlling the top.

  • When the third player joins, each player has one quarter of the screen but the other quarter is blacked out.

  • When the fourth player joins, each person has a screen to themselves.

  • When each player moves about on the server, they cannot see each other in their designated part of the screen but they can “screen cheat” and look at the other players screen. This becomes clear in the video above.

Sorry for being a noob but networking can be a bit of a struggle for the best of us :wink:

Thank you very much in advance for those who help me with my issue/idea.

Kevin

This is probably going to be tricky.

It sounds like what you’re doing is making the server able to screen-cheat on all the clients, but each client only has their own screen.

To do this, you’d set it up like a normal networked multiplayer game, but on the server, you’d have to somehow add Local players (use the Create Player node). Since this assigns a Player Controller at each index you choose, then you probably DON’T want to Create Player on the same indexes as the networked Clients have for their player controllers on the Server (If I’m not mistaken, the server has multiple player controllers, one for each networked player).

Then these extra “players” will need to possess a Pawn whose only job is to follow the other REAL players’ cameras around within their own viewport.

I don’t know if that will work or if I got everything right but that’s how I’d approach it until I got more info about how it all works.