Game Loop & Leaderboard | How to Make a Multiplayer Game With Fusion 2 - Part 2

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 25

  • @PhotonEngine
    @PhotonEngine  7 місяців тому +4

    Thanks for watching!
    Watch Part 3: ua-cam.com/video/Wa0Xw-6JiUc/v-deo.html
    Download the Post-Video 1 Project: doc.photonengine.com/fusion/current/tutorials/multi-climb#download-part-1
    Download Simple KCC: dev-doc.photonengine.com/fusion/current/addons/simple-kcc#download-addon
    Download Advanced KCC: dev-doc.photonengine.com/fusion/current/addons/advanced-kcc/download#download-addon
    Tutorial Series Playlist: ua-cam.com/play/PLAkOwsOxpAvriKhkf8LQKB9DPONAfSEya.html
    Further Reading:
    ► Change Detection: dev-doc.photonengine.com/fusion/current/manual/data-transfer/change-detection
    ► Client Prediction & Resimulation/Reconciliation: doc.photonengine.com/fusion/current/concepts-and-patterns/network-simulation-loop
    ► Input Smoothing: doc.photonengine.com/fusion/current/addons/advanced-kcc/input-smoothing

  • @Malonik
    @Malonik 4 місяці тому +2

    If you run into an issue where your blocks are invisible you need to install blender and associate .blend files with it. You can see this error on the block brefab in the import log. :)

    • @PhotonEngine
      @PhotonEngine  13 днів тому

      Thanks for sharing this solution!

  • @BadBanana
    @BadBanana 5 місяців тому

    I'm very much looking forward to seeing how you handle player interaction between each other
    Especially the caging technique
    With it I surmise I'll be able to apply the knowledge and complete my small game.im working on from these tutorials
    It's very good the way your explaining everything step by step
    What things do
    Why they do them.
    How they do them
    It's teaching me a lot about photon fusion 2
    I come from pun 2 so there's a lot in here that I'm familiar with but at the same time there's a lot that Is totally different and the syntax has changed a lot
    (Obviously)
    So thank you Tom
    Please release the next few modules sir
    I'm stuck adding new things my own way and wonder entirely if there's a more professional way to do them
    I surmise you'll show me jist how long winded I'm being with my.code when I see the next module.

    • @PhotonEngine
      @PhotonEngine  5 місяців тому

      Thanks for watching, we're glad you're finding the videos helpful! Caging, along with the other combat abilities, will be covered in the fourth video, so unfortunately you'll have to wait a little longer for that. Sorry for the inconvenience!

  • @BadBanana
    @BadBanana 7 місяців тому +1

    Ah finally
    Thanks I'll continue haha ❤❤

  • @paranormalgamesstudios
    @paranormalgamesstudios 5 місяців тому

    Whats a good solution to test faster? Building to test takes a long time.

  • @drewltinder9872
    @drewltinder9872 5 місяців тому

    Should people from outside my network already be able to connect at this point if I've set up port forwarding? I have all of the steps in this video completed, and have successfully joined a session with 3 devices in my house, which of course are also NATed behind my router. However, I have tried for quite a while to get it so a friend can connect and had no luck. I am setting up the lobby as host, I have router set to allow all the default port listed in the documentation. I have tried ports 5055, 5056, 5056, 2700, 27001, 27001, as well as opening them all at once and it fails to work. Additionally, we have each specifically whitelisted the game executable on our firewalls. Any advice on what I may be doing wrong?

    • @PhotonEngine
      @PhotonEngine  5 місяців тому +1

      You can always connect to a session with Fusion. Even when behind a NAT and when NAT Punch fails Fusion will use the fallback cloud relay to connect. It's hard to tell what exactly went wrong in your specific case without seeing the logs. Most likely your friend connected to a different Fusion region (you can test this by hard coding a region into the PhotonAppSettings).

    • @drewltinder9872
      @drewltinder9872 5 місяців тому

      @@PhotonEngine Thank you very much for the reply! I'm in the Western US and my friends are in the Eastern US, so your theory is likely correct!

  • @crossxn7592
    @crossxn7592 7 місяців тому

    great tutorial

  • @CritterIslandRPG
    @CritterIslandRPG 3 місяці тому

    Great tutorial! Quick question, the teleport function doesn't work for me when called from a Coroutine or within Update().
    I'm using a round timer and would like to reset all player positions back to spawn if the timer runs out. Any tips for this?

    • @CritterIslandRPG
      @CritterIslandRPG 3 місяці тому

      Sorry, I see that it has to be called from the FixedUpdateNetwork(). It's working now.

    • @PhotonEngine
      @PhotonEngine  13 днів тому

      NetworkTransform.Teleport _should_ also work outside of FixedUpdateNetwork (although you may have to update the Fusion SDK version to the latest one as there was a fix related to this a few months ago).

  • @trash2treasure786
    @trash2treasure786 6 місяців тому

    good tutorial , where is part 3

    • @PhotonEngine
      @PhotonEngine  6 місяців тому +1

      Part 3 is still being worked on.

    • @PhotonEngine
      @PhotonEngine  5 місяців тому +1

      You can now watch part 3 here: ua-cam.com/video/Wa0Xw-6JiUc/v-deo.html

  • @imspikey
    @imspikey 4 місяці тому

    the mouse is running well on the host but its stuck or resetting on the client ?!!! although I have written the same code??!!

    • @imspikey
      @imspikey 4 місяці тому

      Ok I fixed the problem.

    • @Swanthie
      @Swanthie 16 днів тому

      @@imspikey I have the same problem, how did you solve it ?

  • @錘哥雜談
    @錘哥雜談 4 місяці тому

    why so many error ? like: Assets\Photon\Fusion\Runtime\FusionStats.cs(6,9): error CS0246: Assets\Photon\Fusion\Runtime\FusionStatsGraph.cs(5,9): error CS0246:Assets\Photon\Fusion\Runtime\FusionStatsObjectIds.cs(130,10): error CS0538: -----IFusionStatsView is not Interface \ StatsInternal FusionStatsUtilities IFusionStatsView ................is not viad. total 23 errors unity 2022.3.3.34 or 2022.2.19

  • @imspikey
    @imspikey 3 місяці тому

    this line I guess will make may unnecessarily calls :
    if(gameState == GameState.Playing && !Runner.IsResimulation )
    UiManager.Singelton.UpdatLeaderboared(players.OrderByDescending(
    p=> p.Value.Score).ToArray());
    Since It will be run on server, client and proxies ??!!! why should it run on proxies isn't one enough to run on each pro??!!!!

    • @PhotonEngine
      @PhotonEngine  13 днів тому

      _"why should it run on proxies isn't one enough to run on each pro??!!!!"_
      I'm not sure I understand the issue-this code is in the GameLogic class's FixedUpdateNetwork method. There is _only one_ GameLogic instance per host/client, so there are no proxy instances of this class that it could run on.
      Yes, it makes a call to UpdateLeaderboard every tick which may be considered excessive (as I mentioned in the video), but it is _not_ calling it "on proxies"/multiple times per tick as you appear to have assumed.