This tutorial series has been helping me alot for my multiplayer project! ~ I hope you keep doing this especially on showing us how to implement gameplays with the networking system! :D
Heads up, rename this video to something with "Steamworks Server Browser" in the name. I don't think there are any other videos like this on UA-cam that I could find so it would be a good thing for clicks!
for you that don't know you can add metadata to your specific lobbies and that way even if you use the default steam id 480 it will display only your lobbies from your game
i have some problem, when someone LEAVES the lobby , all works fine , i delete that player from mirror players list that i created, and from the managger too, BUT , if some pc CRASHES or the player hits alt+f4 , the command to delete the players doesnt run. This dont affect the current match , but if another player search the lobby , sometimes "lobby is full" because the player that hit alt+f4 or crash still its on my lists. How can i check the current working connections on my steamlobby, so i can update the lobby data with only the players that still playing. I hope you can understand my english LOL, best regards from Argentina pd: suscribed to your channel ;)
Very Helpful tutorial! only sugestion would be to explain more about what each function is doing, as I was trying to make the list only show lobbies that are hosted by friends... and turns out that its not just adding an if(hosted by a friend) but completely different code!: FriendGameInfo_t friendGameInfo; if (SteamFriends.GetFriendGamePlayed(friendID, out friendGameInfo) && friendGameInfo.m_steamIDLobby.IsValid()) { //inside a for loop using SteamFriends.GetFriendCount(EFriendFlags.k_EFriendFlagImmediate); //instance lobby prefabs in here }
This tutorial is great as the others! I am wondering however, if there is a way to put multiple people in the lobby at the same time like a party. I do realize that I am late, but I was just wondering as the other tutorials were very helpful.
Amazing tutorial it help with a lot! I also ran into a problem when calling the GetListOfLobbies function in LobbiesListManager. It has a null reference which probably mean it has to do with something in SteamLobby script but as of rn idk what or where.
I know i am a bit late. But I have an issue. So my friend Hostet a game but I can’t see it in the list. And when I am hosting then he can’t see me in the list too. But via Steam friends I can join his lobby. But I did change the ElopeTyoe to Public And all other Lobby’s from other Games are shown
@@CreativelyBad Yeah actually the max limit of lobbies that swow up is 50 and because of the standart appid is used by way more people than 50 your lobby would show up rarely. You can use your own Appid to avoid that. But your game has to have less than 50 lobbies. If your game is more popular you could ask Steam Support
After clicking on "JoinLobby" button, NetworkAdress from CustomNetworkManager dissapears with "Must set the Network Address field in the manager UnityEngine.Debug:LogError (object)" error. Help me please.
I have the same problem. I think its because the server doesnt have an set address, because its empty. I tested everything with external pc on external network. You need to populate the server first before joining it. So you can never join an empty server. First you need someone to host a server, and then join this server. I think its a mistake in the video, but you need to filter out the empty servers, because they don't really exists. See the code underneath. I added a couple of codes to filter out the empty filters based on the LobbyName. In the video we give empty servers the name "Empty". Based on this name, we can chose to just not display these. Understand that "Empty" is a bad choice of words, because there can be people with the SteamName "Empty", so just change this to "ThisIsAnEmptyServerOrSomething111111111". A name no person will have. Change "Empty" in both the LobbyDataEntry.cs and the LobbyListManager.cs to this new name for it to work. public void DisplayLobbies(List lobbyIDs, LobbyDataUpdate_t result) { for (int i = 0; i < lobbyIDs.Count; i++) { if (lobbyIDs[i].m_SteamID == result.m_ulSteamIDLobby) { string lobbyName = SteamMatchmaking.GetLobbyData((CSteamID)lobbyIDs[i].m_SteamID, "name"); // Check if the lobby name is empty or set to "Empty" if (string.IsNullOrEmpty(lobbyName) || lobbyName == "Empty") { continue; } GameObject createdItem = Instantiate(lobbyDataItemPrefab); createdItem.GetComponent().lobbyID = (CSteamID)lobbyIDs[i].m_SteamID; createdItem.GetComponent().lobbyName = lobbyName; createdItem.GetComponent().SetLobbyData(); createdItem.transform.SetParent(lobbyListContent.transform); createdItem.transform.localScale = Vector3.one; listOfLobbies.Add(createdItem); } } }
I love this tutorial series i been try to make steam multiplayer for a long time but thanks to your series its been so helpful What I need to do with The back button in the Lobby list menu because you didnt gave him an OnClick()
@Zyger i ran into a problem with the GetListOfLobbies function in LobbiesListManager its coming back as a Null reference idk what I have done can you help
I'm having a bug where when I leave the main menu scene, into a game scene, and then come back my lobbies multiply in size dramatically and most of them are broken links. Have you experienced this? After some debugging it looks like the "OnGetLobbyList" is being called twice; any thoughts?
Getting the same problem, ever find a fix? I tried manually clearing the list and it appears steam is indeed fetching multiple instances of the same lobby.
@@mechsquid2 Hey I actually did figure it out! My solution might not be yours but here is what was happening on my end: I was instantiating this steam lobby/network manager and then destroying it when reloading the main menu code. The solution I found was to "Dispose" of the callbacks and reinstantiate new ones. This is what I have on my lobby script: " void OnDestroy() { //clear all callback references LobbyCreated.Dispose(); JoinRequest.Dispose(); LobbyEntered.Dispose(); LobbyList.Dispose(); LobbyDataUpdated.Dispose(); } " Hope that helps!
Hi. I've been following your tutorials and ran into a snag. I left all my script files in the base Assets directory but getting to 3:05 in the video I get an error in the Unity console: Assets\LobbyDataEntry.cs(28,20): error CS0117: 'SteamLobby' does not contain a definition for 'Instance' Did I miss a step? I've googled the error and have only found people talking about using "Singletons" to solve this issue but that seems to open up more errors if I go down that route. Thanks for the tutorials so far! You're doing a good job.
Hi, I'm having an interesting issue. When I launch the game all the lobby entries are extremely zoomed in. I figured out that the reason is because each entry's pos z in Rect Transform is being set to a large negative number, when I manually set that to 0 in the hierarchy while playing it fixes the issue with the list. Only problem is I have no idea why it is setting that value to an absurd number like that. the prefabs transform xyz are all 0. Anyone have any ideas on a solution? EDIT: I ended up finding the solution, I'll post it here in case anyone get's the same issue I did adding a line under "createdItem.transform.localScale = Vector3.one;" in the LobbiesListManager script to set the local position to vector3 zero :)
WARNING! Hi Gabi, it works perfectly, thanks:) !! Something i've noticed, if i host a lobby, and start it then on the other client i click show lobbies it appears, but when i try to join my lobby (which is already going) game crashes. It would be very important to me that it works this way too. Could you help me please?
Hi there 😄 finally every thing working great thanks but i have problems that the same name keep. Showing i have a game on steam and i test it .the only problem is we i press join button i got to much same name to join witch is my second pc .the same thing with jesus lovers
Very helpful videos. But could someone help me? I can't implement leaving the lobby before the start of the game. When returning to the main menu in the SteamLobby script, manager becomes null and creating a new lobby is no longer possible. The network manager is not destroyed and is always alone, although I may have missed something. When leaving the lobby, I call Manager.StopHost().
Must set the Network Address field in the manager UnityEngine.Debug:LogError (object) Mirror.NetworkManager:StartClient () (at Assets/Mirror/Core/NetworkManager.cs:380) SteamLobby:OnLobbyEntered (Steamworks.LobbyEnter_t) (at Assets/Scripts/SteamLobby.cs:107) Steamworks.Callback`1:OnRunCallback (intptr) (at Assets/Mirror/Runtime/Transport/FizzySteamworks/Dependencies/Runtime/CallbackDispatcher.cs:291) Steamworks.CallbackDispatcher:RunFrame (bool) (at Assets/Mirror/Runtime/Transport/FizzySteamworks/Dependencies/Runtime/CallbackDispatcher.cs:191) Steamworks.SteamAPI:RunCallbacks () (at Assets/Mirror/Runtime/Transport/FizzySteamworks/Dependencies/Runtime/Steam.cs:112) SteamManager:Update () (at Assets/Mirror/Runtime/Transport/FizzySteamworks/Scripts/Steamworks.NET/SteamManager.cs:169) i get this error when i click joint button to join lobby
Thank you for continuing this tutorial series! I hope you will make a video about how to make it so each player can see their own POV in their own camera. Like a normal multiplayer FPS game
@Zyger hello i have a question how can i exit the lobby once i joined the game and i am on the map? Every time I do this and try to rejoin the other server, it doesn't work
Hello Zyger, thank you very much for your videos, they are very helpful! I wanted to know if it would be possible to do a host migration when the player host leaves the lobby, is it possible? Thank you Zyger.
Unfortunately host migration is not possible with mirror or steams networking, because the initial host acts essentially like a server. If you want host migration you would have to purchase a standalone server, or have one.
I don't get how you can just go SteamLobby.Instance and then call the methods from that script. Is there something I have to do to call .Instance? It's at 2:55 (I did not follow your other tutorials, but I have a project with a similar structure)
yeah so in my other tutorials i show how to set up the steam lobby as an instance. basically you make a reference to the script itself (which in my case I called instance)(SteamLobby instance;). then in the awake function I check if instance is null and if it is I set instance = this.
I don't get which is the difference between this video and this ua-cam.com/video/7Eoc8U8TWa8/v-deo.html You are creating a lobby with steamworks but in different ways is that correct? I love your videos but I also don't get the right order of your videos....
This current video is about matchmaking. so its essentially a lobby browser. whereas the other video was how to set up lobbies/ how to create them. If you;re looking at the order just go in the order that they were uploaded in or in the playlist. you can sort the playlist by upload date too
@@ZygerGFX Yeah I see but all videos seems not to extend the videos before instead it feels like a closed environment (sorry for my bad englisch, Im not a native speaker). I dont know if you got me but very difficult to look each video and extend the work what I did before with the content of the new video because this new video start at zero again
@@ZygerGFX Oh, that's sad, any way thank you. can you make tutorial for unity gaming services, * netcode for gameobjects * lobby * relay * making server using netcode for gameobject
This tutorial series has been helping me alot for my multiplayer project! ~
I hope you keep doing this especially on showing us how to implement gameplays with the networking system! :D
Omg this looks sick! Thank you for doing multiplayer tutorials
thanks !
i know this is really old but for me whenever i try to join a lobby, the networkmanager's network address becomes blank and gives me an error, help
Heads up, rename this video to something with "Steamworks Server Browser" in the name. I don't think there are any other videos like this on UA-cam that I could find so it would be a good thing for clicks!
for you that don't know you can add metadata to your specific lobbies and that way even if you use the default steam id 480 it will display only your lobbies from your game
How do you do this?
i have some problem, when someone LEAVES the lobby , all works fine , i delete that player from mirror players list that i created, and from the managger too, BUT , if some pc CRASHES or the player hits alt+f4 , the command to delete the players doesnt run. This dont affect the current match , but if another player search the lobby , sometimes "lobby is full" because the player that hit alt+f4 or crash still its on my lists.
How can i check the current working connections on my steamlobby, so i can update the lobby data with only the players that still playing.
I hope you can understand my english LOL, best regards from Argentina
pd: suscribed to your channel ;)
Liking these tutorials from you a lot, thanks so much
Anyone know if she made a tutorial on how to have people leave the lobby? Can't figure it out and doesn't seem to be in any of the tutorials so far.
Thanks for all of the Tutorials!
Awesome tutorial. Easy to follow. Gonna try it out in my project after I've slept haha.
Very Helpful tutorial! only sugestion would be to explain more about what each function is doing, as I was trying to make the list only show lobbies that are hosted by friends... and turns out that its not just adding an if(hosted by a friend) but completely different code!:
FriendGameInfo_t friendGameInfo;
if (SteamFriends.GetFriendGamePlayed(friendID, out friendGameInfo) && friendGameInfo.m_steamIDLobby.IsValid())
{
//inside a for loop using SteamFriends.GetFriendCount(EFriendFlags.k_EFriendFlagImmediate);
//instance lobby prefabs in here
}
thank you great job but i got this error with the list can you just help me out
this is the link to the video
ua-cam.com/video/WzKMNW3ZgoA/v-deo.html
This tutorial is great as the others! I am wondering however, if there is a way to put multiple people in the lobby at the same time like a party. I do realize that I am late, but I was just wondering as the other tutorials were very helpful.
Loving this series!
Amazing tutorial it help with a lot! I also ran into a problem when calling the GetListOfLobbies function in LobbiesListManager. It has a null reference which probably mean it has to do with something in SteamLobby script but as of rn idk what or where.
have you figured it out
please respond
have you figured it out yet
@@chair4099 I have not
I know i am a bit late. But I have an issue. So my friend Hostet a game but I can’t see it in the list. And when I am hosting then he can’t see me in the list too. But via Steam friends I can join his lobby.
But I did change the ElopeTyoe to Public
And all other Lobby’s from other Games are shown
Did you ever solve this. Having the same issue
@@CreativelyBad Yeah actually the max limit of lobbies that swow up is 50 and because of the standart appid is used by way more people than 50 your lobby would show up rarely. You can use your own Appid to avoid that. But your game has to have less than 50 lobbies. If your game is more popular you could ask Steam Support
After clicking on "JoinLobby" button, NetworkAdress from CustomNetworkManager dissapears with "Must set the Network Address field in the manager
UnityEngine.Debug:LogError (object)" error. Help me please.
I have the same problem. I think its because the server doesnt have an set address, because its empty. I tested everything with external pc on external network. You need to populate the server first before joining it. So you can never join an empty server. First you need someone to host a server, and then join this server. I think its a mistake in the video, but you need to filter out the empty servers, because they don't really exists. See the code underneath. I added a couple of codes to filter out the empty filters based on the LobbyName. In the video we give empty servers the name "Empty". Based on this name, we can chose to just not display these. Understand that "Empty" is a bad choice of words, because there can be people with the SteamName "Empty", so just change this to "ThisIsAnEmptyServerOrSomething111111111". A name no person will have. Change "Empty" in both the LobbyDataEntry.cs and the LobbyListManager.cs to this new name for it to work.
public void DisplayLobbies(List lobbyIDs, LobbyDataUpdate_t result)
{
for (int i = 0; i < lobbyIDs.Count; i++)
{
if (lobbyIDs[i].m_SteamID == result.m_ulSteamIDLobby)
{
string lobbyName = SteamMatchmaking.GetLobbyData((CSteamID)lobbyIDs[i].m_SteamID, "name");
// Check if the lobby name is empty or set to "Empty"
if (string.IsNullOrEmpty(lobbyName) || lobbyName == "Empty")
{
continue;
}
GameObject createdItem = Instantiate(lobbyDataItemPrefab);
createdItem.GetComponent().lobbyID = (CSteamID)lobbyIDs[i].m_SteamID;
createdItem.GetComponent().lobbyName = lobbyName;
createdItem.GetComponent().SetLobbyData();
createdItem.transform.SetParent(lobbyListContent.transform);
createdItem.transform.localScale = Vector3.one;
listOfLobbies.Add(createdItem);
}
}
}
Thank you! This was a lot of help. 8)
I love this tutorial series i been try to make steam multiplayer for a long time but thanks to your series its been so helpful
What I need to do with The back button in the Lobby list menu because you didnt gave him an OnClick()
Did you fixed it?
Thanks you are my saver i can now publish my first game ever👍👍👍😁😁😁
Hello, pretty nice tutorial. I would like to ask, if this game can also shows lobbies of ppl are not friend of mine.
Great stuff as usual!
thank you !
ok for some reason the host can only ready up not the client and also they can only join through in game joining a lobby not from invite or join game.
"Connection was closed by peer, Timed out attempting to connect" how i can fix it ?
@Zyger i ran into a problem with the GetListOfLobbies function in LobbiesListManager its coming back as a Null reference idk what I have done can you help
I'm having a bug where when I leave the main menu scene, into a game scene, and then come back my lobbies multiply in size dramatically and most of them are broken links. Have you experienced this? After some debugging it looks like the "OnGetLobbyList" is being called twice; any thoughts?
Getting the same problem, ever find a fix? I tried manually clearing the list and it appears steam is indeed fetching multiple instances of the same lobby.
@@mechsquid2 Hey I actually did figure it out! My solution might not be yours but here is what was happening on my end:
I was instantiating this steam lobby/network manager and then destroying it when reloading the main menu code. The solution I found was to "Dispose" of the callbacks and reinstantiate new ones.
This is what I have on my lobby script:
"
void OnDestroy()
{
//clear all callback references
LobbyCreated.Dispose();
JoinRequest.Dispose();
LobbyEntered.Dispose();
LobbyList.Dispose();
LobbyDataUpdated.Dispose();
}
"
Hope that helps!
@@danielweber4961 hey where did you put this code exactly?
@@danielweber4961
dude i'm having the same error, i don't understand how can i solve it
Hi thanks for the tutorial, I can Host on both PCs but i cannot join each other lobbies i don't get any errors and the lobby type is public. Any idea?
+1 i have same problem
So i have an interesting bug where is i use my own steam app id the lobbies wont get instantiated. does anyone know how to fix this?
Hi. I've been following your tutorials and ran into a snag. I left all my script files in the base Assets directory but getting to 3:05 in the video I get an error in the Unity console:
Assets\LobbyDataEntry.cs(28,20): error CS0117: 'SteamLobby' does not contain a definition for 'Instance'
Did I miss a step? I've googled the error and have only found people talking about using "Singletons" to solve this issue but that seems to open up more errors if I go down that route.
Thanks for the tutorials so far! You're doing a good job.
I was able to fix it with full functionality (as far as I can tell) by making an instance definition like in the other class.
@@theseventh1824 Could you explain this please?
When r you going to upload your next devlog
I truly appreciate your hard work!
Hi, I'm having an interesting issue. When I launch the game all the lobby entries are extremely zoomed in. I figured out that the reason is because each entry's pos z in Rect Transform is being set to a large negative number, when I manually set that to 0 in the hierarchy while playing it fixes the issue with the list. Only problem is I have no idea why it is setting that value to an absurd number like that. the prefabs transform xyz are all 0. Anyone have any ideas on a solution?
EDIT:
I ended up finding the solution, I'll post it here in case anyone get's the same issue I did
adding a line under "createdItem.transform.localScale = Vector3.one;" in the LobbiesListManager script to set the local position to vector3 zero :)
WARNING! Hi Gabi, it works perfectly, thanks:) !! Something i've noticed, if i host a lobby, and start it then on the other client i click show lobbies it appears, but when i try to join my lobby (which is already going) game crashes. It would be very important to me that it works this way too. Could you help me please?
Also, how can i quit session in game?
Please please I want Photon Multiplayer tutorial
Hi there 😄 finally every thing working great thanks but i have problems that the same name keep. Showing i have a game on steam and i test it .the only problem is we i press join button i got to much same name to join witch is my second pc .the same thing with jesus lovers
Can you link source code, that would be helpful
I have its in the description. Its on my patreon
@@ZygerGFX one more question, is this dedicated networking or clients as master host
@@noice8819there are no dedicated servers or networking. Mirror is P2P. hope that helps
Are you an indie developer??
"Now lets go to the steam lobby script"
Great! oh wait, i don't have that.
Follow along in the tutorial, was made a few videos back
>yingtan is gay
🤣
Very helpful videos. But could someone help me? I can't implement leaving the lobby before the start of the game. When returning to the main menu in the SteamLobby script, manager becomes null and creating a new lobby is no longer possible. The network manager is not destroyed and is always alone, although I may have missed something. When leaving the lobby, I call Manager.StopHost().
Did you ever figure this out?
Did you find a solution or fix
Must set the Network Address field in the manager
UnityEngine.Debug:LogError (object)
Mirror.NetworkManager:StartClient () (at Assets/Mirror/Core/NetworkManager.cs:380)
SteamLobby:OnLobbyEntered (Steamworks.LobbyEnter_t) (at Assets/Scripts/SteamLobby.cs:107)
Steamworks.Callback`1:OnRunCallback (intptr) (at Assets/Mirror/Runtime/Transport/FizzySteamworks/Dependencies/Runtime/CallbackDispatcher.cs:291)
Steamworks.CallbackDispatcher:RunFrame (bool) (at Assets/Mirror/Runtime/Transport/FizzySteamworks/Dependencies/Runtime/CallbackDispatcher.cs:191)
Steamworks.SteamAPI:RunCallbacks () (at Assets/Mirror/Runtime/Transport/FizzySteamworks/Dependencies/Runtime/Steam.cs:112)
SteamManager:Update () (at Assets/Mirror/Runtime/Transport/FizzySteamworks/Scripts/Steamworks.NET/SteamManager.cs:169)
i get this error when i click joint button to join lobby
im getting this error SteamLobby.OnGetLobbyList (Steamworks.LobbyMatchList_t result) (at Assets/Scripts/Network/SteamLobby.cs:110)
Thank you for continuing this tutorial series! I hope you will make a video about how to make it so each player can see their own POV in their own camera. Like a normal multiplayer FPS game
I would recommend just disabling the player camera and enabling them only if it is local player well that worked for me anyway hope this helps 😃
@@vmancool I'll try that. Thank you!
character selection video next?
love this series btw
I want to see my friends only how can I do that?
hi I Know I late but what the but for the "backButton"
you forgot to make a back button :D
Thanks mommy!
It's been a while :DD
@Zyger
hello i have a question how can i exit the lobby once i joined the game and i am on the map? Every time I do this and try to rejoin the other server, it doesn't work
Hey did you find a solution? Having the same issue
@@MaxyDev yes give me 1h becouse I have meeting in 15 min
@@makschojniak4083 I already found a solution by now but Thank you!
@@MaxyDev thiss is mine:
public void QuitFromLobby()
{
Debug.Log("Quit from lobby");
SteamMatchmaking.LeaveLobby(lobbyData.GetLobbyID());
if(NetworkClient.active)
NetworkManager.singleton.StopClient();
if(NetworkServer.active)
NetworkManager.singleton.StopServer();
}
In what scenario would the lobby name be empty?
Or is this just because we are testing with the spacewar appid?
@@sotofpv prob cause theres seems to be serveral empty lobbies everytime i launch it prob from other people
Reminder for myself: I'm 3:15 in.
Hello Zyger, thank you very much for your videos, they are very helpful! I wanted to know if it would be possible to do a host migration when the player host leaves the lobby, is it possible? Thank you Zyger.
Unfortunately host migration is not possible with mirror or steams networking, because the initial host acts essentially like a server. If you want host migration you would have to purchase a standalone server, or have one.
This was extremely helpful, Thank you!
I don't get how you can just go SteamLobby.Instance and then call the methods from that script. Is there something I have to do to call .Instance?
It's at 2:55 (I did not follow your other tutorials, but I have a project with a similar structure)
yeah so in my other tutorials i show how to set up the steam lobby as an instance. basically you make a reference to the script itself (which in my case I called instance)(SteamLobby instance;). then in the awake function I check if instance is null and if it is I set instance = this.
I don't get which is the difference between this video and this ua-cam.com/video/7Eoc8U8TWa8/v-deo.html
You are creating a lobby with steamworks but in different ways is that correct?
I love your videos but I also don't get the right order of your videos....
This current video is about matchmaking. so its essentially a lobby browser.
whereas the other video was how to set up lobbies/ how to create them. If you;re looking at the order just go in the order that they were uploaded in or in the playlist. you can sort the playlist by upload date too
@@ZygerGFX Yeah I see but all videos seems not to extend the videos before instead it feels like a closed environment (sorry for my bad englisch, Im not a native speaker).
I dont know if you got me but very difficult to look each video and extend the work what I did before with the content of the new video because this new video start at zero again
can we use this steamworks server for android game to be published on playstore instead of steam?
No. This is steam only. Since it runs of of steam
@@ZygerGFX Oh, that's sad, any way thank you. can you make tutorial for unity gaming services,
* netcode for gameobjects
* lobby
* relay
* making server using netcode for gameobject
Love it zyger
thank you
I was looking forward for the next tutorial, thank you Zyger! :)
np thanks for watching :))
Please make full multiplayer series in unity using photon, this will increases your no. Of views