MitchMakesThings / Godot-Things

Collection of tutorials and mini-projects
MIT License
103 stars 35 forks source link

How to work with multiplayer spawn #5

Open bkeys opened 2 years ago

bkeys commented 2 years ago

Hi Mitch, I used your networking tutorial to try to implement networking for my game. And the synchronizer works just fine but I cannot get the multiplayer spawner to do anything at all. Would you be willing to take a look at what I am doing wrong in my game? No one on IRC seems particularly knowledgeable about the MultiplayerSpawner since I get crickets when I ask about how it works. If you could also type up an explanation of how it works programatically that would be enlightening; but I am grateful for any help you can spare. Here is the link to my project: https://code.bkeys.org/Game_Projects/zombie-shooter

Linko-3D commented 2 years ago

I have found this tutorial: https://youtu.be/bK41GF5sTf4

MitchMakesThings commented 2 years ago

@bkeys Unfortunately for you I'm off on holiday for most of this month :D So I won't be able to take a look for a while.

Beyond the automagic MultiplayerSpawner stuff I haven't looked at the node. From skimming your levels script it seems like you're not doing anything that would require programmatically spawning? (ie, no custom serialization etc) In which case you should just be able to tick the AutoSpawn option, and define which scenes it's allowed to auto-spawn (namely Player.tscn) If you haven't seen the video that went along with the project, the important bits are @ https://youtu.be/nQ4P3ogXp2Q?t=270

bkeys commented 2 years ago

@Linko-3D @MitchMakesThings Yeah I based how my project's networking on how the project you did in your video so I have seen the whole thing multiple times. I am at a standstill with my networking in my repo because as you said there is no apparent reason that my project isn't spawning them. Hopefully one of you guys can look into it and give an explanation since the Godot documentation at the moment little explaining proper usage of the multiplayer spawner. I thank both of you guys for your help and am willing to wait; hopefully others will benefit from the information.