For anyone new to the channel, this is a special place... you truly wont find anyone on RUclips giving this level of detail on UE multiplayer anywhere. I've searched every UE channel I can find, and this is the greener grass you've been looking for.
I want to shake your hand, this video helped me so much and i will defenitly be subscribing. Your explanations are detailed and to the point. Keep up the great work. :)
This is amazing stuff, I’ve been following along this series all in the same project and integrating things when I understand how to. I’ve learned a lot about the way the Gm, gs, ps, pawn, pc, and widgets communicate with each other thanks to these videos. I’m working on a simple rpg players can play co-op with their friends. I’ve decided to rebuild the project from the ground up because after learning all this stuff I’ve realized that converting my current project to actually work multiplayer would be more of a chore than just rebuilding it. I hope you cover steam subsystem integration, at some point and provide a bit more context on creating a user in the main menu, setting up a lobby, and loading a game with separate character stats
@@Kekdot just watched those last night while following along the bean battle royal series. I was able to integrate steam in my game :) thank you for the awesome videos
@Nocna Klacz cry more lol, make tutorials nobody wants to download. Use tags and work harder don’t complain, grind harder. Looks like you’re just starting out dog
I absolutely love your videos and the way you explain everything in detail. It's extremely helpful. Thank you! ^_^ do you think you could do a series about implementing a multiplayer inventory system? So each player has their own unique inventory, chests in the world have inventory slots that all players can see and edit, and when you drop or transfer items it's replicated so its the same for all the players in the world?
Can you add a step for letting players name themselves on this list? I've found many tutorials of creating name tag widgets, but not in a multiplayer list.
In fact, what you're saying is right. I had to add 'AllPlayerStates' so the system would recognize the array as updated with the IDs for each player's position on the list. I was experiencing that if I was on client 2, its index was 0, when in reality it should be 1. In other words, only client 1 had the correct order, and by adding AllPlayerStates, this gets fixed.
Can you please create a tutorial on how to replicate a nickname properly, I know is the same process of what you did here using the game state class, all tutorials I can find are just about creating custom events to replicate the nickname, but that does not consider late joined clients and is not properly. What I do is to store the name in the game instance because I get the username from another map (login). But I see that I need my own game state class to change the Player name, and getting each client's game instance class when the logic starts with the event "OnPostLogin" to change the 3d widget component is the part I don't fully control.
Player Array from the gamestate is nice, but seems unreliable as an array. I've had clients join out of order and whatnot. Makes it kinda' hard to rely on that particular node as a source for player list. At least when using in conjunction with the index.
This seems to only work for me when you set the 'create wb player list widget - add to viewport' nodes in the event begin play in the playercontroller, when I try to input it as 'Tab- pressed - >create widget..... etc' it only works if I hit TAB before everyone joins. if I close the widget it goes blank, and if I open it after the other players join, it's also blank.
Hello, Is there a workaround for using the delay node on PostLogin function? I get all sorts of strange behavior on functions called from PostLogin without the delay like: -> Trying to update some UI for clients but Widgets are not initialized. -> Trying to access GameState from client in a WB class but returns Unknown on Cast. And I need a way to handle UI states on all clients when a new Client joins the session. I would not rely on delays in a multiplayer game (or in general) because you don't know if the delay you set is enough on all machines.
How to do this with Player created names? Such as when they save a struct to a save game and load it on the player state. I thought I'd be able to call this updated player name variable, from the gamestate. (by having players save their player saved name to an Array inside the gamestate), but I haven't been able to do this. Perhaps this method in your video, doesn't work with seamless travel, as they're already added to the player array?
I would also like to know how to set this so it uses player name that has been set from a widget instead of the player computer name or steam or EOS name.
If I tried to do a similar thing but wanting to show all actor instances of a actor class would that work? If you can or need more explanation I'd love to discuss it. Im trying to basically set up a teleporter you can place in game and then open a widget to then select which one you'd like to teleport to as of rn I link them by saying one is a entrance and the other a exit (boolean) and then using a Id number (integer) but I'd really prefer to avoid all of that and just select the teleporter instance through the game.
just curious if I could use this method to create all clients mini-map? the issues I met is when play in editor (listen server) everything seem fine, but after package with development, only host showed the correct map widget, all clients map became white images.
Does this still work? Following this exactly is not working for me. In the onrepnotify function, I am printing a string and it's not even printing the string I am telling it to.
I followed this tutorial and it worked flawlessly, however I closed the project last night and upon reopening this morning I now get the error: "Only Local Player Controllers can be assigned to widgets. BP_My_Player_Controller_c_1 is not a Local Player Controller". I'm not sure what changed, or what I may have accidentally clicked, any help @Kekdot?
I added an "is local player controller" branch at begin play on the Player controller, and this seems to have fixed it? Not sure if that was the correct way to do it but it seems to work now
Thats the correct way to do it. As the UI only exists locally, you’ll always want to create UI only on the Local version of your player controller. (Player controllers exist both on the Server and Owning Client)
is it possible to instead of having players all go into single player list but have cards added to another pane IE if players state is has red team true then add player to red team player list and if player state is set to blue team then add player to blue team player list?? been going crazy this week trying to get it working but it only ever works on host but not when I do it on clients from the for each Loop I am going a branch on the playerstate and if player state is true having it add to one list and if false add to the other team list but its only working on the host not the clients if I add branch on.
Would using an array position of zero to determine host create a problem in lobby migration after original host leaves? (I have not worked on implementing Multiplayer yet and just thinking about it based on what I have read on EOS lobby documentation)
Well essentially the UE replication works on the listen server model (client-server), and not on peer-to-peer by default. What that means is that if the host leaves, the session will simply be closed. It does not function in a way that the session will find/determine a new host and make that player host the session. So your concerns will never be the case since that can simply not occur. You would need to have different session functionality where in you would be able to pass a session to a connected client in case the host (server) leaves the game.
If you would have this custom logic however, (Self made or perhaps EOS supplies this logic, not sure, I myself use Steam and not EOS), then you would essentially have some logic with which you would determine which client will be the next host (perhaps based on who has the best ping, that is how COD lobbies worked back in the days), then when determining the next host, you could simply insert that host in the 0 index in the array. (An Array insert that is called). And that would basically fix it. But like I said, as far as I know, when a host disconnects the session simply closes with default Unreal Engine functionality.
"LogGameState: Error: Mixing AGameState with AGameModeBase is not compatible. Change AGameModeBase subclass (MyGameModeC) to derive from AGameMode, or make both derive from Base"
We do use it, when kicking the player. Check near the end of the video. Besides that it’s nice for the GameMode to have a reference of all the player controllers for further down the road logic when it wishes to communicate with them.
@@Kekdot Oh i see, I should've observed more. My fault, just wanted to see how the player list syncing worked and ignored the kicking part, my bad. Thanks for the video.
Server can replicate the lobby list to other players. But I'm having trouble setting this up with custom names set in a player profile from players save games/player instances
@@ttv_mrjack6749 In my lobby I'm using a struct var in the player controller to hold all this data. Then the game mode collects all the structs into an array and sends the array back to each controller to then push to hud which pushes to the lobby gui, generating a player card for each struct. The method I followed is in Ryan Laley's Online Sessions Tutorials.
@@arthurspears8477 I just followed his method but it doesn’t work for the clients, it does create a lobby widget but the children don’t work, it didn’t even work in his own tutorial
@@ttv_mrjack6749 hmm, works with my clients. I have some client side bugs with the lobby widget but the player cards correctly show ready up and player name as fetched from the player state.
@@ttv_mrjack6749 I should add that I didn't use a separate widget for client and server, I just made one that checks if it's a server and does things slightly differently if it is.
Hey guys,
👨🏫 My Patreon link:
www.patreon.com/kekdot
Download Project Files | Premium Tutorials | Courses
💦 Get our Game on Steam | Kekdot Center:
store.steampowered.com/app/1487180/Kekdot_Center/
For anyone new to the channel, this is a special place... you truly wont find anyone on RUclips giving this level of detail on UE multiplayer anywhere. I've searched every UE channel I can find, and this is the greener grass you've been looking for.
I want to shake your hand, this video helped me so much and i will defenitly be subscribing. Your explanations are detailed and to the point. Keep up the great work. :)
Thank you for this interesting tutorial!
This is amazing stuff, I’ve been following along this series all in the same project and integrating things when I understand how to. I’ve learned a lot about the way the Gm, gs, ps, pawn, pc, and widgets communicate with each other thanks to these videos. I’m working on a simple rpg players can play co-op with their friends. I’ve decided to rebuild the project from the ground up because after learning all this stuff I’ve realized that converting my current project to actually work multiplayer would be more of a chore than just rebuilding it. I hope you cover steam subsystem integration, at some point and provide a bit more context on creating a user in the main menu, setting up a lobby, and loading a game with separate character stats
I got videos on implementing Steam
@@Kekdot just watched those last night while following along the bean battle royal series. I was able to integrate steam in my game :) thank you for the awesome videos
Underrated channel
@Nocna Klacz cry more lol, make tutorials nobody wants to download. Use tags and work harder don’t complain, grind harder. Looks like you’re just starting out dog
Works Great!! Thanks👍
I absolutely love your videos and the way you explain everything in detail. It's extremely helpful. Thank you! ^_^ do you think you could do a series about implementing a multiplayer inventory system? So each player has their own unique inventory, chests in the world have inventory slots that all players can see and edit, and when you drop or transfer items it's replicated so its the same for all the players in the world?
would love to see a tut on showing how to have two different lists based on player team, this was a great tut tho!
Finally, with your video i managed to get it, thank you!
Amazing video as usual. Would you implement a 'ready' status/ready button on this player list in another video? It would be nice
Great idea! I'll make a seperate straight to the point Ready Up Lobby system tutorial as one of the next video's 👍
Great tutorial! Would be awesome to have a color/team selection and use that level as a lobby with that UI list.
Up next in next week’s video!
Looking forward to it! 🤓
@@Kekdot Was this video ever made? There is literally NOTHING online about this sort of thing. We really need it.
No I stopped making tutorials around that time sorry. I’m really busy now with other projects but would love to continue with tutorials some day
Really useful, thanks for sharing!
you're amazing!
Can you add a step for letting players name themselves on this list? I've found many tutorials of creating name tag widgets, but not in a multiplayer list.
Me has dado mucha claridad de lo que estaba haciendo mal. Gracias.
Awesome! Your content is very helpful
BIG THANKS!
@19:50 Is there a way to change the Player Name? I'd like for the displayed name be a username instead of the PC name.
Hi, with MyGameState sometimes you shouldn't take a replicated PlayerArray? 19:41
In fact, what you're saying is right. I had to add 'AllPlayerStates' so the system would recognize the array as updated with the IDs for each player's position on the list. I was experiencing that if I was on client 2, its index was 0, when in reality it should be 1. In other words, only client 1 had the correct order, and by adding AllPlayerStates, this gets fixed.
Can you please create a tutorial on how to replicate a nickname properly, I know is the same process of what you did here using the game state class, all tutorials I can find are just about creating custom events to replicate the nickname, but that does not consider late joined clients and is not properly.
What I do is to store the name in the game instance because I get the username from another map (login). But I see that I need my own game state class to change the Player name, and getting each client's game instance class when the logic starts with the event "OnPostLogin" to change the 3d widget component is the part I don't fully control.
Player Array from the gamestate is nice, but seems unreliable as an array. I've had clients join out of order and whatnot. Makes it kinda' hard to rely on that particular node as a source for player list. At least when using in conjunction with the index.
This seems to only work for me when you set the 'create wb player list widget - add to viewport' nodes in the event begin play in the playercontroller, when I try to input it as 'Tab- pressed - >create widget..... etc' it only works if I hit TAB before everyone joins. if I close the widget it goes blank, and if I open it after the other players join, it's also blank.
Hello, Is there a workaround for using the delay node on PostLogin function?
I get all sorts of strange behavior on functions called from PostLogin without the delay like:
-> Trying to update some UI for clients but Widgets are not initialized.
-> Trying to access GameState from client in a WB class but returns Unknown on Cast.
And I need a way to handle UI states on all clients when a new Client joins the session.
I would not rely on delays in a multiplayer game (or in general) because you don't know if the delay you set is enough on all machines.
How to do this with Player created names? Such as when they save a struct to a save game and load it on the player state.
I thought I'd be able to call this updated player name variable, from the gamestate. (by having players save their player saved name to an Array inside the gamestate), but I haven't been able to do this.
Perhaps this method in your video, doesn't work with seamless travel, as they're already added to the player array?
I would also like to know how to set this so it uses player name that has been set from a widget instead of the player computer name or steam or EOS name.
If I tried to do a similar thing but wanting to show all actor instances of a actor class would that work? If you can or need more explanation I'd love to discuss it. Im trying to basically set up a teleporter you can place in game and then open a widget to then select which one you'd like to teleport to as of rn I link them by saying one is a entrance and the other a exit (boolean) and then using a Id number (integer) but I'd really prefer to avoid all of that and just select the teleporter instance through the game.
just curious if I could use this method to create all clients mini-map? the issues I met is when play in editor (listen server) everything seem fine, but after package with development, only host showed the correct map widget, all clients map became white images.
Does this still work? Following this exactly is not working for me. In the onrepnotify function, I am printing a string and it's not even printing the string I am telling it to.
I followed this tutorial and it worked flawlessly, however I closed the project last night and upon reopening this morning I now get the error: "Only Local Player Controllers can be assigned to widgets. BP_My_Player_Controller_c_1 is not a Local Player Controller". I'm not sure what changed, or what I may have accidentally clicked, any help @Kekdot?
I added an "is local player controller" branch at begin play on the Player controller, and this seems to have fixed it? Not sure if that was the correct way to do it but it seems to work now
Thats the correct way to do it. As the UI only exists locally, you’ll always want to create UI only on the Local version of your player controller. (Player controllers exist both on the Server and Owning Client)
@@Kekdot Thanks! Love this channel by the way, most underrated gem on RUclips for UE Tutorials and help.
is it possible to instead of having players all go into single player list but have cards added to another pane IE if players state is has red team true then add player to red team player list and if player state is set to blue team then add player to blue team player list?? been going crazy this week trying to get it working but it only ever works on host but not when I do it on clients from the for each Loop I am going a branch on the playerstate and if player state is true having it add to one list and if false add to the other team list but its only working on the host not the clients if I add branch on.
Would using an array position of zero to determine host create a problem in lobby migration after original host leaves? (I have not worked on implementing Multiplayer yet and just thinking about it based on what I have read on EOS lobby documentation)
Well essentially the UE replication works on the listen server model (client-server), and not on peer-to-peer by default.
What that means is that if the host leaves, the session will simply be closed. It does not function in a way that the session will find/determine a new host and make that player host the session.
So your concerns will never be the case since that can simply not occur.
You would need to have different session functionality where in you would be able to pass a session to a connected client in case the host (server) leaves the game.
If you would have this custom logic however, (Self made or perhaps EOS supplies this logic, not sure, I myself use Steam and not EOS), then you would essentially have some logic with which you would determine which client will be the next host (perhaps based on who has the best ping, that is how COD lobbies worked back in the days), then when determining the next host, you could simply insert that host in the 0 index in the array. (An Array insert that is called). And that would basically fix it. But like I said, as far as I know, when a host disconnects the session simply closes with default Unreal Engine functionality.
"LogGameState: Error: Mixing AGameState with AGameModeBase is not compatible. Change AGameModeBase subclass (MyGameModeC) to derive from AGameMode, or make both derive from Base"
Yeah, simply do exactly as it says.
Use the GameMode class instead of GameModeBase which is intended for singleplayer games.
I notice we dont utilize the array of player controllers we add and remove during log in and log out, what could we use that array for?
We do use it, when kicking the player. Check near the end of the video.
Besides that it’s nice for the GameMode to have a reference of all the player controllers for further down the road logic when it wishes to communicate with them.
@@Kekdot Oh i see, I should've observed more. My fault, just wanted to see how the player list syncing worked and ignored the kicking part, my bad.
Thanks for the video.
Since we can only get game state from server, this only works on host?
Server can replicate the lobby list to other players. But I'm having trouble setting this up with custom names set in a player profile from players save games/player instances
@@ttv_mrjack6749 In my lobby I'm using a struct var in the player controller to hold all this data. Then the game mode collects all the structs into an array and sends the array back to each controller to then push to hud which pushes to the lobby gui, generating a player card for each struct. The method I followed is in Ryan Laley's Online Sessions Tutorials.
@@arthurspears8477 I just followed his method but it doesn’t work for the clients, it does create a lobby widget but the children don’t work, it didn’t even work in his own tutorial
@@ttv_mrjack6749 hmm, works with my clients. I have some client side bugs with the lobby widget but the player cards correctly show ready up and player name as fetched from the player state.
@@ttv_mrjack6749 I should add that I didn't use a separate widget for client and server, I just made one that checks if it's a server and does things slightly differently if it is.
Had me up to the 25 min mark then ya lost me. plz slow down your talking so fast man