Multiplayer Chess in Unity! Photon Pun 2 Tutorial

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

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

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

    Thank for your tutorial. Keep it up!

  • @kamrantalib1630
    @kamrantalib1630 3 года назад +2

    Did not work for me , objects don't instantiate also facing error...................
    nputPosition) (at Assets/Scripts/Chess Game/Board.cs:64)
    BoardInputHandler.ProcessInput (UnityEngine.Vector3 inputPosition, UnityEngine.GameObject selectedObject, System.Action onClick) (

  • @WhiteBeansYT
    @WhiteBeansYT 3 года назад +6

    Hey! I've really enjoyed following your tutorial series so far - I'm just having trouble getting the final thing working - the "choose team" option never shows up, and when I try to connect to my client, neither game can find the other and they both just start a new game, and the pieces never generate.
    Again great tutorials, hopefully this can be sorted out easily!

    • @MuhammadShahid-co8yt
      @MuhammadShahid-co8yt 3 года назад +1

      Same problem with me
      Did you find the solution?

    • @jandebesta952
      @jandebesta952 3 года назад

      hey. guys did you find solution for that?

    • @marcusjohnson7231
      @marcusjohnson7231 3 года назад +1

      Hello fellow game designers! I encountered the same issue as many of us here and fortunately it's an easy fix.
      The Game Initializer got unreferenced (or was never referenced) in the Network Manager in the game scene. Got to the Network Manager game object in the scene and drag the game initializer game object into the proper reference. Everything should work as expected from there!
      At least, that was the issue for me. Hopefully this helps someone out there.

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

      ​@@jandebesta952 You need to move out this window from The Game Over Screen where it is hiding now and turn it to an inactive state.

  • @sas-vo1cs
    @sas-vo1cs 3 года назад +1

    You're the best❤️

  • @WellPlayedGamer
    @WellPlayedGamer 3 года назад +1

    For turn based its better to use RPC or events or Room properties ?

  • @ВиталийПлехан
    @ВиталийПлехан Год назад

    Good time of the day. I am creating a game based on your game. Only I have with game cubes. In the GameController, the Update method in which, according to the numbers that have fallen out, GenerateAllPossiblePlayerMoves occurs. Everything worked until I placed the game cubes and everything is like yours in the prefab. The GameController stopped seeing game dice values. Can you tell me how to get values from a script from a prefab.

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

    can somebody help me please.
    can you please tell me how to undo redo moves I have a final year project and its a main requirement of project.
    please help me out

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

    The restart button does not restart the other users board, and the pieces can get out of sync

  • @jayantbarthwal4470
    @jayantbarthwal4470 3 года назад +1

    Hi i have a very basic doubt -> calling rpc target.All means it will call to all the remote client(copy of our player but in remote desktop) or in all the players having same script even the enemys i am confused it will send to everybody or just copy of ours???

    • @GameDevChef
      @GameDevChef  3 года назад +2

      Its going to be called on corrsponding OBJECTS on all remote clients. So the first option in your question🙂

  • @MrDanko90
    @MrDanko90 3 года назад +2

    Спасибо!

  • @SugarSugiura
    @SugarSugiura 3 года назад

    Hello, I'm a beginner computer programmer from Japan. I'm very thankful for the great project file!
    I watch your videos to get an idea of how to make a Japanese chess game on Unity.
    However, I have been having a problem. PUN2 and DOTween don't function properly although I downloaded them from Github.
    I would really appreciate if you could give me some advice on this. Thank you in advance.

    • @inna3864
      @inna3864 3 года назад

      Did you tried to import them from the Asset Store?

    • @SugarSugiura
      @SugarSugiura 3 года назад

      @@inna3864 Yes, but the piece did not appear.

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

    Please tell me how to add spectate option in this project please help me out?

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

    Hey :) is it possible to implement a way that the User can be offline while waiting for the enemies turn? With PUN or do i need something else?
    Greetings:)

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

    I want to hire you for new style online multiplayer chess game

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

    Great Content, Thanks! How can i show (Enable) the development Console on windows Build? Can someone Help me with that pls

  • @annesophiebamoni4274
    @annesophiebamoni4274 3 года назад

    What's "ExitGames" and where find it ?

  • @pedro8769
    @pedro8769 3 года назад

    Absolutelly no need to abstractfy the class

  • @davidbovell4737
    @davidbovell4737 3 года назад +1

    Thanks for the lesson! I used the version from GitHub, which I was able to get working via a Windows build, but I tried to test it over the web with a WebGL build, but crashes at the point of selecting team colours. Any ideas?

    • @davidbovell4737
      @davidbovell4737 3 года назад

      I am getting a Null reference for Board.OnSquareSelected, but I am not sure what I have missed

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

    How to make undo button???

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

    Please make a ludo game

  • @bytebeatit
    @bytebeatit 3 года назад

    Github project doesn't work. missing Dll for PUN2 and DOtween, needs to reimport both packages from Asset Store.
    Moreover, restart button is not linked.
    UIManager needs to be modified in order to play multiplayer.

    • @MuhammadShahid-co8yt
      @MuhammadShahid-co8yt 3 года назад

      So I need to delete existing PUN2 and DOTween files and import it again?

    • @bytebeatit
      @bytebeatit 3 года назад

      @@MuhammadShahid-co8yt just overwrite the packages :)

    • @MuhammadShahid-co8yt
      @MuhammadShahid-co8yt 3 года назад

      @@bytebeatit I don't know how to do overwrite? Can you please explain me?

    • @bytebeatit
      @bytebeatit 3 года назад +1

      @@MuhammadShahid-co8yt just reimport the PUN2 free package and DOTween package without deleting what you have in your project.

    • @MuhammadShahid-co8yt
      @MuhammadShahid-co8yt 3 года назад

      @@bytebeatit Thank you but i'm facing this problem, I'm just having trouble getting the final thing working - the "choose team" option never shows up, and when I try to connect to my client, neither game can find the other and they both just start a new game, and the pieces never generate.

  • @thomasaugustinov6507
    @thomasaugustinov6507 3 года назад +2

    I searched all over the internet for a good tutorial on how to implement an AI like Stockfish in the game, but without any luck. If you know someone how made it please let me know. 👍👍

    • @mazdnd
      @mazdnd 3 года назад

      Here's a very good project to look into and pick apart:
      github.com/zhelyabuzhsky/stockfish
      Creating a version of this for C# and then utilizing it in Unity could work I would assume.
      I guess the stockfish would need to be a required component of your chess game then
      I also found this article to be filled with helpful tips on the way to developing a chess game with AI.
      www.freecodecamp.org/news/how-i-built-my-one-person-open-source-project/
      Implementing stockfish and developing a fully fleshed out chess game isn't a trivial task.
      StockFish is on github so one could start picking it apart, but I think it's better to start picking apart other open source chess projects which has implemented stockfish in their game.

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

      @@mazdnd can somebody help me please.
      can you please tell me how to undo redo moves I have a final year project and its a main requirement of project.
      please help me out

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

    Hello, in development a game

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

    Ok, so Good Tutorial but it's creating a lot of dependencies and it's bit overcomplicated, how many functions, scripts, enums and all that. Talking as a network beginner, what Chessplayer is? like what enum, but you using is. I think it was better to start and show something on clear, maybe from scratch so many could understand what really happening and why. That's all, It's so hard to follow along practically, following for past 6 hours and now I am stuck at start area like dude it's that much complicated for beginners

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

    Hello brother

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

    Need development game

  • @lawlaw3943
    @lawlaw3943 3 года назад

    Hello, when i move a piece the old piece remains like in 43:50 how to fix that?
    can anyone help? thanks in advance!

    • @mazdnd
      @mazdnd 3 года назад

      Hi,
      Just encountered this myself. it occurs in singleplayer as well.
      Now I went into Play mode and did some testing.
      It seems that the starting pieces are spawned twice.
      If you while in Play mode delete a piece you will see theres another piece underneath it.
      So probably something wrong with how we spawn inn the original pieces.
      I'll look into it :)

    • @mazdnd
      @mazdnd 3 года назад +2

      SOLVED!
      ChessGameController.cs - Void Start() method is calling the StartNewGame() method.
      This means the StartNewGame is called twice, and generating new pieces from the board layout both times!
      Delete the line call to StartNewGame() from the Start method will resolve the issue.
      Notes for those interested:
      If you have a different issue than me then a simple way to figure out what's going on is to add a Debug.Log("Something here"); into the CreatePicesFromLayout method, then pressing on that log call in the Console in unity you can see the call stack.
      If it shows twice you can see how it was called and from there figure out how it's happening.
      I saw these two calls:
      UnityEngine.Debug:Log (object)
      ChessGameController:CreatePiecesFromLayout (BoardLayout) (at Assets/Scripts/Chess Game/ChessGameController.cs:88)
      ChessGameController:StartNewGame () (at Assets/Scripts/Chess Game/ChessGameController.cs:60)
      GameInitializer:InitializeSingleplayerController () (at Assets/Scripts/Chess Game/GameInitializer.cs:58)
      UnityEngine.Events.UnityEvent:Invoke ()
      UIInputReciever:b__1_0 () (at Assets/Scripts/Input System/UIInputReciever.cs:12)
      UIInputHandler:ProcessInput (UnityEngine.Vector3,UnityEngine.GameObject,System.Action) (at Assets/Scripts/Input System/UIInputHandler.cs:10)
      And then on the 2nd time:
      ChessGameController:CreatePiecesFromLayout (BoardLayout) (at Assets/Scripts/Chess Game/ChessGameController.cs:88)
      ChessGameController:StartNewGame () (at Assets/Scripts/Chess Game/ChessGameController.cs:60)
      ChessGameController:Start () (at Assets/Scripts/Chess Game/ChessGameController.cs:48)

    • @silverblade9934
      @silverblade9934 3 года назад

      @@mazdnd great man, i was having the same issue it worked after doing what you said
      Thanks for sharing your info😃

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

      oh man, decided to check out before stepping into debugging and i just see the at the videos he goes "everything is fine. it passed the programmers check" WHILE moving a piece and it both moves and stays there lol. thank you tho! saved me a few minutes !

  • @saitokun8834
    @saitokun8834 3 года назад

    Aslo para android