5 Beginner Multiplayer Mistakes

preview_player
Показать описание
This is a review of 5 beginner multiplayer mistakes that we all make when starting out. Most of these are authority problems but I do look at a typical RPC issue when developing in Host mode. The final point reviews how I think new developers should approach their multiplayer journey.

Main Topics
----------------------------------------------------------------------------------------------------------------
1. Where to set client authority?
2. Order of MultiplayerSynchronizers in scene

[Both of these issues have the same error]
on_replication_start: The MultiplayerSynchronizer at path "/SOME/PATH" is unable to process the pending spawn since it has no network ID. This might happen when changing the multiplayer authority during the "_ready" callback. Make sure to only change the authority of multiplayer synchronizers during "_enter_tree" or the "_spawn_custom" callback of their multiplayer spawner.

3. Set client authority on server
4. Use "call-local" for RPC calls when in Host mode
5. Start with a prototype or proof-of-concept
----------------------------------------------------------------------------------------------------------------

[Reference Project - Must open with GodotSteam custom MultiplayerPeer build]

[Looking for the code?]

👋 Let's talk shop 👇

----------------------------------------------------------------------------------------------------------------

00:00:00 INTRO
00:00:10 WHERE TO SET CLIENT AUTHORITY
00:06:28 ORDER OF MULTIPLAYER SYNCHRONIZERS
00:08:48 SET CLIENT AUTHORITY ON SERVER
00:11:31 USE CALL-LOCAL FOR HOST MODE RPCS
00:16:31 START WITH A PROTOTYPE
00:20:54 WRAP UP

#steam #steamgame #p2p #steammultiplayer #steammultiplayerpeer #godotsteam #steamp2p #2dgame #respawn #pvp #health #animations #gamedevelopment #2dmultiplayer #godotstartertemplate #godot #godottips #gametech #gamedev #indiedev #multiplayer #network #godotengine #brackeys
Рекомендации по теме
Комментарии
Автор

Hey BAD! Thanks for the content, it's mindblowing to me how passionate you are about this
I am very early in my journey of making a multiplayer game, I am still completely in the basics, I have a character, it moves, it slides on collision, it has animations
Do you have or know a good tutorial series that is completely starting a multiplayer game from scratch? There is a lot of info out there, but I want to make sure I start MP from scratch, as I am only interested in learning how to do multiplayer games :)

fraankk
Автор

On the session starting at 11:35, where you talk about the rpc, it seems kind of a waste for you to call on all clients but only process it in the server. Is there a reason why you are not doing `rpc_id(1)`?

zemeio
Автор

11:30 i watched the multiplayer video and recreated the multiplayer functionality but i think i wont pursue mutliplayer anymore. i understand literally nothing at all. i can debug stuff "offline" but this is just straight up wizardry hahahaha like my player can take a jump input in the air and jumps as soon as he hits the ground but if i understand the code correctly it should not do that at all. i made no jump buffer and since we "declared" the "_is_on_floor" var on the player as "local" we should not use it to check it again in the script. i generally dont understand why we have so many script for one thing in multiplayer.

fruitdudetv
Автор

rpcs don't seem to work as I expect them to, any tips for a newbie? either doesn't seem to run, or runs and I ~think it's setting some global car on the server, but when I try to pass or query the global variable, from the server, and I show the id =1 so it is on the server, the data is like stale and an old version, and not the latest. Shouldn't be a timing issue, I throw in a second delay to avoid that

timothyn
Автор

I would like to know if it is always preferable to host in clouds using third party services. Like, for a small scale (play with friends or small community) game.

Also, are there any major considerations to have for security in the event of hosting on a owned dedicated server?

TotallyAccurateCodingSimulator
Автор

Hey, got inspired by you and brackeys: for my computing project im making a 2d platformer, all my own code so itll change a million times, but i have basic movements and collision, double jump, and the start of a dash. Cant wait to see what stuff you do next. Maybe add celeste style gameplay to brackeys project, like dashing (lasts x time) and climbing (on certain surfaces, lasts y time) to show how to implement new functionality to multiplayer games, while not messing up anything XD

TycerKirk
Автор

Hi, nice video ! I would like to know how to simulate lag on same machine to test real lag problems, also how to show the current ping/ms, thanks !

MathiasBesil
Автор

Why don't just set the multiplayer authority near the scene instantiation? In your case is in `_add_player_to_game` function? Instead of keeping the additional field `player_id` we could set the multiplayer authority instead of it, don't we?

RuslanGolovinskiigolxzn
Автор

Thanks for the video) It was funny for me to see the "MMO mistake" part, because, well, it kinda relates to me :D Not to say I'm truly planning to make one right away, but still that's what I'm interested in in general. And that's why I'm currently learning Godot and multiplayer in particular. The fun thing is that I'm indeed an experienced web-developer used to big scales and high loads. And that's what I would call a "senior-bias") While those high-level things are looking cool to make some simple things out-of-the-box which will work like a magic, the questions that inevitably come to mind to a person like me: do I have a greater control over this? Or if I have numerous synchronizers, are they packing multiple updates into a single packet, or they are all separate packets? Or same with RPC calls: are they packed? Are there separate network frames? Etc) I think you get the idea.

amegatron
Автор

followed video, still getting error despite having be in the let function 😭

SheepyIsSleepy
Автор

hi will you ever make a video where you make a mob system for multiplayer?

notkalium
Автор

My issue is that I can't make a upnp gateway. Is there another way without upnp?

DriftWare
Автор

That doesn't look beginner at all. Feels very niche since you have to know the docs well to know how to fix those. Great work tho! Never would've thought about some of those fixes

m.a.t.a.s
Автор

If I was watching this a say earlier, I would not waste three and a half hours on a stupid bug 🥲

Thanks a lot for this great content!

yuvalkrispin