Download

Multiplayer game : How to find the "good" player controller

Hi boyz & girlz !

It’s been so long now I got a problem with networking, multiplayer in general and stuff like that…
Today I want to become better in this way to make a real playable multiplayer version of my game with dedicated server.
But first of all I would like to get more informations about the nodes we can use to find the “good” player controller.

I made a lot of blueprints using tutorials from the community, and I see that there is so many ways to make the same thing in a game…
I will make another project to enhance what I already did. But I would like to know how YOU work when you want to make multiplayer interaction in the game.

My project :

It’s a manga/mecha/action game. We work for a 3 vs 3 arena mod with the mecha gameplay (FPS cockpit view gameplay) and with a watergun 5 vs 5 battleground (TPS view, something similar to APB reload gameplay)
We are actually a litle team, 1 Game designer/developer, 1 3D artist, 1 concept artist, 1 sound designer and 1 webmaster.

Let’s go to talk about that nodes with example :

https://youtube.com/watch?v=ckPdqITr3dY

In this video we got some of my problems. I know I got some replicated issues but not only ^^
Here we got a persistant level with npc that the player can talk. My first problem is that when one of the both players talk to a NPC the other player see his own UI too…

But my biggest problem is the nodes that we can link in the level blueprint and other blueprint like UI ones.
Here is two way to launch a game/map. The player can use UI or ingame button !

UI BP :

https://www.mediafire.com/convkey/0274/zxf2d4hw29vmj496g.jpg

With this UI the player can clic and change map easaly. Only him load the new map. all is ok.

https://www.mediafire.com/convkey/484e/o1uo6quob8574af6g.jpg

We can see the node “tree” for this render.

Level BP (ingame button) :
Here is the button that the player have to go in the cube to be able to see the USE option and to use it.

https://www.mediafire.com/convkey/3954/60kvs3r84ro6szx6g.jpg

This is the BluePrint for it.

https://www.mediafire.com/convkey/6ab2/i995vm095miv2lt6g.jpg

When the player is in the area and use the good input you got a new UI

https://www.mediafire.com/convkey/d379/7254rv6f4ri5ufk6g.jpg

And his BP :

https://www.mediafire.com/convkey/231b/u1nzeizm4flmzcx6g.jpg

But at this time, nothing happened, it’s like the engine can’t find the good player controller to put his UI visible…
I think it’s cause I have to use level blueprint. But I can’t find a way to mix the first idea (UI option to change map) with the environement button !
Here is the screen :

https://www.mediafire.com/convkey/44ab/t67rx4xb7p3x2af6g.jpg

I don’t know if it’s clear enough but it’s too hard to explain that kind of things -_-
I will wait your answer/questions to talk more about that.

Thanks a lot !

Here’s a little trick that might come in handy…

I needed to setup a way for cameras to Change for players in game without the call affecting everyone.

So to make calls to player controller. I added a simple node in the character blueprint.

Event possessed. Cast to my in game player controller. Then set a variable reference to it.

So now with any cast to player controller I can use that node jnstead of relying on get player controller index 0 of player controller which can have mixed results.

One last thing I call menus in my player controller. This ensures it only pops up for that controller.

So in the player controller make custom events to create and add to viewport… Same for removing them.

Food for thought.

OMG ! Exactly what I’m talking ^^

I will make a try tonight ! I think I see what you are talking about.

Thanks a lot !

Can you post some screenshot of what kind of nodes you talking about ? I tried to make something but it don’t really work. Something missing about linking the nodes… :S

Not at home to take screens but go into the character class blueprint. Go to override for add function locate possess.

This gives a start with an exec and an output of new controller. I’m still figuring some stuff out in my game if I get it all totally figured out I’ll try and write something.

But in guessing you can work your way to get the players HUD and call a function in the HUD that is tied to owning player controller.

Thanks a lot,

I’ll go to check that :slight_smile: