Tutorial: Online multiplayer 🔫 FPS Unity & Photon Fusion EP1.1 (Fusion setup + movement)

Поделиться
HTML-код
  • Опубликовано: 21 сен 2024

Комментарии • 220

  • @PrettyFlyGames
    @PrettyFlyGames  7 месяцев назад +5

    This tutorial will not work for Photon Fusion 2.0 which isn't fully released yet (it is in release candidate mode). You can download the 1.1.8 SDK here doc.photonengine.com/fusion/v1/getting-started/sdk-download

  • @fenthwik
    @fenthwik 2 года назад +30

    seriously thank you so much, Photon makes incredible networking APIs but those geniuses don't know how to make a tutorial to save their life :') I was losing my mind trying to wrap my head around some of this stuff!

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад +1

      Thank you for your kind words and glad that you liked the tutorial.

    • @Jicefrost
      @Jicefrost Год назад

      @@PrettyFlyGames agreed with him. youre tutorials are the best!

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      @@Jicefrost Thanks 🙏

    • @theplaymakerno1
      @theplaymakerno1 Год назад

      Their documentation is terrible. I believe they will help enterprises or something.

  • @notrain5455
    @notrain5455 Год назад +5

    I'm new in game programming, all I have done was a lil 2D RPG learning the basics.
    Not only your tutorial is very clear and really shows how to code with Fusion, but you also explain everything and show great structure things
    In addition to this, you also hint more stuff we can look for : you said we could communicate to the serv our inputs using bits, so I looked that up and made it !
    Thanks a lot !
    You sure is a real chad, you're helping people like me getting real solid bases and achieving their dream of following the game dev path.

  • @kwanhofu2968
    @kwanhofu2968 8 месяцев назад +1

    Man this series so helpful this is what i have been looking for! Love you

    • @PrettyFlyGames
      @PrettyFlyGames  8 месяцев назад

      Glad to hear it 😍

    • @kwanhofu2968
      @kwanhofu2968 8 месяцев назад

      now is photon 2.0.....I tried to type exact same thing but it wont work anymore,,,what should i do x.x@@PrettyFlyGames

    • @PrettyFlyGames
      @PrettyFlyGames  8 месяцев назад

      @@kwanhofu2968 This tutorial will not work for Photon Fusion 2.0 which isn't fully released yet (it is in release candidate mode). You can download the 1.1.8 SDK here doc.photonengine.com/fusion/v1/getting-started/sdk-download

  • @MatteoMezzetti-g5b
    @MatteoMezzetti-g5b Год назад

    Probably the best tutorial for fusion and from scratch setup out there. thank you

  • @sclexz
    @sclexz Год назад +1

    THANK YOU! I can finally learn photon fusion :)

  • @christopherrapczynski204
    @christopherrapczynski204 2 года назад +1

    excellent tutorial, thank you for making this, it's exactly what I needed.

  • @rikomamadesu
    @rikomamadesu 2 года назад +2

    thanks for the nice tuts. Please make more !

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      Thanks! Yes, working on several additional ones.

  • @GeDruchy
    @GeDruchy 2 года назад

    Great tutorial here Pretty Fly Games. Clear and concise, and goes into detail without getting caught up in the weeds.
    Question: What do you use as a backup/version control solution? Git seems to dislike unity

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      Glad that you liked it. I use Git and also a plain zip backup for releases. I haven't had any problems with it could potentially be a bit more of a problem if you work in a team with clashing commits etc.

    • @IFCreativefr
      @IFCreativefr Год назад +1

      just use plastic

  • @benjal1019
    @benjal1019 2 года назад +2

    Very cool video

  • @ironheadgamesvr
    @ironheadgamesvr Год назад +1

    Nice video

  • @GrayFoxware
    @GrayFoxware 9 месяцев назад

    Completed* Thank you

  • @TienTran-du3qs
    @TienTran-du3qs Год назад

    thank you :)). It's useful.

  • @thiagosoares7414
    @thiagosoares7414 Год назад +1

    My beloved, can I use this tuto and simply adapt to a third person instead first person?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад +1

      Yes, that is possible as many of the concepts will remain the same regardless of the camera mode.

  • @MarekM-w9n
    @MarekM-w9n 11 месяцев назад

    Thanks for the tutorial! I have a quastion: Why are using the old Input System and not the new one ?

    • @PrettyFlyGames
      @PrettyFlyGames  11 месяцев назад

      I personally like the old system more and in my own game projects I use Rewired which is similar to the old system.

  • @NotScaredOf
    @NotScaredOf Год назад +1

    Can you make a chat? I wanna add it, but I dont want to combine tutorials and mess it up.

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Thanks for the suggestion 👍 I'll add it to the request list

  • @chaosroninofmagic1055
    @chaosroninofmagic1055 2 года назад +1

    Thank u so much PreTTy Fly Games

  • @vinhlam1401
    @vinhlam1401 Год назад

    thank you!

  • @thejaplong
    @thejaplong Год назад +1

    just starting ... what unity template did you use ? thanks

  • @malitural8937
    @malitural8937 Год назад

    This videos are so helpful thank you!
    I have one question. How can i teleport my character to other places? I changed the transform but it's not working.
    Thanks for attention.

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад +1

      Only the host/server can change the position of a transform. If you want to trigger a teleport from a client you need to tell the the host/server that you want to teleport either through Network input or use a RPC call. The host/server then needs to change the position of the transform.

  • @igormoreiravilhena2917
    @igormoreiravilhena2917 11 месяцев назад

    Thanks!! Can you make some video using Navmesh instead charactercontroller? I'm almost finishing my game but now I need to make it multiplayer because I did it singleplayer, can you give me some advice?

    • @igormoreiravilhena2917
      @igormoreiravilhena2917 11 месяцев назад

      I managed to implement the navmesh with click to move but I just can move with the host, do you know how can I fix it?

    • @PrettyFlyGames
      @PrettyFlyGames  11 месяцев назад +1

      The navmesh should only be active on your host. The clients would then have the navmesh disabled and get the updates from the host about the position etc just as if it was a normal player.

  • @33marchewa
    @33marchewa 2 года назад +1

    yo, that's good

  • @SaifullahSadi-ws4dt
    @SaifullahSadi-ws4dt Год назад

    How to switch from multiplayer scene gameplay to other scene (simple + additive loading). please make video for this.

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Scene switching is covered here ruclips.net/video/3GBl1FDkC6g/видео.html

  • @GiantBean
    @GiantBean Год назад +1

    Did fusion change again? 1.1.6 doesn't seem to load the DontDestroyOnLoad assets. I have checked and quadruple-checked that I am doing things as you have done but nothing works.

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Seems to work just fine for me. You can try the code from this episode which uses DonDestroy assets ruclips.net/video/3GBl1FDkC6g/видео.html

  • @impartialphoenix261
    @impartialphoenix261 7 месяцев назад +1

    After finishing the spawning objects segment, I run the game and it seems to launch but then it instantly shuts down. There are no errors or warnings, it just says server runner started and server shutdown

    • @PrettyFlyGames
      @PrettyFlyGames  7 месяцев назад +1

      Did you add your appID and are you using Photon Fusion 1.x? doc.photonengine.com/fusion/v1/getting-started/sdk-download

    • @impartialphoenix261
      @impartialphoenix261 6 месяцев назад

      Yes I did, that fixed it. Thank you so much!@@PrettyFlyGames

    • @PrettyFlyGames
      @PrettyFlyGames  6 месяцев назад

      @@impartialphoenix261 Great!

  • @БДжигун
    @БДжигун 3 месяца назад

    What do i do when player object doesnt seem to react to anything at all? The network runner and simulation is working fine, but player spawns and is just stuck in air

    • @PrettyFlyGames
      @PrettyFlyGames  3 месяца назад

      You'll need to figure out what is happening and why. You can inspect the network objects in Unity and ensure that they have a input authority and that it matches the player that is supposed to control it. Also verify that the state authority actually has authority over the object using the same method.

  • @Snape-l6x
    @Snape-l6x Год назад

    Hey thanks so much for creating such a thorough tutorial. When I try to run the completed episode project the editor version works as expected but when I add other clients by building the project they don't seem to join the game. Can you think of any reason why this might be the case?

    • @Snape-l6x
      @Snape-l6x Год назад

      I've used my own Fusion app key and the error I get in the client Development Console is: DllNotFoundException: nanosockets assembly: type: member:(null)

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      What OS are you running? Mac?

    • @Snape-l6x
      @Snape-l6x Год назад

      @@PrettyFlyGames yes I’m on Mac

  • @youngboii6393
    @youngboii6393 Год назад

    Thanks for the video it's very helpful. But I have a problem when when I let the first player in, the camera is pointing right at the first player. But when the second player appears, the first player's camera is pointed at the second player, and the second player's camera is fine (still pointing at the second player). Do you have any solution?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Hi!
      Yes, that is expected after the first video. Keep watching the series and that problem will go away :D
      ruclips.net/video/ndL1siRSBg8/видео.html

  • @RocketManEqHuoJian5
    @RocketManEqHuoJian5 5 месяцев назад

    Friend, I wanna know which one is better? Photon fusion or Netcode? cus I need to choose one to learn deeply. thanks

    • @PrettyFlyGames
      @PrettyFlyGames  5 месяцев назад

      Really depends on your project and needs. What kind of game are you making?

    • @RocketManEqHuoJian5
      @RocketManEqHuoJian5 5 месяцев назад

      @@PrettyFlyGames I really don't know. I just learn Unity recently. Perhaps you can tell me which types of projects photon fusion and network coding are suitable for each. very appreciate that.

    • @PrettyFlyGames
      @PrettyFlyGames  5 месяцев назад +1

      ​@@RocketManEqHuoJian5 if you have learnt Unity recently then I'd focus on making a couple of simple single player games first. Multiplayer is 10x more complex than making a single player game and it helps a lot to gain experience from the offline first.
      In general I'd say that you can use Photon Fusion & Netcode in similar scenarios: FPS games & games with fast moving parts. If you are looking at making a larger scale game then both of them will require servers which makes things complex fast.
      Another option is Quantum which doesn't need a server and is suitable for MOBA, top down style games, racing games etc.
      Which one to chose from is really up to your taste. Personally I'd probably go with either Quantum or Photon Fusion over Netcode.

    • @RocketManEqHuoJian5
      @RocketManEqHuoJian5 5 месяцев назад +1

      @@PrettyFlyGames very appreciate for your kindness sharing, I think I got it. you deserve a big thumb, really.

    • @PrettyFlyGames
      @PrettyFlyGames  5 месяцев назад

      @@RocketManEqHuoJian5 Thank you so much 🙏

  • @randomfandom53
    @randomfandom53 Год назад

    Is there a project that has the same exact things you start with? The linked project already has all the source filled out. I guess I can just delete as we create the files, but just curious. Thanks!

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      No, sorry there is only the ones with scripts. So you'll have to use your workaround, delete em all 💪

  • @morganw2535
    @morganw2535 Год назад

    On version 1.1.7 the networkRunner is built-in to the basicSpawner

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      The BasicSpawner is just a sample code in their getting started, right?

  • @botfred6505
    @botfred6505 Год назад +1

    Hey Bro please help, something is going wrong in
    if (runner.IsServer)
    {
    Debug.Log("OnplayerJoined we are server. Spawning player");
    runner.Spawn(playerprefab, Utils.GetRandomSpawnPoint(), Quaternion.identity, player);
    }
    There is a red line under Spawn
    it says:
    Assets\Scripts\Spawner.cs(21,20): error CS0311: The type 'NetworkPlayer' cannot be used as type parameter 'T' in the generic type or method 'NetworkRunner.Spawn(T, Vector3?, Quaternion?, PlayerRef?, NetworkRunner.OnBeforeSpawned, NetworkObjectPredictionKey?, bool)'. There is no implicit reference conversion from 'NetworkPlayer' to 'Fusion.SimulationBehaviour'.
    please help

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад +1

      Based on just that code I can't really tell what could cause that. Did you try the provided sample and compare it with your code? www.patreon.com/posts/multiplayer-fps-65725126

    • @botfred6505
      @botfred6505 Год назад +1

      @@PrettyFlyGames Thanks for you reply! I find out if you didn't write the NetworkPlayer script then your runner.Spawn will be error!

  • @medvfx3370
    @medvfx3370 2 года назад

    i have very laggy character movement. is there any way to fix this? it seems like the character is jumping between the old and new position while walking.
    Could you please provide some help?

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      Make sure that you complete this video first ruclips.net/video/ndL1siRSBg8/видео.html and then hopefully it will be better. You can also turn on client side prediction which will help the local client reduce lag.

  • @mohamadabdi8085
    @mohamadabdi8085 6 месяцев назад

    @PrettyFlyGames I followed your tutorial up to the spawn part. When I hit play, the runner connects to the server but then it shuts down after maybe 5 seconds and it never spawns my player in the game. The DontDestroyOnLoad asset pops up and disapears quickly too. What do you think is the issue?

    • @PrettyFlyGames
      @PrettyFlyGames  6 месяцев назад

      Hard to tell, look at the logs and see what kind of error message was returned when the runner shutsdown.

  • @TayyabImtiaz-e2r
    @TayyabImtiaz-e2r 7 месяцев назад

    Not receiving the OnPlayerJoined callback after implementing the interface INetworkRunnerCallbacks. Can somebody point out what the problem might be?

    • @PrettyFlyGames
      @PrettyFlyGames  7 месяцев назад

      Place that script on the same object as your Network runner and it should work.

  • @naijavibes8893
    @naijavibes8893 Год назад

    pls can i use this tutorial for a third person game, if yes from which episode is this tutorial relevant

  • @kingofspades9720
    @kingofspades9720 Год назад

    Just wanted to let you know as of build 590 "Implicit cast of PlayerRef to bool is now marked as obsolete, will be removed in next stable release", so soon you will have to change your code for the Network player in the PlayerLeft function. If you know what the better code would be then let me know.

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Thanks! I'll have a look into what changes are required.

  • @AngelEspinoza-q3j
    @AngelEspinoza-q3j Год назад

    Hello, I wanted to know if it was not necessary to add the NetworkTransform component to the character

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      It is not necessary since we're using the networked character controller for that instead.

  • @DaviResio
    @DaviResio 2 года назад +1

    on 34:40 on my unity, NetworkPlayer has been deprecated and removed by unity.
    Has any altenative?

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      That error message is caused because the VS thinks you are trying the use Unitys own NetworkPlayer. Did you add using Fusion at the top of the script?
      Also try the sample project and compare your code with that www.patreon.com/posts/multiplayer-fps-65725126

  • @K1ngCaden
    @K1ngCaden Год назад +1

    I dont have the weaver error. did i do anything wrong? unity version 2021.3.17f1

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Be happy 😃 They have probably fixed this by now.

  • @InfernalHedgehog
    @InfernalHedgehog 6 дней назад

    At 6:41 i get the error:
    Assets\Scripts\Network\NetworkRunnerHandler.cs(23,110): error CS1503: Argument 4: cannot convert from 'int' to 'Fusion.SceneRef'
    Please could you help fix this?

    • @InfernalHedgehog
      @InfernalHedgehog 6 дней назад

      I also get another one saying:
      Assets\Scripts\Network\NetworkRunnerHandler.cs(45,13): error CS0117: 'StartGameArgs' does not contain a definition for 'Initialized'

  • @EthanMakesThings
    @EthanMakesThings Год назад

    Hey. Do you know how you can make it third person. can you provide steps please?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Hey there!
      I've been working on a new episode covering this. The code is just done for the episode but the video is not recorded yet, it will take a few days. If you can't wait until then you can get Early Access to the code: www.patreon.com/posts/87190812

  • @anacarolinavazpintopereira4335

    Hello! I'm following your video to make my first FPS game. However, I keep getting an error telling me that the NetworkPlayer is obsolete. Is there any alternatives to this? Or any solution?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад +1

      Hello!
      That is probably due to a typo in your code. Make sure that you have using Fusion; in the top of your code when ever you are going to use NetworkPlayer . You can download the example project here: www.patreon.com/posts/multiplayer-fps-65725126

  • @nerd5386
    @nerd5386 Месяц назад

    why does start game args not have a option for initalized??

    • @PrettyFlyGames
      @PrettyFlyGames  Месяц назад

      It is because this tutorial is for Photon Fusion 1.x and things are slightly different in Photon Fusion 2.x. Have a look at this upgrade video ruclips.net/video/RQWyVaEjC3Q/видео.html

  • @ronwelch749
    @ronwelch749 Год назад

    My player view rotations are hideously slow and jerky in the editor, but work fine on a build. Any Ideas? I'm using 2021.3.12f1. :)

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Hi Ron
      Yes, that would be expected in EP1. What EP 2 where better camera handling is covered ruclips.net/video/ndL1siRSBg8/видео.html

  • @education2.098
    @education2.098 2 года назад +2

    at 8:50 i didn't get any errors, do I still install the package? or....???/

    • @education2.098
      @education2.098 2 года назад +2

      Nice Video btw

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад +1

      The have probably fixed this now so if you don’t get any errors you can just skip it.

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад +1

      @@education2.098 thanks 🙏

  • @fundaavc1639
    @fundaavc1639 Год назад

    I'm using a ready-made character pack. How does this integrate with Fusion? There is no information about this in the documentation. Previously, is Mine control was provided with Pun2.

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      How to add ready made models are covered a bit later in the series ruclips.net/video/7TWOeszsTUw/видео.html
      In Photon Fusion you use Object.HasInputAuthority instead of IsMine.

    • @fundaavc1639
      @fundaavc1639 Год назад

      @@PrettyFlyGames These are very simple packages, do I have to enter each code one by one for the (STP )PolymingGames package?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      @@fundaavc1639 I'm not familiar with that package so it is hard to say. It depends on how they made the models and animations really.

  • @PrettyFlyGames
    @PrettyFlyGames  2 года назад +5

    This is the same video as EP1 ruclips.net/video/hqIZCoLHOig/видео.html but with Photon Fusion SDK 1.1 instead.

  • @simonesolaroli9644
    @simonesolaroli9644 2 года назад

    Hi, in the part where i use the GetInput function it says this
    The type 'NetworkInputData' must be valid unmanaged type (simple numeric, 'bool', 'char', 'void', enumeration type or struct type with all fields of unmanaged types at any level of nesting) in order to use it as a type argument for 'T' parameter
    I'm not using the character controller prototype, because I'm making a 2d game, is that the problem?

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад +1

      How does your NetworkInputData struct look?

    • @tunacelik5367
      @tunacelik5367 8 месяцев назад

      It seems you might have intended to declare 'NetworkInputData' as a struct instead of a class

  • @Spyboi666
    @Spyboi666 Год назад

    switched from litenetlib and boii I have so many questions lol

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      The learning curve is sort of steep but it is worth it 👍

  • @neilfosteronly
    @neilfosteronly 2 года назад

    After and before installing the Mono Cecil package I get an error. The error is "Plugin Mismatch requested = 'FusionPlugin' got= 'Default' (ErrorCode :32751) " Any idea on what is causing this? The Network runner starts. But then is destroyed instead of going to DontDestroyOnLoad.

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад +1

      You need to use a AppId which is a Photon Fusion AppId. So make sure that you create the correct AppId on the Photon Dashboard. Most likely you are trying to use a PUN or something else appID.

    • @neilfosteronly
      @neilfosteronly 2 года назад

      @@PrettyFlyGames Ya it was that I set it up with App ID from a PUN test I had done long ago. Just changed to Fusion ID and worked. Thanks.

  • @NotScaredOf
    @NotScaredOf Год назад

    In 1.17 theres no weaving problems, at least for me, so do I skip that part?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      You can skip that if you don't have any weaving problems. They've probably fixed this.

  • @alinazhuang904
    @alinazhuang904 2 года назад

    Could you make a tutorial about how to run dedicated server with photon fusion on playFab?

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад +2

      Yes, I have plans for a dedicated server tutorial and might be able to combine it with playFab.

    • @alinazhuang904
      @alinazhuang904 2 года назад

      @@PrettyFlyGames thanks for your reply! Do you recommend in playfab or AWS gamelift?

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      @@alinazhuang904 I've only tried AWS and Azure for some tiny projects and both of them works well but I haven't spent enough time with either to really make any recommendations.

    • @alinazhuang904
      @alinazhuang904 2 года назад

      @@PrettyFlyGames thanks, would you also consider to combine the tutorial with AWS?
      I tried playFab but there is no game server region around Asia. So I might have to use AWS

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      @@alinazhuang904 we'll see. However AWS isn't really different from other hosting, you get a server and you launch your games server on it.

  • @chaosroninofmagic1055
    @chaosroninofmagic1055 2 года назад

    where did you found Iplayerleft i try to find it on api but there is nothing

  • @Elliotbra
    @Elliotbra Год назад

    In the Network Runner Handler Script(until 8:24), i copied the exact script as you have, but at line 24 and 43 there are still errors

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад +1

      What does the errors say?

    • @Elliotbra
      @Elliotbra Год назад +1

      @@PrettyFlyGames Nevermind, I just had to rename some things

  • @숙회지
    @숙회지 2 года назад +1

    29:23 I have a problem to "GetInput" word, that wasn't permit return "null". CS8377
    i perfectly written script.
    plz help me. ㅠㅠ

    • @숙회지
      @숙회지 2 года назад +1

      Oh.. i solved that. thanks for video!

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      You are welcome and glad that you solved it.

    • @protato.O
      @protato.O Год назад

      @숙회지 how did u solve it? i am getting the same error T^T

    • @숙회지
      @숙회지 Год назад

      @@protato.O i put in there like that! ------
      if(GetInput(out var networkInputData))

  • @FakeDani69
    @FakeDani69 2 года назад

    Is there any extension for Photon Fusion or will i have to manually type every fuction bymself :( thanks

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад +1

      I'm not sure what you mean? Do you want some solution for Fusion that doesn't require you to code?

    • @FakeDani69
      @FakeDani69 2 года назад

      @@PrettyFlyGames ​ @Pretty Fly Games no, like we have for Unity in visual studio extensions. so if we type the starting of a function it can suggest the function you are looking for! I am reffering to the (protected virtual Task InitializedNetworkRunner(NetworkRunner runner, GameMode gameMode, NetAddress address,SceneRef scene,Action initialized)) fuction as we have to type everything itself! just asking if there is anything like it?

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      @@FakeDani69 ahh I'm not sure. IntelliSense sees to be working pretty well for me but you might want to reach out to the Photon Team and check with them.

  • @QuarkStrange-wj4ku
    @QuarkStrange-wj4ku Год назад

    I want to save the player registration information and various data such as prop information to the database, how can I do it?(Develop multiplayer games with fusion)

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      This tutorial series is for beginners and databases is a bit to much to cover. The question is also very generic but you can save any data you like from Photon Fusion to a database or a file.

    • @QuarkStrange-wj4ku
      @QuarkStrange-wj4ku Год назад +1

      @@PrettyFlyGames Thank you, I haven't had time to study your tutorials yet, I plan to take some time to study your tutorials seriously in the near future, I am a beginner of "fusion", and I have only studied the basic function teaching given by the official. Thank you in advance for taking a tutorial for this!!!

  • @leehobbs4778
    @leehobbs4778 2 года назад

    Getting a strange issue where the spawn point vector3 (GetRandomSpawnPoint) is always doubled - Checking the numbers with Debug log and (-18,1,14) is spawning at (-36,2,28)
    Any ideas?

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      Is tthe value from GetRandomSpawnPoint doubled meaning you log the value right after you get it or is the character spawned at another location?
      If the problem is with that the character is being respawned in a different location then that is addressed in later videos. The respawn code was improved.
      If the problem is that the Utils.GetRandomSpawnPoint returns 2x what you expect then it is something in the function that is causing it.

    • @leehobbs4778
      @leehobbs4778 2 года назад +1

      @@PrettyFlyGames I'm logging the vector after its generated (first numbers) and then checking the spawn location (second numbers) which is different

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад +1

      @@leehobbs4778 right! So I think that this is caused by the spawn code itself and it is improved in a later video ruclips.net/video/gxhG9BHcxmc/видео.html
      Let me know if that fixes it.

    • @leehobbs4778
      @leehobbs4778 2 года назад

      @@PrettyFlyGames awesome, cheers. I've set the utils function to halve the vector for now, but will keep on. Cheers

  • @ginoantenucci6424
    @ginoantenucci6424 Год назад +1

    After multiplayer I don’t think I have a brain any more

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад +1

      Haha, yeah it can feel that way sometimes. Just take it bit by bit and don't stress. Eventually it will feel better but weird shit will always happen in multiplayer 😁

  • @cube-king
    @cube-king Год назад

    Hello, my inputs are moving only the host. Is there a fix for this?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      You probably have some kind of typo or similar in your code. You can download the example code here: www.patreon.com/posts/multiplayer-fps-65725126

  • @freemanchaosm2310
    @freemanchaosm2310 Год назад +1

    at 10:50 , this bug is fixed i think i dont had it ^^

  • @檸檬紅茶-b5l
    @檸檬紅茶-b5l Год назад

    When I connect to the second character, I am controlling the movement of the first player. What is happening?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      That is expected on the first episode. Keep on watching (the fix for the problem is in EP2)

    • @檸檬紅茶-b5l
      @檸檬紅茶-b5l Год назад

      @@PrettyFlyGames Thank you for your response

  • @joshuaohara7704
    @joshuaohara7704 2 года назад

    Will you be showing how to host this game online?

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      Hello!
      You mean like running a server online? My plan currently is to create a smaller game for that which runs in server/client mode only.

    • @joshuaohara7704
      @joshuaohara7704 2 года назад

      @@PrettyFlyGames Awesome! Struggling to grasp the implementation for dedicated server in the fusion docs. A thorough tutorial would be fantastic. Is this coming in the near future? Thanks again!

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      I'm sorry but I have to say that I don't know. I'm quite swamped currently with my own projects and a bunch of requests for features in the current tutorials.

  • @NotScaredOf
    @NotScaredOf Год назад

    I am at 29 minutes and the chatacter movement handler has a line where GetInput doesnt work, I have tried comparing it and it hasnt worked, not even copy and paste the code helped, do you know the problem?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      What doesn’t work? Does it give any error?

    • @NotScaredOf
      @NotScaredOf Год назад

      @PrettyFlyGames Yes it states " The type 'NetworkInputData' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'NetworkBehaviour.GetInput(out T)'.

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      @@NotScaredOf make sure that it is a struct and not a class. You can download the project with code here: www.patreon.com/posts/tutorial-how-to-83543734

    • @NotScaredOf
      @NotScaredOf Год назад

      How so you make it a struct?

    • @NotScaredOf
      @NotScaredOf Год назад

      It tells me to put the same if () inside of in it and write return; is this a fix?
      If(getInput(Out NetworkInputData networkInputData) [
      If(getInput(Out NetworkInputData networkInputData) [
      Return;
      ]]

  • @Elliotbra
    @Elliotbra Год назад

    My NetworkRunner doesnt spawn the player prefab. What should I do?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Download the sample project and compare your setup with that www.patreon.com/posts/multiplayer-fps-65725126

    • @hawkeyejal2426
      @hawkeyejal2426 Год назад

      i am having the same problem I compared and havent found any difference

  • @jamesshu5599
    @jamesshu5599 7 месяцев назад

    not clear how others can join the game build that gets deployed

    • @PrettyFlyGames
      @PrettyFlyGames  7 месяцев назад +1

      I'm not sure that I understand your question? Do you mean how others connect to your game or how you host it as a dedicated server?

    • @jamesshu5599
      @jamesshu5599 7 месяцев назад

      How do others connect to the game in your tutorial?@@PrettyFlyGames

    • @PrettyFlyGames
      @PrettyFlyGames  7 месяцев назад

      @@jamesshu5599 one of the computers becomes the host and the other connects as a client. When you call StartGame the computers connect and if you use the option Autohost then the first computer that connects becomes the host. When the other computers call StartGame they become clients. Photon Fusions handles all the other connection parts for you.

  • @flutterdev8855
    @flutterdev8855 Год назад

    have anyone worked on the Photon Fusion dedicated server build?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Yes, I have a whole tutorial series about that ruclips.net/video/a1o3Atye6oA/видео.html

    • @flutterdev8855
      @flutterdev8855 Год назад

      @@PrettyFlyGames thanks I will check,
      Should we use Navmesh on the network moveable characters but the issue is opponent is not against me in my game play and vice-versa

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      @@flutterdev8855 you can use Navmeshes on the AI. However it should just be enabled on the host/server side of the code.

    • @flutterdev8855
      @flutterdev8855 Год назад

      @@PrettyFlyGames Sure, thanks. also here the issue is not able to sync the characters between twosides as I am working on battle royale kind of game.

  • @pqqq2298
    @pqqq2298 2 года назад

    21:08
    I get the same error, but it's not solved in the same way...

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      Do you mean the error "This object hasn't been baked yet"?

  • @refactoringg
    @refactoringg Год назад

    30:43 timestamp

  • @NotScaredOf
    @NotScaredOf Год назад

    5:12 is it -- or ==?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад +1

      ==
      You do know that you can download the code from there, right?
      www.patreon.com/posts/multiplayer-fps-65725126

  • @itsdonix
    @itsdonix 7 месяцев назад

    so were just gonna watch you copy and paste for 56 minutes?

    • @PrettyFlyGames
      @PrettyFlyGames  7 месяцев назад

      It is the way that I've selected to teach gamedev. I paste the code and I explain it. I could be typing the code but that would probably take like 2x the amount of time and give little to no benefit.

    • @itsdonix
      @itsdonix 7 месяцев назад

      @@PrettyFlyGames (like im not hating, im sorry if it sounded like that) but i feel like if you copy and paste you should leave the source code or something

    • @PrettyFlyGames
      @PrettyFlyGames  7 месяцев назад

      @@itsdonix 👍 The source code is available here www.patreon.com/prettyflygames

    • @itsdonix
      @itsdonix 7 месяцев назад

      @@PrettyFlyGames why not just github tho?

  • @HowIsYourPc.123
    @HowIsYourPc.123 3 месяца назад

    hi sir i need ur help sir pleeasee say yes
    pleaseee

    • @PrettyFlyGames
      @PrettyFlyGames  3 месяца назад

      Sure, join or Discord to get assistance discord.gg/AyYtKXT

    • @HowIsYourPc.123
      @HowIsYourPc.123 3 месяца назад

      @@PrettyFlyGames thanks sir

  • @shigee
    @shigee 2 года назад

    bro i swear networking just never works for me

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      Haha, yeah it can feel that way sometimes. Did the tutorial not work for you?

  • @lth000
    @lth000 Год назад

    Am I the only one with the [Type:0x000001] System.InvalidOperationException?

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      Not heard anyone else with that problem. When does it happen?

    • @lth000
      @lth000 Год назад

      @@PrettyFlyGames An error occurs when you assign and play NetworkPlayerPrefab to Spawner, and Prefab is not automatically registered in Fusion - Network ProjectConfig. It seems that the GUID of the NetworkObject prefab is not recognized.

    • @PrettyFlyGames
      @PrettyFlyGames  Год назад

      @@lth000 you can try to rebuild the object table. Just go to the top menu and under Fusion select "Rebuild Object Table" if that doesn't solve it I would contact Photon Fusion and ask them about it.

    • @lth000
      @lth000 Год назад

      @@PrettyFlyGames I've tried it many times already I've asked the Photon team, too!

    • @lth000
      @lth000 Год назад

      @@PrettyFlyGames I think the current possibility is that the prefab should be in the path where the prefabs of the photon sample project are located..? (Assets/Photon/Fusion/Scripts/Prototyping/Prefabs)

  • @sweshi5240
    @sweshi5240 2 года назад

    Hey Dude Im having a problem when wirting the "runner.Spawn()" line
    This is my code: runner.Spawn(playerPrefab, Utils.GetRandomSpawnPoint(), Quaternion.identity, player);
    "Spawn" is underlined in red implying that it is an error obviously
    Here is the error:
    "The type 'NetworkPlayer' cannot be used as type parameter 'T' in the generic type or method 'NetworkRunner.Spawn(T, Vector3?, Quaternion?, PlayerRef?, NetworkRunner.OnBeforeSpawned, NetworkObjectPredictionKey?, bool)'. There is no implicit reference conversion from 'NetworkPlayer' to 'Fusion.SimulationBehaviour'. "

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      That does sound a bit strange, check the example project and compare it with your code www.patreon.com/posts/multiplayer-fps-65725126
      Let me know if that fixes it for you.

    • @sweshi5240
      @sweshi5240 2 года назад +1

      @@PrettyFlyGames Figured out the problem thanks!

    • @PrettyFlyGames
      @PrettyFlyGames  2 года назад

      @@sweshi5240 great!

    • @botfred6505
      @botfred6505 Год назад

      Dude how did you slove it? please tell me🤯