Full Player-Client Multiplayer Authority

  Рет қаралды 1,250

Battery Acid Dev

Battery Acid Dev

Күн бұрын

A quick review of how to setup client authority over the full player object, and not just the inputs. As a continuation off of the base Brackeys-multiplayer project, this is an easy way to have responsive player movement, for example CoOp games, but be mindful of the potential for cheating using this approach.
---------------------------------------------------------------------------------------------
[Follow along starting point] Clone repo, then checkout this commit:
⭐️ github.com/BatteryAcid/godot-...
[Finished project]
👉 github.com/BatteryAcid/godot-...
FIX for the exceptions found here: • FIXED! Full Player-Cli...
Thank you @tldmbruno for the suggestion!
---------------------------------------------------------------------------------------------
[Support the channel]
👉 / batteryaciddev
👋 Let's talk shop 👇
[Discord] / discord
[Support the channel] www.getyourgamedone.com/chann...
[Twitter] / batteryaciddev
[Insta] / batteryaciddev
[Mastodon] mastodon.gamedev.place/@Batte...
[Threads] www.threads.net/@batteryaciddev
---------------------------------------------------------------------------------------------
00:00:00 FULL PLAYER AUTHORIZATION INTRO
00:01:10 PLAYER CONTROLLER CHANGES
00:05:55 INPUT CHANGES
00:07:02 KILLZONE CHANGE
00:08:04 TEST CHANGES
00:08:43 SYNCHRONIZE SLIME
00:10:18 POTENTIAL ISSUES
00:12:12 DEDICATED SERVER BUILD & DEPLOYMENT
#playerauthority #clientauthority #lagcompensation #clientsidepredictionserverreconciliation #netfox
#steam #steamgame #steammultiplayerpeer #extension #p2p #steammultiplayer #steammultiplayerpeer #godotsteam #steamp2p #2dgame #respawn #pvp #health #animations #gamedevelopment #2dmultiplayer #godotstartertemplate #godot #godottips #gametech #gamedev #indiedev #multiplayer #network #godotengine #brackeys

Пікірлер: 20
@BatteryAcidDev
@BatteryAcidDev 22 күн бұрын
**FIX** for the exceptions found here: kzfaq.info/get/bejne/fq6fds6qp8q2fac.html Thank you @tldmbruno for the suggestion!
@LaCe5758
@LaCe5758 22 күн бұрын
you're carrying my current online game! Now I just need a youtuber to carry me with the level design
@herrspaten1796
@herrspaten1796 22 күн бұрын
Level design is pretty hard. I tend to underestimate it all the time
@LaCe5758
@LaCe5758 22 күн бұрын
@@herrspaten1796 same! I came up with some ideas after I thought "How can I make a level that relies on my game mechanics"
@herrspaten1796
@herrspaten1796 22 күн бұрын
@@LaCe5758 when in doubt, look at nintendo games! Thats my way of dealing with level design
@BatteryAcidDev
@BatteryAcidDev 18 күн бұрын
Haha nice! Yea I think we all need that!
@tldmbruno
@tldmbruno 22 күн бұрын
10:54 I had that error fixed by using "_enter_tree(): set_multiplayer_authority(str(name).to_int())". Because _enter_tree is called before _ready, the peer that just joined can set who is the multiplayer_authority of each player character. One HUGE misconseption I found people think (mostly because this info is nowhere to be found on the internet nor in the docs) is not knowing that multiplayer_authority is defined PER PEER. The reason using "name = peer_id" works its because MultiplayerSpawner already syncs the node's names. So the third player joins in, with the other two players having their names set as "1" and something like "348574813" respectively. Then the _enter_tree runs FOR EVERY CHARACTER in the third peer's machine. The enter_tree then sets the multiplayer authority correctly for that peer, because it uses the node's names. The error at 10:54 is basically saying: "the third peer thought someone else had the authority to that node!".
@tldmbruno
@tldmbruno 22 күн бұрын
I only found out about this thing about multiplayer_authority being defined per peer after I spent two days trying every possible combination of set_multiplayer_authority.
@BatteryAcidDev
@BatteryAcidDev 22 күн бұрын
Yea so I revisited this approach with a fresh mind, and I can't believe I got it working!! I was making a dumb mistake that I caught the second time around, so thanks a ton!!! Thanks!
@BatteryAcidDev
@BatteryAcidDev 22 күн бұрын
Added correction video here: kzfaq.info/get/bejne/fq6fds6qp8q2fac.html Thank you @tldmbruno for the suggestion!
@yuvalkrispin
@yuvalkrispin 22 күн бұрын
Nice thanks for everything This is great Meme please a database tutorial
@BatteryAcidDev
@BatteryAcidDev 18 күн бұрын
Thank you! Yes, that is in the queue. I may do a NoSQL one to start but not sure... let me know which type of database you'd like me to focus on. And also where to host it?? I generally use AWS because it's easy for me, but there are other services, so let me know!
@DragilusGame
@DragilusGame 10 күн бұрын
Great video, I like the way you show how things are done. I had another question with this video, but what would be the best way to deal with the disconnection/closure of the server host to the client. I tried to do in the Steam tutorial, but it didn't work as expected.
@plompcore
@plompcore 22 күн бұрын
Much appreciated!! I'm wondering how to handle scene changes in an online game
@LaCe5758
@LaCe5758 22 күн бұрын
I did it after many headaches, now I have a nice main menu screen where I can choose Online Mode/Local Mode/Settings (and choose the level once I do more levels!), the classic menu screen
@BatteryAcidDev
@BatteryAcidDev 18 күн бұрын
You can make RPC calls from the Authority(server/host) to the clients that tell them to change scenes. Also, you can probably swap out Nodes using the MultiplayerSpawner to achieve something similar, but I haven't played around with that just yet.
@Ceisri
@Ceisri 21 күн бұрын
everyone made already 10000 videos on how to sync players.... but how do I sync NPC's ? the only thing I managed so far is either making the NPC a fake player but I can't do it with multiple NPCs.... or using rpc but for some reason it only syncs on computers and not on phones
@BatteryAcidDev
@BatteryAcidDev 21 күн бұрын
I’ll do some more on that topic but you can check here in the meantime: Spawn & Sync Enemy Mobs for Godot Multiplayer Games kzfaq.info/get/bejne/l8VmatxitNq2k6s.html Automate Mob Movement Using Navigation 3D Region + Agent [Godot 4] kzfaq.info/get/bejne/sK2bY62H0J-0YWg.html
@BatteryAcidDev
@BatteryAcidDev 14 күн бұрын
Here’s a new one: kzfaq.info/get/bejne/icmPo7OQ07G3fGw.htmlsi=6v-F3xvgM7WeqltG
5 Beginner Multiplayer Mistakes
21:18
Battery Acid Dev
Рет қаралды 1,9 М.
Export and Run a Godot Dedicated Server
23:29
Battery Acid Dev
Рет қаралды 7 М.
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 34 МЛН
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 13 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 82 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
Do You Like C or C++ More ? #programming #coding #lowcode
0:50
Low Level Learning
Рет қаралды 1 МЛН
What is the Smallest Possible .EXE?
17:57
Inkbox
Рет қаралды 311 М.
MMO Architecture overview with Unreal Engine
12:04
Unreal game dev with Yaz
Рет қаралды 9 М.
I Made a Zero Player Game
12:30
Sam Hogan
Рет қаралды 10 МЛН
1 Year Of Learning Game Development In Unity...
7:12
DevBanana
Рет қаралды 691 М.
My 10 YEAR Indie Game Development Journey
23:58
ThinMatrix
Рет қаралды 559 М.
Memory Safe C++
0:20
Low Level Learning
Рет қаралды 1,9 МЛН
Godot + Steam P2P Multiplayer
1:02:29
Battery Acid Dev
Рет қаралды 8 М.
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 34 МЛН