- 127
- 510 586
BatteryAcidDev
United States
เข้าร่วมเมื่อ 12 ม.ค. 2016
Currently focused on Godot multiplayer and how to tackle common networking challenges. For backend architecture solutions, I'll generally use AWS technologies like Lambda, DynamoDb, and GameLift. I'm hitting pause on my Unity track for now, but may return at a later time.
Let me know if I can help!
www.patreon.com/BatteryAcidDev
Let me know if I can help!
www.patreon.com/BatteryAcidDev
RewindableStateMachine works! | Godot Multiplayer + Netfox
In this second part of this Netfox RewindableStateMachine series, I got the animations working using the newly added "on_state_change_display". This allows the characters to correctly perform any visual actions on state change. Since this was created, they even added "display_enter/exit" which should further help with any state based visual changes.
⭐️ I'm currently refactoring the project, so stay tuned as I should have it fixed soon!
- github.com/BatteryAcid/godot-3d-multiplayer-template
[Netfox]
github.com/foxssake/netfox/tree/main
foxssake.github.io/netfox/
foxssake.github.io/netfox/netfox.extras/guides/rewindable-state-machine/
---------------------------------------------------------------------------------------------
⭐️ Getting started with multiplayer? Begin here:
th-cam.com/play/PLOtt3_R1rR9VMVlRIVVIBeC7Jg5mankyY.html
---------------------------------------------------------------------------------------------
[Support the channel]
👉 www.patreon.com/BatteryAcidDev
👋 Let's talk shop 👇
[Discord] discord.gg/4eEwTDjXzk
[BlueSky] bsky.app/profile/batteryaciddev.bsky.social
[Insta] batteryaciddev
[Mastodon] mastodon.gamedev.place/@BatteryAcidDev
[Threads] www.threads.net/@batteryaciddev
---------------------------------------------------------------------------------------------
#playerauthority #clientauthority #lagcompensation #spawnmobs #spawnnpc #spawnenemies #spawnenemy #syncnpc #syncmob #p2p #3dgame #respawn #pvp #health #animations #gamedevelopment #3dmultiplayer #godotstartertemplate #godot #godottips #gametech #gamedev #indiedev #multiplayer #network #godotengine #netfox
⭐️ I'm currently refactoring the project, so stay tuned as I should have it fixed soon!
- github.com/BatteryAcid/godot-3d-multiplayer-template
[Netfox]
github.com/foxssake/netfox/tree/main
foxssake.github.io/netfox/
foxssake.github.io/netfox/netfox.extras/guides/rewindable-state-machine/
---------------------------------------------------------------------------------------------
⭐️ Getting started with multiplayer? Begin here:
th-cam.com/play/PLOtt3_R1rR9VMVlRIVVIBeC7Jg5mankyY.html
---------------------------------------------------------------------------------------------
[Support the channel]
👉 www.patreon.com/BatteryAcidDev
👋 Let's talk shop 👇
[Discord] discord.gg/4eEwTDjXzk
[BlueSky] bsky.app/profile/batteryaciddev.bsky.social
[Insta] batteryaciddev
[Mastodon] mastodon.gamedev.place/@BatteryAcidDev
[Threads] www.threads.net/@batteryaciddev
---------------------------------------------------------------------------------------------
#playerauthority #clientauthority #lagcompensation #spawnmobs #spawnnpc #spawnenemies #spawnenemy #syncnpc #syncmob #p2p #3dgame #respawn #pvp #health #animations #gamedevelopment #3dmultiplayer #godotstartertemplate #godot #godottips #gametech #gamedev #indiedev #multiplayer #network #godotengine #netfox
มุมมอง: 696
วีดีโอ
Netfox RewindableStateMachine | First Look | Godot Multiplayer
มุมมอง 96828 วันที่ผ่านมา
Netfox released a new Node called RewindableStateMachine to allow for rollback-aware state machines. In this video I take a look at this new node and how to integrate it into my Godot 3D multiplayer template. However, it doesn't go according to plan... ⭐️ I'm currently refactoring the project, so stay tuned as I should have it fixed soon! - github.com/BatteryAcid/godot-3d-multiplayer-template [...
Start Your Multiplayer Game with this Template
มุมมอง 3.2K2 หลายเดือนก่อน
This is a quick review of the Godot 3D multiplayer template that I've been working on over the past few months. This template was designed with match based games in mind, as it can be updated to support multiple levels or maps. - Designed for dedicated server but can also be used in P2P setups 🚨 This template also uses Netfox for lag compensation, however there is a bug right now with state syn...
W4 Cloud (beta) First Look | Dedicated Server Deployment
มุมมอง 1K3 หลายเดือนก่อน
My first attempt at deploying a Godot dedicated server to W4 Cloud (beta). Here we discover how to authenticate an anonymous client, create and join a lobby, and enter the game. Ultimately, this is just a golden path test, as there's a lot more to do! Stay Connected! ⭐️ Getting started with multiplayer? Begin here: th-cam.com/play/PLOtt3_R1rR9VMVlRIVVIBeC7Jg5mankyY.html [Support the channel] 👉 ...
Answering your Godot Multiplayer Questions | Part 2
มุมมอง 4683 หลายเดือนก่อน
I review questions and comments from TH-cam and Discord about Godot multiplayer challenges. In this installment I cover hosting dedicated servers and services that provide that functionality, Steam, spawning player issues, lag compensation (Netfox), and much more! ⭐️ Getting started with multiplayer? Begin here: th-cam.com/play/PLOtt3_R1rR9VMVlRIVVIBeC7Jg5mankyY.html [Support the channel] 👉 www...
Netfox Lag Compensation | Making a Godot 3D Multiplayer Template | LIVE | Part7
มุมมอง 7683 หลายเดือนก่อน
This video covers installing Netfox and the integration required to enable lag compensation for a 3D multiplayer game. It's split into 2 sections, the first is getting it installed, the second is a review of the changes needed to make it work. I refactor of how we determine states was needed in order to correctly process the states from the server. 👀 LOOKING FOR CODE? - github.com/BatteryAcid/g...
Finishing Movement | Making a Godot 3D Multiplayer Template | LIVE | Part 6
มุมมอง 4033 หลายเดือนก่อน
Wrapped up movement code through the state machine. Finished the jump by adding a fall state. Moved common functionality (rotation/movement) to the State superclass so all states have access. 👀 LOOKING FOR CODE? This branch tracks the current progress and MAY NOT MATCH what's show in the video: - github.com/BatteryAcid/godot-3d-multiplayer-template/tree/add-movement-state-machine [Part 1] th-ca...
Godot Multiplayer Q&A | Live
มุมมอง 8063 หลายเดือนก่อน
In this video I review some Godot multiplayer questions and comments from TH-cam and Discord and do my best to answer them! ⭐️ Getting started with multiplayer? Begin here: th-cam.com/play/PLOtt3_R1rR9VMVlRIVVIBeC7Jg5mankyY.html [Support the channel] 👉 www.patreon.com/BatteryAcidDev 👋 Let's talk shop 👇 [Discord] discord.gg/4eEwTDjXzk [Support the channel] www.getyourgamedone.com/channel-support...
Adding Animations & Starting Jump | Making a Godot 3D Multiplayer Template | LIVE | Part 5
มุมมอง 5834 หลายเดือนก่อน
In this installment we look at adding animations as part of the state machine states. I also add the Jump state, which will be finished in next part. 👀 LOOKING FOR CODE? This branch tracks the current progress and MAY NOT MATCH what's show in the video: - github.com/BatteryAcid/godot-3d-multiplayer-template/tree/add-movement-state-machine [Part 1] th-cam.com/video/D61IuowORDY/w-d-xo.html [Part ...
Starting the State Machine | Making a Godot 3D Multiplayer Template | LIVE | Part 4
มุมมอง 5764 หลายเดือนก่อน
In this part I begin adding a state machine to handle the player's movement and work out the issues involved with that refactor. 👀 LOOKING FOR CODE? This branch tracks the current progress and MAY NOT MATCH what's show in the video: - github.com/BatteryAcid/godot-3d-multiplayer-template/tree/add-movement-state-machine [Part 1] th-cam.com/video/D61IuowORDY/w-d-xo.html [Part 2] th-cam.com/video/W...
Fixed the player rotation problems! | LIVE | Part 3
มุมมอง 5674 หลายเดือนก่อน
Fixed the player rotation problems! | LIVE | Part 3
Making a Godot 3D Multiplayer Template | LIVE | Part 2
มุมมอง 1.2K4 หลายเดือนก่อน
Making a Godot 3D Multiplayer Template | LIVE | Part 2
Making a Godot 3D Multiplayer Template | LIVE | P1
มุมมอง 3.2K5 หลายเดือนก่อน
Making a Godot 3D Multiplayer Template | LIVE | P1
Spawn + Sync Enemy Mobs & NPCs | Multiplayer
มุมมอง 2.6K5 หลายเดือนก่อน
Spawn Sync Enemy Mobs & NPCs | Multiplayer
FIXED! Full Player-Client Multiplayer Authority
มุมมอง 1.5K5 หลายเดือนก่อน
FIXED! Full Player-Client Multiplayer Authority
Full Player-Client Multiplayer Authority
มุมมอง 2.5K5 หลายเดือนก่อน
Full Player-Client Multiplayer Authority
Godot Multiplayer Lag Compensation with Netfox
มุมมอง 6K6 หลายเดือนก่อน
Godot Multiplayer Lag Compensation with Netfox
Godot + Steam P2P with Multiplayer Peer GDExtension
มุมมอง 8K6 หลายเดือนก่อน
Godot Steam P2P with Multiplayer Peer GDExtension
Main Architectural Multiplayer Game Components
มุมมอง 1.9K7 หลายเดือนก่อน
Main Architectural Multiplayer Game Components
Export and Run a Godot Dedicated Server
มุมมอง 14K7 หลายเดือนก่อน
Export and Run a Godot Dedicated Server
Basic PvP with Health and Weapon Damage
มุมมอง 8948 หลายเดือนก่อน
Basic PvP with Health and Weapon Damage
A Better Dual-Raycast Collision Detection Strategy
มุมมอง 5398 หลายเดือนก่อน
A Better Dual-Raycast Collision Detection Strategy
AnimationTree Strategy that Grows with Your Game!
มุมมอง 1.4K8 หลายเดือนก่อน
AnimationTree Strategy that Grows with Your Game!
Create Dynamic Animations in Godot with this Blender Workflow
มุมมอง 1.5K8 หลายเดือนก่อน
Create Dynamic Animations in Godot with this Blender Workflow
Finding the Best AnimationTree Strategy
มุมมอง 5K9 หลายเดือนก่อน
Finding the Best AnimationTree Strategy
[Godot] 3rd Person Shooter Bullet Collision
มุมมอง 1.5K9 หลายเดือนก่อน
[Godot] 3rd Person Shooter Bullet Collision
I spent 30 minutes troubleshooting at 18:02 because player 2 would crash... I never attached the multiplayer controller script to my Multiplayer node.... I love coding..... GREAT TUTORIAL BTW. Thank you so much!
Does this work in Godot 4.3?
Yes, check out my latest template/videos for my most current implementation. It’s 3d but the networking uses Netfox for lag compensation.
48:46 Just to clarify, you don't HAVE to export the project, you just have to have the editor with the same files open on a different computer. What I like to do is have the project on a private github repository for version control and pushing changes to a seperate branch for testing, with my laptop set up with a contributor account for ease of updating the game files. It does take a bit to get the hang of it but it is VERY useful. I suggest you look up a video on how to set up a repository with the github desktop application, because it makes pretty much all the commands you would instead type out manually in the console a visual button you can just press
I really wish you could do a small version of this, like bare bones from scratch. Makes it way easier to follow in my eyes. Good tutorial though!
Unless I missed it, does this allow the client to apply the physics locally and then do a periodic drift update? Or is it literally a client input to sever and then server position (etc) back to the client? … this is very limiting of lag is an issue?
This doesn’t as it stands, I think you’re looking for lag compensation. I’ve done a few videos on that using Netfox, check out my lastest ones: RewindableStateMachine works! | Godot Multiplayer + Netfox th-cam.com/video/81TtftbHvbI/w-d-xo.html
How would you go about implementing rollback and reconciliation for steam (p2p)? Netfox does not seem to support it.
In my experience it does support it, the only time Netfox currently would not work is in a mesh style setup, so as long as you have a single authority in one of the peers, it should work.
@BatteryAcidDev Thank you! I'll play around with Netfox :)
I watched all the episodes of this one to be honest it's going well up to the point where I wanted to add more specific things like lobby, items, inventory, I would really like to see a guide about rpc and synchronization because for example when creating a lobby the list of players ids match but all the players names are host names XD it's a pity you don't have more views because you do a brilliant job
can I use the same languages and technologies that o use on web servers/backend for a game? or there are better more specific tools to use? I'm asking that because I'm a web developer and I wanted to know if I can use the experience I have to develop a game server/backend
wunderbar
🍻
5:08 could we remove line 77 with that is_server check as well? In my testing it seems to behave identically with and without it and since with this approach we no longer care about checking if things are running on the server
@BatteryAcidDev I've just cloned your repo, about your issue for the corrupted scene, deleted the scene from Godot UI, and put it back throught the OS (I just saved it using notepad++) fixed the issue. Btw thx for your multiplayer tutorial serie !
Thanks for sharing your process! I’m not 100% sure why that’s happening, but I found that if you remove the scene file, .tscn, from LFS tracking it also resolves it.
im not seeing the network file in the steam-multiplayer folder
Why use `str()` @9:00? Trying to keep reference counts down?
This video has been great as a launching off point for understanding multiplayer. However, I'm creating a 2-player card game that will be asynchronous and involve logins and sending invites to other players and so forth, so some of it doesn't apply. Have you by chance made a video that covers something along those lines?
Good to hear! I haven’t really covered that for Godot, but I plan on making some on login and saving data soon. Is this going to be Async as in turns? Let me know how your game plays so I can weigh in more
@@BatteryAcidDev it's just a very simple card game. It deals a hand of cards at the start, the player draws a card, plays a card, discards a card, and the turn ends. I am completely new to networking of any kind so I'd like to keep it as basic as possible. I ideally don't want to deal with lobbies or logins or any of that stuff if possible, but I'm not sure how else I would do it. I hope this helps. Thanks for the reply!
I dont get why you used two different MultiplayerSynchroizer s. Overall you went into way to little detail on how things actually work, you barely mentioned that jump is going to be done by RPC, without any explanation why, and the differnet modes, and how to call that... really subpar tutorial imo
Try this one: th-cam.com/video/V4a_J38XdHk/w-d-xo.html
Probably the most important tutorial on Godot multiplayer. Thanks!
Thanks for the kind words!
Thank you!
Thanks a ton! I appreciate the support!! ❤️
for some reason, I get the error: "E 0:00:10:0555 get_node: Node not found: "Area3D/MultiplayerSynchronizer" (relative to "/root"). <C++ Error> Method/function failed. Returning: nullptr <C++ Source> scene/main/node.cpp:1792 @ get_node()" I'm spawning it from a player scene, and using get_tree().root to add it to the correct spawn path.
Try using get_current_scene
@@BatteryAcidDev Thank you so much, it works now!
Glad it helped!!
Whenever I run the game, it crashes at get_tree().get_current_scene().get_node("Players") that was added at 17:06. This might be because I am using a different menu to host the game but I'm not sure.
that's cool, from there you could store a vector with their initial value and make them not run too far from that point, or return back to that point and then starting roaming with a limit whenever the target is null
wow
Hello. I recently happened upon your youtube channel. The content is great. Just want to encourage you to really own your niche of godot networking and keep making solid tutorials. If you do, I truly believe that soon your channel will be the premier resource for networking in godot games.
Thanks I appreciate the encouragement, and that’s the plan, hopefully I can get back to making more of those over the next month or so!
Thanks for the video and tips!
Thanks for watching!! Let me know if there's anything else you're interested in seeing
That looks very promising, especially after your AWS test!
Yes it does! I’m excited to make some more progress on this template and then on to the game…
Why is it that jump was implemented as an RPC? I attempted to do this with just a synchronized bool on the Multiplayer Synchronizer but noticed that occasionally I wouldn't jump on the remote client, but the host would always be able to jump.
So I’ve actually implemented jump using both over a few variations, but haven’t really landed on a favorite yet. Jump can also be split up into jump_up, fall, and land, which I’ve also tried with some success. In my latest 3D Template I’m using the synch route through Netfox’a lag compensation with rollback but it’s still early in development
Hype!
LFG!!
Your diagram showed a Client Authoritate example. Server authoritative is a bit different where you send a request to the server and while your client fakes that action for you for real time feel good snappiness. Then the server will send everyone including you that information such as movement. I.e you press a buttom to move, we fake you moving on your end but the sever than updates your information for you and everyone else giving the server the control and makeing conpetitive ganes fair.
I think this was an authoritative agnostic clip, meaning it was meant to generically define how a network connection works to communicate actions in the context of a multiplayer game. What you are describing sounds more like "lag compensation", which can be solved through various approaches. Generally, you'd have some authoritative peer (server or host in p2p) where the source of truth for all gameplay is calculated, then synchronized with clients through some reconciliation algorithm. Client authority can vary, from just inputs to full control over the player, where in the latter case you wouldn't necessarily need lag compensation as your just telling everyone "I'm moving here" and don't really need to fake it at that point - not to be confused with wall collision detection with corrective actions on the server-side, which is another thing... If you're giving authority over just inputs, then yea, you'd have some "client-side prediction" based on inputs, that would be reconciled after the true data is synched from the server.
Problem: I keep getting a null pointer error when the client joins the host. The client player node is added to the host's scene tree correctly, but on the client it can not locate and of synchronizers from "/root". I tried rebuilding from scratch and got the same issues. Is this maybe a Godot 4.3 issue? I really enjoy your content. I'm trying to help my 10yr old son integrate multiplayer for a 3D plat-former he made for himself and his friends.
Ok, figured out the issue finally. I missed the step where you add the Player scene to the Auto Spawn List property in the Player Spawner.
Glad you got it! Let Me know if you run into any other issues, discord is always open too!
I’ve got this issue sorted, stay connected for the next video! 🎉
Hey bro how are you Can you recommend me something? I am thinking of making an e-commerce app using Godot engine. Both client side and server side using ENet connection or webmultiplayerpeer The server side stores user information using frameworks such as fastapi and nosql. I am very familiar with Godot engine, that's why I ask.Flutter or Android Studio may be good for e-commerce, but I ask because I know Godot engine very well.
Sounds like you’ve got a decent plan!
Cool tutorial but I wonder is there actually a way to turn off the visibility for the host (peer id 1)? Or does the host always have to synchronize with itself to keep track of the objects in the world? As far as I saw you are running a seperate instance acting as a server right?
Thanks! Yea I think you have to have some authority to keep track of everything going on, some source of truth, right? Otherwise everyone would be playing within their own reality where nothing would line up... sounds like a good idea!! In all seriousness, in the case where there was a P2P setup where one of the players was the host (authority), and you wanted to "hide" another player's actions or whatever, there are ways to show that visibility change in game, but ultimately, the host would have ALL the data, and could potentially be used as an advantage... so I guess you'd have to trust your host.
@@BatteryAcidDev Thanks for the elaboration! By the way, really loving your tutorials so far. Right after I had that question for you I realized that I would have to let the host be the source of truth and I discovered that SetVisibilityFor seems to do well for clients but disabling objects for the host had to be done with the render visibility. To give you some context, I have developed a multi world system where multiple worlds can be spawned on top of each other. When I got the visibility solution I quickly realized that I also need to use seperate World2Ds in order to hide physics calculations from one world to another. Hence using SubViewportContainers did the trick and now I have a fully functional multiworld system where every client can play in the world he is being located, same for the host where I just despawned the gamecharacter from one world and placed it in to another! Again... your tutorials helped me create this so I want to leave a big thank you, you did a wonderful job here!
@@BatteryAcidDev Thanks for the elaboration! I totally agree, that was my thought too that some source needs to be point of truth where everything needs to run. So I found that the host (which acts as the server) had to be able to see everything simultaneously even if the host player wasn't directly impacted by it. So when I wrote this question I was working on a multi world system where every player (including the host) could be in another world, or they could be in the same world and with that I had to find a way to set the visibility off for certain clients where I thought godot would handle the host's visibility by just turning off the renderer. To my surprise that wasn't the case! So what I did next was I just disabled the rendering on the host for the world he was not in... so every other client could still be in his own world while the host was in another... then again quickly realized that I needed a way to seperate the physics calculations for N* nodes that were in different worlds! That's where SubViewportContainers came in handy and I was able to split the worlds in to their different spaces so that no world could impact the other even if the objects were overlapping in their coordinates! This way I am able now to build as many worlds that I need and as much as the computer's resources can carry the performance! And with no surprise: This approach even works better when running --headless! So I am able now to build infinite independent worlds which are also multiplayer supported! And I can't wait to further carry on with my little dream project! A lot of the times I was stuck with the first steps by setting up the pre-requisites and with this project I finally came to the point where I have to worry more about the artistic aspect of things rather than having to figure out how to get the core mechanics up and running! So that's a huge milestone! Again thank you very very much sensei! Your videos helped me very much along the way. I left you something on the way (I think it was another video lol). Still your content is very much appreciated 🙏🏻
I learned a lot from this video, especially in terms of testing things in a real production environment. Thank you very much for sharing!
Happy to hear !
Can this handle more complex games like Lethal Company, Payday or Phasmophobia?
I think so, I mean, it's a home grown implementation that can be built to scale. The immediate code base may not support exactly what you are aiming for, but should be able to be grown into whatever you're looking to do. Think of this as more of a starting point.
0:50 That's a really good way to explain it. It actually helped me out quite a bit
Nice! Glad to hear it was helpful!
I just posted a short that captures this explanation! Thanks for the inspiration! th-cam.com/users/shortsLeWdV4scUqo
35:38 I'm assuming you're just showing everyone what you just did, but now I'm second-guessing myself about what the arrow meant
Haha I think you got it, the arrow was added because the frame jumped, and I wanted to make sure people see the line of code I just added, nothing more!
I wonder if you happen to have any ideas/linka to existing techniques for the more fast paced games. E.g. fps "boomer shooters"
Well I think the strategy will be similar, Client prediction with server reconciliation, but maybe Netfox’s implementation isn’t the best fit for that. You may have to roll your own using lower level APIs. I don’t have any resources right now. I think one of my Discord members wrote their own, maybe drop by!
At first glance, this looks like this is perfect for FPS's! Having an FPS arms rig only visible for the client while having just the full character visible for everyone else!
Yea sounds like a good fit, although I haven’t played with that yet, I would consider that a solid starting point to try!
thank you so much!!
You're welcome!
Awesome tutorials! At the moment, networking tutorials related to Godot are hard to find or outdated, your youtube is a gold mine! I'd definitely be curious to see how noray operates, I wonder if it can behave similarily to UnityServices's Relay.
Thanks! Yea I think it is similar, with this you can host Noray yourself or use theirs
Best tutorial series for Godot 4 multiplayer tbqhwy fam
I appreciate that, thank you!
12:30 ok so I tried to find all sorts of tutorials on this but couldn't find my problem, when I type in ssh -i . \secure\keys\key_pair.pem ec2-user@"the long line i copied from Amazon" It always tells me no file exists I thought I needed to replace "secure" with the name of my computer but that didn't help tried finding the absolute path but nothing seems to work I'm completely stumped
Ok what OS do you have? Yea you provide your full path to the key. Also, I think that “.” Should be right next to the slash, and means you’re starting the path from your current folder.
Windows, but I figured it out I put the .pem file into my user instead of into a folder on my internal drive after I did that all the paths worked
@isaiah3613 nice! Glad you got it!
Amazing video. Thank you for making it!
I made the coins disappear when one player touches them how fun i love coding
Nice! Yea have fun with it!!
Hi, I'm making a game with multiple maps and I was wondering if I should put on the multiplayer spawner on the main scene or on every map scenes separately? Cuz I have a map randomizer everytime you join a lobby.
Hmm, if it’s the same thing you’re spawning, I guess you could keep it at the main scene level. I wonder if you’ll run into issues trying to sort out the map visibility options for whatever you’re spawning. I would try it out and see if it works, otherwise you can refactor to a per-map approach.
@@BatteryAcidDev ok, also can I use multiple nodes for the multiplayer spawner. I want the players to be distant from one another
I’m not sure if you can switch nodes during game play on the spawner 🤔check the docs, or perform some experiments
Fantastic video, I never thought I'd be able to set up a remotely hosted server in a single morning, but with this I've been able to
Awesome! Happy it helped!!
I'm not converting anything.
Not sure what to say here…
Slime synced! Goof tutorial. Definitely going to look into the rest of this series as well.
Well done!! 👍