Basics Of Multiplayer In Godot 4!

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

ความคิดเห็น • 305

  • @FuGyz
    @FuGyz ปีที่แล้ว +193

    Currently, multiplayer tutorials for Godot 4 are rare. Thank you so much for making one, helps to who needs it, like me. 😆

    • @KlausWulfenbach
      @KlausWulfenbach ปีที่แล้ว +5

      It's because G4 Alpha changed so much from 3.x, Beta changed so much from Alpha, and then they even changed things from Beta to 4.x. I was actually trying to follow along with a few tutorials that did attempt to keep up with the changes, but in the end it was kind of pointless until everything finally stabilized.
      GDQuest even outright stated that they weren't even going to attempt making a multiplayer course until everything was good and stable and even then no promises.

    • @w花b
      @w花b 7 หลายเดือนก่อน

      ​@@KlausWulfenbachaww...

  • @DrPol1
    @DrPol1 8 หลายเดือนก่อน +31

    If you haven't already, I would vote for a tutorial on matchmaking next.
    Thanks so much for your tutorials, they have been really helpful!

  • @KlausWulfenbach
    @KlausWulfenbach ปีที่แล้ว +28

    This is FANTASTIC👍
    All the old multiplayer tutorials are completely obsolete now, so it's really helpful to have one for 4.x

  • @CraftedQuests
    @CraftedQuests 8 หลายเดือนก่อน +15

    I really have to say, that this is just the pure definition of a tutorial :D
    It has everything you needs, shows how to do it, explains it in short and easy terms, and brings up a direction where to go from there.
    12/10!
    I had a bit of a struggle with the spawning of the players though.
    Godot spawned my player as Player@5 on the host and Player@9 on the peer, which led to errors.
    So when I spawn the player nodes, I rename them to their player names. That solved it.
    Also I removed my player Camera, and only add it, when the player node has my mp id.
    It is so cool how easy this is.
    I tried implementing multiplayer in Unity once. After weeks I kinda gave up.
    In Godot? Especially with the multiplayer Synchronizer? Its just awesome!
    Thank you FinePointCGI for this on point explanation :)

  • @zacharystefanich
    @zacharystefanich 6 หลายเดือนก่อน +6

    3 minutes into the video and this is the best godot tutorial I've ever seen. I'm not even to the stuff I wanted to learn about yet, and I'm subscribing

  • @ShiloBuff
    @ShiloBuff 11 หลายเดือนก่อน +10

    This is one of the most complete multiplayer tutorials on Godot. I love that you explain hosting too. Great work!

  • @treeadam5298
    @treeadam5298 3 หลายเดือนก่อน +4

    Im a little new to godot and i managed to go through this tutorial so easily. Great job man!

    • @FinePointCGI
      @FinePointCGI  3 หลายเดือนก่อน

      I'm glad it worked for you!

  • @fatihzirek7440
    @fatihzirek7440 9 หลายเดือนก่อน +4

    Really thanks because high quality multiplayer tutorials are really rare in Godot4.

  • @mintydog06
    @mintydog06 4 หลายเดือนก่อน +2

    Thanks for the great tutorial! It's much appreciated. Bonus points for your Canary joining in at the end there.
    1 hour into it, looks like there's a mistake. You set syncRot to rotation_degrees which is the rotation of the player, not the gun rotation, also you never turned off the synchroniser for the gun rotation. I also don't understand why my lerp syncPos is smooth but yours is.

  • @rus6242
    @rus6242 10 หลายเดือนก่อน +4

    You did what I was looking for and trying to do for a week in 1 hour. My respect, like and subscribe.

  • @OgGhostJelly
    @OgGhostJelly 11 หลายเดือนก่อน +4

    Insanely useful, I genuinely wouldn't have been able to do multiplayer without this.

  • @CaptainCarrotzz
    @CaptainCarrotzz 5 หลายเดือนก่อน +1

    I like that you show your errors and how to fix them. I think that'll help people just starting out get a knack for coding.
    Great video!

  • @FuGyz
    @FuGyz ปีที่แล้ว +7

    Please make more tutorials about multiplayer! Like how to spectate players, when dead for example, how to do a text chat or even voice chat, how to do matchmaking, how to send and receive .save files from players, how to setup a ready up, or how to setup a game party, etc...

    • @FuGyz
      @FuGyz ปีที่แล้ว

      Also, please show us how to make teams using this peer to peer multiplayer.

  • @shreshtharawat1844
    @shreshtharawat1844 หลายเดือนก่อน

    you are a life saver .I have been trying to add the free look gun shooting, but it always turned into contra like shooting but now just because of you i am finally abled to add it. God bless you man

  • @meezi2987
    @meezi2987 ปีที่แล้ว +9

    It's great that you made such a nice multiplayer tutorial for Godot 4 :)

  • @felineentity
    @felineentity ปีที่แล้ว +37

    Small correction: 32 is not the max amount of players you can have in your network game. The theoretical max is 4095, but practically it's probably lower than that (due to bandwidth limitations).

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +20

      Yeah I correct that in my c# version I don't know what I was thinking..

    • @lifelife3061
      @lifelife3061 10 หลายเดือนก่อน +4

      So you can't make a mmorp in Godot 4?

    • @0815avenger
      @0815avenger 10 หลายเดือนก่อน +5

      @@lifelife3061 not sure about the networking layer presented in the video, but of course you can always do your own networking (and can build an mmorpg in Godot).

    • @hanelyp1
      @hanelyp1 10 หลายเดือนก่อน +11

      @@lifelife3061 An MMORPG is typically structured into zones and instances, limiting the number of players and NPCs that have to interact closely with each other. Anything not in the current zone and instance is out of sight and mind. Also enabling the larger game to be divided among multiple servers.

  • @NexusBaum
    @NexusBaum ปีที่แล้ว +4

    Hi! I came from Unity. This is very helpful, thanks! You've got a new subscriber. :)

  • @simplexeon
    @simplexeon 11 หลายเดือนก่อน +5

    Wow, this is so much easier than it was in Godot 3.5. Definitely going to give it a shot, although I'll probably ignore the multiplayer sync node in favor of sending timed inputs and recalculating positions locally so the lag isn't as much of an issue.

    • @FinePointCGI
      @FinePointCGI  11 หลายเดือนก่อน

      That's probably a better play.. The synchronization node is really cool but it definitely is in its infancy..

  • @OverStyle
    @OverStyle ปีที่แล้ว +2

    I was just looking for resources on Multiplayer in Godot 4 yesterday! Thank you for creating advanced Godot tutorials

  • @novantechstudio
    @novantechstudio 11 หลายเดือนก่อน +10

    If anyone is having issues with this in 4.1.1, they seem to have changed the way things are named. I had to add an Id variable to my player and use that to set the multiplayer authority.

    • @TheDestroyer702
      @TheDestroyer702 8 หลายเดือนก่อน

      I'm currently dealing with that. When I print each unique ID, they're the same

  • @shmolyneaux
    @shmolyneaux 11 หลายเดือนก่อน +5

    Wow, this was a fantastic introduction to Godot networking. Special thanks to Editor Mitch who included bullet spawning :)

    • @FinePointCGI
      @FinePointCGI  11 หลายเดือนก่อน +5

      Ill let him know though I dont want him to get a big head...

  • @giovanemachado8339
    @giovanemachado8339 หลายเดือนก่อน

    This is super complete, great tutorial man. It helped me a lot.

  • @hw2007
    @hw2007 10 หลายเดือนก่อน

    Gonna watch this and follow along later. Thank you for making an in-depth tutorial. All the other ones were like 15 minutes long, and I knew there was no way they could actually explain everything in that time.

  • @StephenFosterUK
    @StephenFosterUK 3 หลายเดือนก่อน

    👏👏 Great tutorial.. Very clear and generous with your time and talent.. much appreciated

  • @mrgreensuit7379
    @mrgreensuit7379 6 หลายเดือนก่อน

    This is the best multiplayer tutorial on TH-cam!

  • @soganox
    @soganox 7 หลายเดือนก่อน +1

    Very good tutorial! Thank you for the in-depth coverage.

  • @oddesteagle
    @oddesteagle ปีที่แล้ว +5

    Really Cool video, can you make a video on the steam multiplayer,because there arent many videos in this topic

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +4

      I already do for c# but I do have it on the list for GD

    • @FuGyz
      @FuGyz ปีที่แล้ว +1

      Can agree that we need a Steam Multiplayer tutorial. 👍

  • @domedevep
    @domedevep ปีที่แล้ว +3

    Incredible, thank you for this!

  • @KozelPraiseGOELRO
    @KozelPraiseGOELRO 6 หลายเดือนก่อน

    Big thanks, it was way easier with your help. I would also recommend linking the player node with the player id, so directly the disconnect func can erase the player node instead, without the 'for i in players' structure. Also also, the disconnect function could take you to another screen if the disconnected player is the host, just by 'if id = 1'.

  • @TheAbcd159
    @TheAbcd159 หลายเดือนก่อน

    thank you for the vid, it helped me set up my first ever multiplayer

  • @NateHeroic
    @NateHeroic ปีที่แล้ว +2

    I'm definitely interested in a match making tutorial. Great video!

  • @Lukfin
    @Lukfin ปีที่แล้ว +3

    Tutorials like these are gems for people hungry to learn❤ I am curious about the upsides on WebRTC for networking/multiplayer. Would you be able to do a video like this one about WebRTC servers?

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +2

      Yes im researching that one now... Its been difficult because Godot doesnt handle much so you have to do alot of signaling and packet handling to get it all working..

    • @Lukfin
      @Lukfin ปีที่แล้ว +1

      @@FinePointCGI Hey no rush or pressure. When learning is forced, it becomes less fun and harder to teach

  • @dippinpahwa
    @dippinpahwa ปีที่แล้ว +4

    Thank you for this awesome tutorial, i was looking at your multiplayer project using nakama but that was built on godot 3. Can you please make a dedicated tutorial on matchmaking/sending or receiving messages?.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +4

      Yes! Nakama is going to be updated as well as doing our own match making system!

  • @Peter-wl5xm
    @Peter-wl5xm 10 หลายเดือนก่อน

    I'm really grateful for your multiplayer content and content in general. Thank you and happy holidays.

  • @erickgutierrez4455
    @erickgutierrez4455 2 หลายเดือนก่อน

    This video helped me so much! Thank you!

  • @johnjohnson3232
    @johnjohnson3232 11 หลายเดือนก่อน +3

    Amazing tutorial! Really breaks down the concepts, and I've got it mostly working on my end!
    However, I'm having an issue where the "joiner" is able to manipulate its player as intended, but the host can't manipulate either player. I'm going insane trying to find what I did wrong, as I'm almost certain I replicated what you did to a tee!

    • @johnjohnson3232
      @johnjohnson3232 11 หลายเดือนก่อน +2

      I found that for some reason, the host player's name becomes something like "@Sprite2D@7" instead of "1". I fixed it by hardcoding a check to set the multiplayer authority to 1 if the name starts with an "@", but i'd like to understand why this is happening in the first place? I've tried with 3 instances, and everyone but the host gets an actual numerical name.

    • @cullencanejo7731
      @cullencanejo7731 11 หลายเดือนก่อน +1

      @@johnjohnson3232 I had this issue as well it took me some time to troubleshoot. but my issue was I named something in the seem with 1. My spawn points were "1", "2" so after I changed it to "Spawn1" the issue was fixed.

    • @dappercthulhu4386
      @dappercthulhu4386 11 หลายเดือนก่อน

      Thanks for saying how you fixed it. I had the same issue. I wonder what we did that caused it to be different from this tutorial? But I got it working exactly how you did. For now its a solution that works

    • @hinakentenshi5476
      @hinakentenshi5476 7 หลายเดือนก่อน

      @@Catastrphic It may be late, but I figured it out : He created a Node2D named SpawnLocations in which he placed 0 and 1, which would not cause trouble with newly instantiated childs. At least, that's what it was for me

  • @Pleasantnoob64
    @Pleasantnoob64 11 หลายเดือนก่อน

    thank you took me days trying to find a multiplayer tutorial that worked thanks

  • @hawkgamedev
    @hawkgamedev ปีที่แล้ว +2

    what a legend! thanks for this video!

  • @matheusbuzatti9161
    @matheusbuzatti9161 ปีที่แล้ว +1

    Thanks. We need more multiplayer tutorials

  • @Lion4de
    @Lion4de 7 หลายเดือนก่อน

    This was amazing, thanks for such an in-depth look at this

  • @fenrew
    @fenrew 6 หลายเดือนก่อน

    This was a really well put together tutorial!!

  • @alt0248
    @alt0248 10 หลายเดือนก่อน +7

    Having a small issue at 40:40. My host will store its player info in the game manager but when the other players connect they don't receive any of the other player's from the host's game manager. Where would the issue be coming from?
    Edit: I had accidently added an ID variable to the connect_to_server and connection_failed functions. This broke the connection to the multiplayer signals but it didn't stop the game from running.

    • @flintspike307
      @flintspike307 9 หลายเดือนก่อน +2

      This comment saved me too. Thank you so much for taking the time to edit and update your comment instead of just deleting this. I feel so silly now. THANK YOU.

    • @smashoverkill
      @smashoverkill 8 หลายเดือนก่อน +1

      saved me too, thanks!

    • @buffmcpump6033
      @buffmcpump6033 7 หลายเดือนก่อน

      Yet another save! Thank you for this!

  • @twosoulfox
    @twosoulfox 9 หลายเดือนก่อน

    You make so many great videos.
    Really need to take off some time on the weekends.

  • @johnmerriam7844
    @johnmerriam7844 7 หลายเดือนก่อน

    This guy is a genius keep up the good work man you are helping us so much

  • @peadamo
    @peadamo หลายเดือนก่อน

    great tutotrial!!

  • @RealPigeonz
    @RealPigeonz ปีที่แล้ว

    Great tut! Waiting for next about multiplayers! 😊

  • @will7466
    @will7466 ปีที่แล้ว +2

    Yes more multiplayer videos please

  • @adparker
    @adparker 9 หลายเดือนก่อน

    00:02:20 - For the main character sprite sheet, leaving the offset a 0, 0 px worked for me.

  • @idle.observer
    @idle.observer 10 หลายเดือนก่อน

    Hell yeah, I thought it would be hard to make a multiplayer in Godot, but seems like not that difficult. Thank you for the tutorial, Sir!

  • @notnaix
    @notnaix 10 หลายเดือนก่อน

    Awesome video man! Liked and subbed

  • @ajwizkid
    @ajwizkid 6 หลายเดือนก่อน

    Great tutorial! I had a conceptual question - why do we need to send the player information to each client? Is it not possible to just sync the singleton using the multiplayer synchronizer?
    Also, if you ever consider doing a follow up to this, would love to see an implementation for a 2 player turn-by-turn game like a card game

    • @FinePointCGI
      @FinePointCGI  6 หลายเดือนก่อน +1

      You could but thats going to do the same thing pretty much. I just do it manually here because I prefer to have more control of when things get synced.

    • @ajwizkid
      @ajwizkid 6 หลายเดือนก่อน

      @@FinePointCGI thanks for the reply!

  • @psyantologist
    @psyantologist 9 หลายเดือนก่อน

    Awesome tutorial :) thank you!
    I imagine lerping to save bandwith causes hit registration issues (unless clients have authority over making hits instead of the server making that decision for them - and then it might just shift the frustration from "why can't i hit him?" to "how in the world did he hit me?")
    in case you would like to elaborate on this particular zoo of problems, I would watch that video too! subscribed :)

  • @Xeymen55
    @Xeymen55 ปีที่แล้ว

    Thanks for the tutorial, great explanation and example.

  • @dougsaylor6442
    @dougsaylor6442 10 หลายเดือนก่อน

    This was an absolutely wonderful introduction, and you got me *much* further than I would have got on my own. I'm really curious if there's a way to create a generic dedicated server proxy using Godot's RPC/MultiplayerSynchronizer protocol(s). I'm sure the *real* server side would still need to be a Godot export, but having a proxy in place would allow for on-demand backend initialization, and also server policy stuff like cheat prevention, IP allow/block listing, etc. without having to add that into every game server's code. Some of the "solution around the solution" type stuff. If you know of something similar and/or have some thoughts on this, I'd be really interested to hear about it.

  • @popertots
    @popertots 9 หลายเดือนก่อน +2

    In my SceneManager the names are all set correctly (confirmed with print), but by the time it runs _ready in my player script the name has already revered back to @CharacterBody3D@2, but only on the host. All connected clients work fine., the host is just stuck unable to do anything as the name/id is wrong on _ready. driving me mad trying to figure out why

    • @LogansDarling
      @LogansDarling 8 หลายเดือนก่อน +1

      Found the issue, idk if something got changed, but if you set the name as "1" it just treats that like what it was previously or something. Maybe it thinks "1" is True? Idk, but if none of the IDs are 1, everything works fine. I just solved this by having it be str(GamemManager.Players[i].id) + " ", and it worked. Doubt you still need a solution 3 weeks later, but there you go.

  • @pixelartrpg
    @pixelartrpg 3 หลายเดือนก่อน

    Thank you for this.

  • @bandannaman510
    @bandannaman510 9 หลายเดือนก่อน

    I'm working my way through this tutorial for my own game! It's been amazing to soak up all the knowledge you have accumulated here - Thank you so much! I'm running into snags trying to implement this on MacOS - specifically the terminal acting as the server bit. Would you be able to add information on that?

    • @bandannaman510
      @bandannaman510 9 หลายเดือนก่อน

      Actually, I was able to get it working!! I used 'open [app name].app --args --server' and it worked like a charm!

  • @JeffreyGreenland
    @JeffreyGreenland 9 หลายเดือนก่อน +3

    losing my mind trying to figure out how "gravity" is different than "gravity * 1"

  • @rotmohawk2115
    @rotmohawk2115 10 หลายเดือนก่อน

    Great tutorial. Good pacing.

  • @Super_Top_Secret_Area
    @Super_Top_Secret_Area 11 หลายเดือนก่อน +2

    Thank you for making this tutorial, it helped me a lot. I still have a few errors, but it must be because I moved something around. I will be rewatching to see what I may have done wrong.
    By the way, could you please consider expanding on this tutorial to include a character select screen? Something like picking different characters (each having their own scene, I suppose?). I haven't found any Godot 4 tutorials covering how multiplayer affects character selection, so it would be very useful.

  • @youranonymousyoutuber4051
    @youranonymousyoutuber4051 ปีที่แล้ว

    thanks so much man i subbed and liked the vid

  • @bongo6_462
    @bongo6_462 6 หลายเดือนก่อน

    YOU FIXED MY BULLET NOT SYNCING THANK YO USOOOO MUCH MAN

  • @jacksanimations2827
    @jacksanimations2827 8 หลายเดือนก่อน

    dude this is flubberknucking amazing

  • @DanialRanjbar-u7t
    @DanialRanjbar-u7t 16 วันที่ผ่านมา

    very nice video. thanks

  • @rumariomusic
    @rumariomusic ปีที่แล้ว +1

    Very great tutorial. For multiplayer I miss a Voip tutorial for Godot 4. That would be great. I wanted to do a test with you server, but I think it is down!?

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว

      I do have that on my list! I also am not sure whats going on with my server ive been looking at it for the last little while. You could try now it may work... I think it how im running the code

  • @om-rane
    @om-rane 11 หลายเดือนก่อน

    Excellent video, it covered a lot of application of concepts!
    I would love to see more videos explaining the individual concepts themselves, like what is RCP exactly? How does MultiplayerSynchronizer work? Is there any alternative way? How to do P2P? etcc

    • @FinePointCGI
      @FinePointCGI  10 หลายเดือนก่อน

      I can do that! Ill add that to my list
      github.com/finepointcgi/FinepointCGI-Suggestions/issues/61

    • @om-rane
      @om-rane 10 หลายเดือนก่อน

      I appreciate you noting it down! Looking forward to learning more :D@@FinePointCGI

  • @clecioespindolagamedev
    @clecioespindolagamedev ปีที่แล้ว

    Hi... I am Godot contente creator, and just was recommended by a sub about your content about multiplayer in Godot. I was studying the documentation to learn more as well to teach people gere in Brazil. My question is, can I use the base of your content, not copying but using It as a reference, and of course crediting your channel in a future vídeo about MP in Godot?

  • @JB-kn7ig
    @JB-kn7ig 6 หลายเดือนก่อน

    Hey man, if you had a big map with many players who wouldn't be able to see each other because of their distance.. Is there any example projects you know of that would have the server be checking positions, and determining if & who to send the relevant position data to, for example nearby players.
    Thanks a lot for the video, I'm definitely going to go through it and play around. Looks really cool being able to test it on your own pc too :) Thanks again

  • @dorara01
    @dorara01 10 หลายเดือนก่อน

    Thank you so muck ! really help me a lot

  • @tedmosby1235
    @tedmosby1235 7 หลายเดือนก่อน

    Damn good tutorial ! Thanks

  • @Andrew-ic8tx
    @Andrew-ic8tx 9 หลายเดือนก่อน

    You are a boss. Love your videos.

  • @addisonjacoby
    @addisonjacoby ปีที่แล้ว +1

    Would love to see a matchmaking video.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +1

      This is a good suggestion! I will be doing that one soon™ I wanted to touch up on the followon so this may be a good topic to have as well!

    • @addisonjacoby
      @addisonjacoby ปีที่แล้ว

      @@FinePointCGI can't wait 😁

  • @saangosu
    @saangosu 2 หลายเดือนก่อน

    Hii!
    I'm big n00b on multiplayer stuff, and I need to learn for work. My boss told me to study Nakama after starting following this one, and I saw you had another tutorial for Godot with Nakama. I wanted to know if stuff from here also applied to Nakama. I watched until minute 44:18.

  • @beton3035
    @beton3035 8 หลายเดือนก่อน

    Very nice tutorial!

  • @Kasenlys
    @Kasenlys 11 หลายเดือนก่อน

    That is awesome tutorial ! Do you have by any chance a cheat sheet / quick reference sheet that summarize all this stuff ?

  • @Caracuan12
    @Caracuan12 8 หลายเดือนก่อน

    So useful, thanks a lot

  • @bboyleftfoot
    @bboyleftfoot 6 หลายเดือนก่อน +1

    In case anyone was having problems with rotation_degrees syncing, it worked for me after i changed rotation_degrees to $GunRotation.rotation_degrees, e.g.
    syncPos = global_position
    syncRot = $GunRotation.rotation_degrees
    global_position = global_position.lerp(syncPos, 0.5)
    $GunRotation.rotation_degrees = lerpf($GunRotation.rotation_degrees,syncRot,0.5)

  • @Rikikiz
    @Rikikiz 6 หลายเดือนก่อน

    The lower the FPS gets, the faster we go, any insight on how to fix that?
    I did put all the movements in physics process.

  • @Kptkrunch_
    @Kptkrunch_ ปีที่แล้ว

    This is an awesome video and a great starting point. I did run into an issue with controller support where everything is synced when using kb and mouse, but when using controller it moves all players. I'm sure I can't be the only one who's run into this, so maybe it could be a good thing to comment on.

  • @GameGW935
    @GameGW935 7 หลายเดือนก่อน

    Fantastic video!

  • @jeanicezinho
    @jeanicezinho 4 หลายเดือนก่อน

    muito bom amigo, obrigado por compartilhar seu conhecimento!

  • @prismajane
    @prismajane 8 หลายเดือนก่อน

    This worked like a charm. I managed to get it to work with friends over the network. Is there a method that allows for players to join in the middle of a session with this set up?

    • @FinePointCGI
      @FinePointCGI  8 หลายเดือนก่อน

      Not going to lie that part is pure pain! I was discussing with someone about this and more or less its doable though you need to change how ew handle the players spawning quite a bit.
      how it works right now
      get all the players
      spawn players
      sync code
      and youd have to change it
      get new player
      tell new player to spawn other players
      spawn that player
      tell everyone they can now sync again.

  • @nezqwe4818
    @nezqwe4818 7 หลายเดือนก่อน

    Id love to see multiplayer lobby tutorial

  • @noid3571
    @noid3571 10 หลายเดือนก่อน

    The synchronizer is a game changer. If someone saw my old synchronization code they would go mad....

  • @eagle4226
    @eagle4226 7 หลายเดือนก่อน

    thank you you absolute legend

  • @BreadSauce4
    @BreadSauce4 11 หลายเดือนก่อน +1

    This is an amazing tutorial! Just wondering, how do I make the different players see out of different cameras? In my current project, the different screens move different players, but both see out of one camera. If you know, please tell me. Thanks!

    • @NimbusCloudGG
      @NimbusCloudGG 9 หลายเดือนก่อน

      Having this same issue rn

    • @NimbusCloudGG
      @NimbusCloudGG 9 หลายเดือนก่อน +1

      Figured it out. In the player script, under your ready function, you need to set the camera to the Multiplayer authority.
      Something like:
      camera.current = is_multiplayer_authority()

  • @Thomason1005
    @Thomason1005 3 หลายเดือนก่อน +1

    at 1:10:55 you put it to 0.0.0.0, but that variable is only used in the join_button-function? i do not follow how this has an effect, but i am wondering since i have the issue of not beeing able to connect to outside my local network

  • @Kukatoo
    @Kukatoo ปีที่แล้ว

    great tutorial!

  • @JeremyMidlam
    @JeremyMidlam 7 หลายเดือนก่อน

    looked up port 8910 just for fun and it was used for an old Trojan back in 2007 lol

  • @KlausWulfenbach
    @KlausWulfenbach ปีที่แล้ว +5

    I just realized you actually made a mistake in the Player object. It should be syncRot = $GunRotation.rotation_degrees, not syncRot = rotation_degrees, and then later $GunRotation.rotation_degrees = lerpf($GunRotation.rotation_degrees, syncRot, .5).
    It works as written because you forgot to stop synchronizing GunRotation:rotation.

  • @danialazwar5375
    @danialazwar5375 ปีที่แล้ว +1

    A great video, btw I'm not sure how to update sprite animations for each player to the server. Any help would be great.

    • @FinePointCGI
      @FinePointCGI  ปีที่แล้ว +2

      You dont you would do that on the client side. The client should handle all of that what id do is just pass a state parameter around that allows you to change the sprites eg if player is running do the running sprite.

  • @SHELLY_STARS2209
    @SHELLY_STARS2209 ปีที่แล้ว +1

    Hi can you do custom build project in 4.1😢 please i couldnt do It i am very angry this custom build and admob

  • @Inglott
    @Inglott หลายเดือนก่อน

    This is great! Thanks! I have a question though. In my game, the host and the client are supposed to see different things (one player has to send hints to the other player, and the other player has to make guesses, but then they take it in turns after each round). What they would see on the screen would be different to each other.
    I was going to have different scenes for both players, but now I'm wondering if that's the best option. Would it be better to have one scene, but it displays differently for either player and just keep track of who is making hints and who is guessing? I set it up in the code from your tutorial so that it checks the player id and instantiates a different scene to either one in the StartGame function (it seems to work so far, in that it doesn't error or crash and both have a different scene active) but I'm not sure if this is going to create problems down the road...
    Reading a little on google, there was a suggestion that if players are running between different scenes, that it's best to have both scenes active for both players.

  • @deshsealone
    @deshsealone 7 หลายเดือนก่อน

    Thank you tutorial, let me learn a lot! But I have another problem without solution: When I Disconnected, how do I synchronize the data when I reconnect? In other words, PEER_ID = 1 players enter the game in advance, I joined halfway, how should I synchronize the server's game data so that the scenes of our two are synchronized.

  • @黃欣瑜-d3h
    @黃欣瑜-d3h 10 หลายเดือนก่อน

    Thank you so much for the tutorial! It's really helped me with my school project! However, I am struggling to create AI enemies for my multiplayer game...... Hope I can figure it out soon😞

    • @FinePointCGI
      @FinePointCGI  10 หลายเดือนก่อน

      Good luck it really depends on what you're trying to make.

  • @jamessweet6962
    @jamessweet6962 8 หลายเดือนก่อน

    This is a great tutorial, how would this change if I were to have a coop game where each playable character has a different set of abilities?

    • @FinePointCGI
      @FinePointCGI  8 หลายเดือนก่อน

      I woudl pass in the abilities in on character creation. I would also abstract the abilities to all use one function to use that ability eg
      ability one has useAbility()
      ability two has useAbility()
      ability three has useAbility()
      when the user wants to use the ability id just call
      ability.useAbility() that way it works for any and all abilities
      then when the play joins and they choose there abilities id pass that into there player information and send it along with the data
      player one has abiltiy 1 and 3
      player two who just joined has ability 2 and 3
      That way its flexable and easy to use!

  • @SumitKumar-kr4wz
    @SumitKumar-kr4wz 8 หลายเดือนก่อน

    When is the next video coming about the web Rtc ?

  • @bongo6_462
    @bongo6_462 6 หลายเดือนก่อน

    You are a god amongst men

  • @RhogerAnacleto
    @RhogerAnacleto 10 หลายเดือนก่อน

    Awesome tutorial! Good job! I want to ask you what is the real purpose of the syncPos and syncRot? I didn't actually get what they are for, what are the advantages to using it instead of using the position and rotation directly?

    • @wiktorp.9259
      @wiktorp.9259 8 หลายเดือนก่อน +1

      If i understand it correctly, these variables are used as a "target" Position and Rotation.
      In a multiplayer game, when you move, the information about this haven't been transmitted as smoothly as in singleplayer scenario. In this case the connected player would move in a jittery manner (or at least copy of him being seen by connected players).
      To fix this issue we can create a variable that holds the target position (syncPos), which will be transmitted to server. Then, the server will do an interpolation between current position and syncPos to make this jiterriness appear smooth.
      This is why lagging players zoom around the map instead of teleporting, making them somewhat easier to hit.
      Basically in a code region that activates only on user you assign `syncPos = global_position` use `move_and_slide()`.
      In a code region that activates on server you use `global_position = global_position.lerp(syncPos, .5)`
      Instead of `position`, only the `syncPos` is being synchronized.
      If you want to check the effect of using such system, increase replication_interval value of Multiplayer Synchronizer, and check how moving player behaves with or without that syncPos

    • @RhogerAnacleto
      @RhogerAnacleto 8 หลายเดือนก่อน

      @@wiktorp.9259Thanks Mate! I think I understood much better after your explanation. I also played a little while over this and makes all sense to use this strategy.

  • @cycomkid
    @cycomkid ปีที่แล้ว +1

    Thanks bro