Steam Multiplayer in Unity - Quick setup (Tutorial)

Sdílet
Vložit
  • čas přidán 29. 12. 2023
  • How to setup Steam: • Implement Steam in Uni...
    In this video we are looking into the core of networking your game with Steam. Here we make a simple connection to other players utilizing the Steamworks relay solution which is free to all developers!
    It is as easy as just connecting to the CSteamID, and they even have a friend code (hexcode) for you to use.
    Don't forget to like, comment, and subscribe for more Unity tutorials! 👍🎮🚀
    Steam Heathens:
    kb.heathen.group/assets/steam...
    Join the Bobsi discord: / discord
    Join the Heathens discord: / discord
    If you have any questions, leave them in the comments and I'll try my best to help you.
    A like, comment and perhaps a subscription with the bell notifications turned on, is very much appreciated! But I love you anyway for just watching :)

Komentáře • 54

  • @BobsiTutorial
    @BobsiTutorial  Před 5 měsíci +4

    Will you be working on a Steam multiplayer game?
    Please let me know in the comments!
    Join the discord : discord.gg/HRfzz58NYk

    • @zanagi
      @zanagi Před 5 měsíci +1

      no but for now at least i know its possible :p

    • @BobsiTutorial
      @BobsiTutorial  Před 5 měsíci +1

      @@zanagi Haha, brilliant

  • @itsdakideli755
    @itsdakideli755 Před 5 měsíci +4

    Thanks to you i've started using unity.

  • @koam2410
    @koam2410 Před 5 měsíci +3

    I discovered your channel I subscribed, you are for me the reference for the unity multiplayer tutorial

  • @rootbindev
    @rootbindev Před 2 měsíci +1

    I subscribed

  • @eppl
    @eppl Před 4 měsíci +1

    Yo, Bobsi! Have you ever used photon fusion2? Because I would really need a tut on that and I love your tutorials

    • @BobsiTutorial
      @BobsiTutorial  Před 4 měsíci +1

      Heyo,
      Not really interested in working with Photon. Started with Pun2 back in the day.
      Photon quickly becomes expensive and if you want it performant you'd have to work on a lower coding level which I am not a fan of.

    • @eppl
      @eppl Před 4 měsíci

      Thank you! Do you recommend any networking solution? I see you use fishNet alot, is it global multiplayer by itself or do I need steamworks with it for example. I remember trying it once and I could only do local multiplayer.

    • @BobsiTutorial
      @BobsiTutorial  Před 4 měsíci +1

      @@eppl It can do any kind of multiplayer, but you are responsible for which networking transport to use.
      The advantage of systems like Photon, Alteruna and Coherence is that they handle the server stuff for you.
      Personally I like the freedom of FishNet to setup my own server stuff (or use an existing provider like Playflow or Hathora)

    • @eppl
      @eppl Před 4 měsíci +2

      Thank you man! You’re really helpful

  • @mechsquid2
    @mechsquid2 Před 5 měsíci

    Is there a unity version that is considered most stable for using with fishnet & heathen? Last time I tried prototyping with early 2022 and everything flew apart.

    • @BobsiTutorial
      @BobsiTutorial  Před 5 měsíci

      No, not that I know of. Any LTS after 2021, should be more than good. if something went wrong, it very likely could be something in the import not going right, Heathens not being allowed to pull the dependencies or alike.
      Next time feel free to drop by Heathens or my discord for help on the issue.

  • @LinesStudio55
    @LinesStudio55 Před 5 měsíci +2

    Hi Bobsi! I encountered a problem, when I compile my project and then launch it with Steam, the game crashes and space war starts on Steam, how can I fix this? Update: i've solved the problem by adding steam_appid.txt with "480" inside it to the game folder. Thanks for your content!

  • @globaldusk4412
    @globaldusk4412 Před 5 měsíci

    A new version of fishy steamworks came out a week ago and no longer uses steamAppID. I cant work out how to use this version for this tutorial. if i use the version you did will the game still work with modern steam?

    • @BobsiTutorial
      @BobsiTutorial  Před 5 měsíci +1

      Yes, it would still work. I believe for the new one you'd have to simply set it through code. I think this is done to avoid setting it in multiple places and keeping things consistent.

  • @arpatronik
    @arpatronik Před 10 dny

    mmm where do you place the navigation between scenes? also, I have two pc's with different accounts and to debug I launch the project in both sides, but... the Id of the ConnectedHostIDSetter is not valid. How can I test if it works?

    • @BobsiTutorial
      @BobsiTutorial  Před 10 dny

      Hmm interesting. Possibly Heathen has updated something. Maybe ask in their Discord?

  • @MemesChannel7531
    @MemesChannel7531 Před 5 měsíci

    Nice video but How do you get when they connect 2 or more people to show on the host the start button and then teleport to a scene. (Basic Multiplayer Movement)?

    • @BobsiTutorial
      @BobsiTutorial  Před 5 měsíci +2

      You just handle that on the host. The host sees when a connection comes and or is lost and keeps track of the amount of players. Once the desired amount of players are in, you can enable a "Start" button which just uses basic scene management to change the scene 🙂

    • @MemesChannel7531
      @MemesChannel7531 Před 5 měsíci

      First of all thanks for the reply to all of my comments, So i just use basic offline sceneManagement (how to transfer all players) So the other script is offline except the amount of players that i should use the steam or fishnet. (i had a break while writing this comment if it doesnt make sense please tell me)@@BobsiTutorial

    • @BobsiTutorial
      @BobsiTutorial  Před 5 měsíci

      @@MemesChannel7531 Well first off, you should likely watch my video on SceneManagement with FishNet, might give some help in of itself 🙂

    • @MemesChannel7531
      @MemesChannel7531 Před 5 měsíci

      I dont have the steam app id field on fishy steamworks@@BobsiTutorial

    • @MemesChannel7531
      @MemesChannel7531 Před 5 měsíci

      What did you used for scene stuff im a bit confused. I understood your video about FishNet Scene Managemet (very good tutorial keep it up) but how did you used that and you said you made it if it is done correctly.@@BobsiTutorial

  • @juanecraft0922
    @juanecraft0922 Před 4 měsíci

    Please make/explain that the players, once connected, enter the game and if, for example, one picks up an object, the other sees that he is picking it up.

    • @BobsiTutorial
      @BobsiTutorial  Před 4 měsíci +1

      What do you mean with explain this? I have plenty of videos on this stuff.

  • @iggyboyo
    @iggyboyo Před 17 dny

    Ok at 1:40 you mention the scene manager but nowhere in the video you explain what the code does. In the comments you said to another person that you explain about it in another video which you linked, however the video linked has no example of scene management at all. A lot of people on the discord are confused asking the same thing, and they either reach an answer but don't share it with others, or are left unanswered or with vague answers.
    I appreciate your content bobsi but a key piece of this tutorial is missing and it makes it impossible to follow it, since I can't host the game with the scene changing like you did in the video. if you could at least share the scene stuff script somewhere it could help us a lot

    • @BobsiTutorial
      @BobsiTutorial  Před 16 dny

      This is a Heathen Steamworks sponsored tutorial. The comment of which you are referring he is also asking about the connection starter, which is what I showcase in the video you mention.
      When I mention basic scene management, I absolutely mean basic scene management. It is just changing scenes using Unity scenemanager. No more logic to it.
      If I make each one of these videos expecting 0 prior understanding of unity development, they would have to be 20 - 30 minutes each to go over pre-existing concepts. And I can't offer that to a sponsorship, as that has nothing to do with their products.
      I appreciate your feedback, but I have to stick to my beliefs here that it is on people themselves to understand the concepts of the development process. I have an entire video on scene management, which I can greatly recommend you to watch, but that video is overkill for just Unity scenemanagement 🙂

  • @Domi_23
    @Domi_23 Před 5 měsíci

    can i use photon and steam together?

    • @BobsiTutorial
      @BobsiTutorial  Před 5 měsíci +1

      Well you'd likely be forced to use Photons servers, so no need for a Steam transport, but generally yes. The Steam layer and the networking layer don't interact otherwise than through the transport where needed.

    • @Domi_23
      @Domi_23 Před 5 měsíci

      thank u@@BobsiTutorial

  • @higiraynya3532
    @higiraynya3532 Před 4 měsíci

    How many people does this network system support?

    • @BobsiTutorial
      @BobsiTutorial  Před 4 měsíci

      I believe Steam does have a cap on bandwidth usage to avoid bad player experiences, but I've never reached it, so I don't know what it is.
      If you are talking about FishNet, there is limit other than your own abilities as a dev

    • @LodenHeathen
      @LodenHeathen Před 3 měsíci

      As I recall the technical limit of a Steam Lobby is 256, course you don't have to use Steam lobby to make multiplayer work, I don't recall seeing any defined limit for Steam Networking Sockets its self. The HLAPI you choose and your games architecture should be limiting you well before Steam Networking Sockets has any adverse impact

  • @andrewapodaca3576
    @andrewapodaca3576 Před 4 měsíci

    I feel like this video is expecting FAR too much knowledge to already be there. You have created and/or added too many objects without explaining what they are or how to get them in the scene. I do appreciate the content, but it would be really beneficial to get full instructions for the content (even if it's just a link to the contents or other instructions on how to do it in the description). I spent hours trying to research how to get and install Heathen and Fishnet and I'm still coming up short in following this tutorial because I don't know what the Steamworks object is or where to get the Setttings listed in your video (not available in my project).

    • @BobsiTutorial
      @BobsiTutorial  Před 4 měsíci +2

      Did you watch the initial video of the Heathens playlist? That should be enough on getting you set up and running in just a few minutes. I am a little confused/taken back by the feedback as the only expectations are:
      - Heathens setup (First video)
      - Basic Unity Knowledge
      Please do let me know if I've missed something. We can't cater to people not having an understanding prior of Unity as there is no point in setting up Steamworks at that point ^^

    • @andrewapodaca3576
      @andrewapodaca3576 Před 4 měsíci

      @@BobsiTutorial I did not mean for my comment to sound as negative as it did, it's a comment from frustration because I'm an experienced software developer and could not follow your tutorial for lack of information. I wasn't aware of the Heathens setup video, I spent a good hour or two looking through the Heathens KB article and was barely able to figure out how to get that installed. Like I said, I do appreciate the information you've shown, this has been the best tutorial I've found for steam networking in Unity thus far, it just feels incomplete. I will go search for and watch that video but I expect it won't have the fishnet setup that you didn't include in this video.

    • @BobsiTutorial
      @BobsiTutorial  Před 4 měsíci +1

      @@andrewapodaca3576 I hear you. Link to the setup video is now added to the top of the description. The feedback is much appreciated! I didn't take it with much negativity, more so constructive ^^

    • @andrewapodaca3576
      @andrewapodaca3576 Před 4 měsíci

      @@BobsiTutorial Do you have a video on what you did to setup your ConnectionManager SceneStuff script?

    • @BobsiTutorial
      @BobsiTutorial  Před 4 měsíci

      @@andrewapodaca3576 Yeah, that is in my video on how my setup with FishNet is 😀